Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

I want to load external swf in movieclip and next external swf should load Automatically

New Here ,
Jan 17, 2014 Jan 17, 2014

I want to load external swf in movieclip and next external swf should load Automatically when current swf is finished in AS3.

How can we can check total frame and current frame of imported swf in a movie clip.

any help will be appreciated

regards,

Jatin Dembla

TOPICS
ActionScript
431
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 17, 2014 Jan 17, 2014
LATEST

in as3 you use the loader class (not movieclips) to load external swfs.

you can use an Event.COMPLETE event listener (applied to the loader's contentLoaderInfo property) to check when loading is complete and start the next swf loading.

you can use the loader's content property (caste as a movieclip) to determine info (including totalFrames) about the loaded swf's main timelnie (once loading is initialized, for the totalFrames, or complete, for some other properties like height and width).

var loader:Loader=new Loader();

loader.contentLoaderInfo.addEventListener(Event.COMPLETE,loadcompleteF);

loader.load(new URLRequest("swf1.swf"));

var loadedSWF:MovieClip;

function loadcompleteF(e:Event):void{

loadedSWF=MovieClip(loader.content);

trace(loadedSWF.totalFrames);

}

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines