8 Replies Latest reply on Nov 13, 2008 10:34 AM by K0raX

    [CS3] this._root. or this._parent just won't work + retrieving a MC's y position.

    K0raX
      I've got some buttons which when i click them i want them to make a particular MC move downwards. Well the thing is that when i try to reference to that particular MC it just won't happen (yes the MC has an instance name). For the button i tried something like

      btn1.onRelease = function() {
      var mcReferece = this._root.myMC;
      trace(mcReference);
      }

      or

      btn1.onRelease = function() {
      var mcReferece = this._parent.myMC;
      trace(mcReference);
      }

      since they have the same parent.

      Both returned undefined.

      I've also tried putting directly myMC in the tween, with no effects whatsoever.

      The second question is, how can i retrieve the y position of a MC?

      Also i've tried putting the tween on the MC itself...

      onClipEvent(enterFrame){
      import mx.transitions.Tween;
      import mx.transitions.easing.*;
      var myTween:Tween = new Tween(_level0.myMC, "_y", Elastic.easeOut, 195, 545, 10, false);
      }

      But not only does it not animate it doesn't even go where it's supposed to go...

      Thanks in advance.

      P.S. This might be rlly simple to solve but it's been bugging me and can't go on without it. Couldn't figure it myself. Got rlly annoyed at some point :|