|
-
Thanks for your help cancerinform
The working code is as follows, if anyone needs the files contact me and I will send them on.
//import for the tween
import caurina.transitions.Tweener;
//load the external swf
var externalSwf:Object;
var myRequest:URLRequest=new URLRequest("orange.swf");
var myLoader:Loader = new Loader();
myLoader.contentLoaderInfo.addEventListener(Event. COMPLETE, grabContent);
myLoader.load(this.myRequest);
addChild(myLoader);
//when the swf is loaded, the tween is initiated
function grabContent(event:Event):void {
trace("swf has been loaded");
externalSwf=event.target.content;
Tweener.addTween(banana, {x:-900, time:1, transition:"easeInCubic", onComplete:nextBuild});
}
//when the tween is complete, play the swf
function nextBuild() {
trace("the tween has completed and has initiated the nextBuild function");
externalSwf.gotoAndStop(2);
}
stop();
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|