Groups | Blog | Home
all groups > flash (macromedia) > june 2007 >

flash (macromedia) : Fluid layout question.


ch70
6/17/2007 5:21:39 AM
I am working on a flash site with many scenes with movie clips, different clips
but same size and same position.
I just set up the layout using fluid with this function

sizeListener.onResize = function() {
centered._x = Stage.width/2
centered._y = Stage.height/2
centered._width = Stage.width * .5
};

Works great.
To make it work for all scenes and each instance names of my movie clips I
copy the script on the first frame of each scene and change the instance names.
Is it the proper way and/or is there another or better way.
Thanks for your help.
Chris
Rothrock
6/17/2007 4:55:19 PM
Well, yes and no. If you are going to use scenes then that is most likely the
proper way.

But, the real answer, is that you shouldn't use scenes. They are really
something designed to help timeline animators arrange their work. In the
published swf file the scenes go away and it becomes one long timeline. This
can cause several problems that pop up in these forums from time to time.

So instead use only one scene and use the power of nested movieclips to keep
things organized.

Also, you shouldn't really have dozens of these for each clip. Instead you
should have some way of reusing the same function over and over. It is hard to
say how to structure it without knowing more about your whole project.
AddThis Social Bookmark Button