Skip to main content
Participant
July 22, 2013
Question

CtionScript 3

  • July 22, 2013
  • 1 reply
  • 329 views

Iam new to actionscript - how can i load external swf movie to a main timeline, when a movieclip plays the last frame

This topic has been closed for replies.

1 reply

Inspiring
July 22, 2013

1.Make  a keyframe on the first frame of the main timeline of your movie and write:

var loader:Loader = new Loader();

loader.addEventListener(Event.COMPLETE, addThis);

function addThis(e:Event):void{

  addChild(e.currentTarget);

}

2.Make  a keyframe on the last frame of your MovieClip and write:

//replace external.swf with the actual name of the swf file you want to load

root.loader.load(new URLRequest("external.swf"));