View Full Version : Registration Points... CS3
inadequateanima
April 30th, 2007, 04:30 PM
I am loading swfs randomly into a movie target and want them to be anchored in the bottom left, so that no matter what the image size is, the corner still rests on the same point in the bottom right. What do i do? I tried to change the registration point but that had no effect... Sorry for this little query, but, as ever, it is driving me nuts.
Thanks!
Also, is anyone having trouble understanding actionscript 3.0? I am sticking with 2.0...
Thanks!
Alex
FizixMan
April 30th, 2007, 04:47 PM
You can utilize a bit of math and Stage.width, Stage.height, myMovieClip._width & myMovieClip._height. These are AS2, not sure what the AS3 equivalents are.
Krilnon
April 30th, 2007, 05:25 PM
child.x = 0;
child.y = child.parent.height - child.height;
inadequateanima
May 1st, 2007, 02:08 AM
thanks for the help guys, but where should i place that actionscript code?
thanks!
Krilnon
May 1st, 2007, 08:29 AM
I would position the clip just after it loads. What sort of loading code are you using?
hybrid101
May 1st, 2007, 11:05 AM
haven't seen you in a while, krilnon:P
i'd put that on(load)
inadequateanima
May 1st, 2007, 12:00 PM
i'm using the code used for the random movie tutorial on kirupa... it's
filename = ["01.swf", "02.swf", "03.swf", "04.swf"];
path = "pictures/";
i = filename.length;
k = Math.floor(Math.random()*i);
loadMovie(path+filename[k], topleftloader);
which is bringing swfs into the movie topleftloader, but i am going to have four loaders arranged in a grid (topleft, topright, bottomleft, bottomright) and they need to be anchored around the centre, so that regardless of the image size and proportion, they all fit together. thanks guys!
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.