Actionscript 3: Align MC to MC Inside MC Cords -
okay trying stage movie clip instance align (x,y) x, y cords of movie clip instance inside of movie clip instance (a little confusing).
stagemc.x = targetmc.subtargetmc.x; stagemc.y = targetmc.subtargetmc.y;
so on event (mouse click example), want x, y cords of 'stagemc' instance align x, y cords of 'subtargetmc' sits inside of movie clip called 'targetmc'.
the movie clip 'subtargetmc' sits inside of primary 'targetmc' instance copy of library mc , has instance name indicated.
i did not find solution in forum nor anywhere else online. end resolving myself (as do) wanted use stackoverflow resource.
thanks
use localtoglobal() convert coordinates.
var globalcoordinates:point = targetmc.subtargetmc.localtoglobal(new point()); stagemc.x = globalcoordinates.x; stagemc.y = globalcoordinates.y;
Comments
Post a Comment