Share Posted October 23, 2012 Hii I'm loading in a swf animation with a couple of frame scripts embedded on the loaded swf timeline. I managed to load in the swf, place it into a TweenMax instance, and placed that TweenMax instance into a TimelineMax instance so I can control the playback. The only issue I'm having is that the swf animation frame scripts are not firing off. This is an example of how I'm setting up the above: // This occurs after the swf is loaded var intro = LoaderMax.getLoader("transition_intro").rawContent; var introTransition:TweenMax = new TweenMax(_intro, _intro.totalFrames, { useFrames: true, frame: _intro.totalFrames, ease: Linear.easeNone } ); var timeline:TimelineMax = new TimelineMax( { useFrames:true, paused:true } ); timeline.append(introTransition); timeline.play(); Is there a way to have the loaded swf run a frame script on the defined frame (like mc.gotoAndPlay(0) or am I setting up this wrong? Cheers Link to comment Share on other sites More sharing options...
Share Posted October 23, 2012 I set up some files to simulate what you are trying to do. When the loaded swf was frame-tweened it was still firing off its frame scripts frameScriptsParent.fla import com.greensock.* import com.greensock.loading.*; import com.greensock.events.*; import com.greensock.easing.*; var swf:SWFLoader = new SWFLoader("frameScriptsChild.swf", {container:this, onComplete:fun}); swf.load(); function fun(e:LoaderEvent):void{ var _intro = swf.rawContent; var introTransition:TweenMax = new TweenMax(_intro, _intro.totalFrames, { useFrames: true, frame: _intro.totalFrames, ease: Linear.easeNone } ); var timeline:TimelineMax = new TimelineMax( { useFrames:true, paused:true, repeat:5, yoyo:true } ); timeline.append(introTransition); timeline.play(); } frameScriptsChild.fla (frame 15) trace("hello") mc.scaleX +=2; Perhaps I'm misunderstanding the question I've attached CS5 flas and swfs let us know if you still have trouble frameScripts_CS5.zip Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now