When the registration point is not the top-left corner of your clip, you might 
want to check the MovieClip.getBounds() method, it's very handy.

Tim.


On Mon, 24 April 2006 18:45, Meinte van't Kruis wrote:
> Hi folks,
>
> I have a problem correctly figuring out the actual x value of the top-left
> corner of a movieclip when scaling it.
> To demonstrate to this:
>
> put movieclip t on stage(a black box). Edit it, so that it's left top
> corner isn't on the movieclip centerpoint.
>
> this code on stage:
>
> onEnterFrame=function(){
>     t._xscale++;
>     trace(t._x);
>     trace(t.getBounds().xMin);
>     trace(t.getRect().xMin);
> }
>
> if you execute it, you can clearly see the top-left corner is in fact
> moving, due to the scaling.
> But the values never change. So my question is:
>
> how do I know the coordinates of the topleft corner of an (off-centered)
> movieclip, or
> the coordinates of the topright corner of a centered movieclip while
> scaling it?
>
> I'm really stuck on this, help would be very much appreciated.
>
> greetings,
> Meinte

_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to