|
-
Targeting a loaded swf
Hi all
1. I'm loading an external swf onto my main swf.
2. Then I'm tweening an object which is separate to the loaded swf.
3. When the tween has completed I'm calling a function to make the loaded swf gotoAndPlay(2);
It all works apart from telling my loaded swf to play. I'm really stuck please help.
The code which I'm using is:
//
import caurina.transitions.Tweener;
//load swf
var externalSwf:Object;
this.myRequest=new URLRequest("orange.swf");
this.myLoader = new Loader();
this.myLoader.contentLoaderInfo.addEventListener(E vent.COMPLETE, grabContent);
this.myLoader.load(this.myRequest);
//tween object
function grabContent(event:Event):void {
externalSwf=event.target.content;
Tweener.addTween(banana, {x:-900, time:1, transition:"easeInCubic", onComplete:nextBuild});
}
//control loaded swf
function nextBuild() {
externalSwf.gotoAndPlay(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
|