|
|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Member
Join Date: Jun 2006
Location: Croatia
Posts: 82
|
Hi,
Let's say i have a 3 movieclips which are nested one in other like this: A-> B-> C And i would like to find out C movie clip (which is in B mc and B mc is in A mc) coordinates relative to global stage, how can i accomplish that? Thanks in advance, Best regards |
|
|
|
|
|
#2 |
|
rabid_Delineator
Join Date: Dec 2003
Location: Orlando, Florida
Posts: 307
|
var convertPoint:Point = new Point(c.x, c.y);
c.localToGlobal(convertPoint); |
|
|
|
|
|
#3 |
|
Member
Join Date: Jun 2006
Location: Croatia
Posts: 82
|
I complicated things a "bit"
the thing is i have a Main class in which i add another let's say ClassA in which i add another let's say ClassB. All theese classes extend Sprite class. Now, i am in a ClassB code in which i try to position ExampleMc movie clip so in ClassB i have the following line:Code:
addChild(ExampleMc): Code:
ExampleMc.x = ExampleMc.y = Thanks, Best regards |
|
|
|
|
|
#4 |
|
rabid_Delineator
Join Date: Dec 2003
Location: Orlando, Florida
Posts: 307
|
I mean , i don't know if there is a right or wrong way to doing that , and i'm almost certain I have no idea what you are doing. The above method is what adobe recommends doing , so I am in agreement with that. In your case since you have so many things all over , in many different scopes , i would try to localize all their values , in one place. Like write a position manager class , that does nothing more then create arrays of different objects at different scopes within your app , and keep track of their global positions.
|
|
|
|
![]() |
|
||||||
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|