Advertisement

07.14.2008 at 08:25AM PDT, ID: 23562911
[x]
Attachment Details

Finding relative X and Y

Asked by alex_wareing in Macromedia Flash, ActionScript

Ok so i have MC setup in the following hierarchy;

_root.mainMC.subMC.iconMc;

The iconMC is an icon that moves around the stage. When its clicked i want to get X and Y values of iconMC, I can trace this easily by trace(_root.mainMC.subMC.iconMc._x);

The problem here is this is no use as the X and Y values returend are relative to the position of iconMc in the subMC movieclip. How can i get the X and Y values of iconMc relative to mainMC?Start Free Trial
[+][-]07.14.2008 at 08:38AM PDT, ID: 21999058

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Macromedia Flash, ActionScript
Sign Up Now!
Solution Provided By: aneeshchopra
Participating Experts: 1
Solution Grade: A
 
 
[+][-]07.15.2008 at 12:10PM PDT, ID: 22010001

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.15.2008 at 12:16PM PDT, ID: 22010070

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_EXPERT_20070906