Hi;
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