Thread: Left align?
View Single Post
  #2 (permalink)  
Old 07-25-2008, 05:02 AM
Noelbaland
 
Posts: n/a
Diggs:
Default Re: Left align?

Hello,

If you try to do that then all your images will not be centered. They will
instead show the bottom right quarter of your image.
The tutorial explains the reason for this here

[i]"When targeting a movie clip with the loadMovie action, the upper-left
corner of the loaded image or movie aligns with the registration point of the
targeted clip. We moved the registration point of the target clip to it's
upper-left corner, as shown below by the cross hair, so that each image aligns
properly in the target area."{/I]

The solution for what you want to do is to replace the current movieclip that
loads the jpegs with an empty movieclip. An empty movieclip has no graphics
inside it and is practically invisible when you drag it on stage. Any image
that gets loaded into it will be resized to that image's width and height.

1) Go Insert>New Symbol and choose Movieclip for the type and name it
something like empty_mc. It doesn't really matter.

2) When you click to close the Create Symbol box you will be inside the empty
movieclip. Click to go back to the main stage.

3) Click on the current movieclip that loads the jpegs and copy it's instance
name. Delete it off the stage.

4) Drag the empty_mc movieclip to the stage and paste the old movieclip's name
into the instance name field. As long as the instance name is the same then
the code will not be affected and still work the same.

5) Position the movieclip where you want and preview your movie. Because all
you can see is the registration point it can be tricky selecting it on stage.
It's best to use the Properties panel and position it with the X and Y fields.

You can even create an empty movie clip with Actionscript using the
createEmptyMovieClip method.

Hope that helps.

Reply With Quote