OOPS! I spoke too soon!!
Here's the revised 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 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;
myThumb.addEventListener(Event.ENTER_FRAME, checkFrame);
}
public function checkFrame(e:Event):void {
if (e.target.currentFrame == 10) {
doTween();
}
}
}
}
I still need to target the frame I want to use. Again, when I change the
value to anything other than 1, it fails. Please advise.
TIA,
beno
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders