So you are adding the myThumb and Tweening it somewhere?

You might want to make myThumb do the Tween again from other frames in your movie?

Maybe define a function in your class that is not depending on the ENTER_FRAME event?

public function doTween():void {
addChild(myThumb):

TweenMax.to(myThumb, .4, {shortRotation:{rotation:60}, 
ease:Back.easeOut,/onComplete/:onFinishTween});

}

//If you want to get rid of the thumb after the tween has finished, then add the "onComplete handler above to point here...
public function onFinishTween():void {
   removeChild(myThumb);
}
//Then in your theThumb function:

public function theThumb():void
               {
                       myThumb = new CloseThumb();
                       myThumb.x = 365;
                       myThumb.y = 355;
                        doTween();
               }



beno - wrote:
Hi;
I have posted this question so many times in so many forums and not gotten
an answer that I'm simply asking the helpful, mature people of this list to
help me understand better how to ask this question in a way that would
elicit a helpful response.
TIA,
beno

I have asked this in the newbies d'list, Adobe's d'list and of the two
listers here kind enough to offer off-list help and all to no avail, so with
your permission I'm now asking it here.

Hi;
I have this code:
package
{
   import flash.events.Event;
   import flash.events.ProgressEvent;
   import flash.events.Event;
   import flash.events.MouseEvent;
   import flash.display.MovieClip;
   import com.greensock.*;
   import com.greensock.easing.*;
   public class Main2 extends MovieClip
   {
      //Import Library Assests
                public var myThumb:CloseThumb;

      public function Main2()
      {
         init();

      }

      public function init():void
      {
                        theThumb();
}
                public function theThumb():void
                {
                        myThumb = new CloseThumb();
                        myThumb.x = 365;
                        myThumb.y = 355;
myThumb.addEventListener(Event.ENTER_FRAME, checkFrame);
                }
public function checkFrame(e:Event):void {
if (e.target.currentFrame == 1) {
e.target.removeEventListener(Event.ENTER_FRAME, checkFrame);
trace('check');
addChild(myThumb);
TweenMax.to(myThumb, .4, {shortRotation:{rotation:60}, ease:Back.easeOut});
}
}
   }
}
It works fine. The problem is that if I change currentFrame from == 1 to any
other value, it breaks. The reason apparently is because the mc in the fla
is only 1 frame long. Now, I need to be able to call it from various frames.
I've been told to extend it to, for example, 2 frames, but that does
nothing. My main timeline also has but one frame calling the actionscript.
Apparently it's useless to have a listener checkframe on an mc that has 1
frame. Please advise.
TIA,
beno
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to