3 Replies Latest reply on Feb 13, 2008 11:13 PM by kglad

    Using captured coordinates to define the start point of a tween

      Hi There,

      I have a movieclip "pano_mc" which moves around driven by mouse movements, there is a hotspot (hs1_mc) nested within it (which moves with the Pano_mc), I have an onPress Event on hs1_mc which when pressed allows me to get the x and y of "pano_mc" at the point of OnPress, I need somehow to use these x and y corodinates to define the start point of the tween, on Pano_mc.

      I can't use "this" (as mentioned in the above link) as the event is on the hs1_mc and if I just use "_x" parameter in the tween, it starts from where the movie is originally and not from where it is when the onPress is actioned,where I get the cordinates at that point.

      var hotSpotTweenX:Tween = new Tween(pano_mc, "_x", mx.transitions.easing.Elastic.easeOut, 0, "400", 3, true);

      Is there a way of populating "_x" with the var newx:Number = stagePosition.x; , which holds the exact cordinate of the pano_mc at the time of Press....

      I need to be able to use the xy coordinates of the pano_mc captured by the onPress, to define the start point of the tween which then tweens the movie to a predefined point... creating a seemless tween....

      Can anybody shed some light on this... Thanks in advance