Flash ActionScript 3 Sequential swf uploader issue -


i wanted create swf file load other 1.swf , 2.swf , 3 , 4 , on sequentially , loop first 1 again.

the problem: output "ready call eframe typeerror: error #1009: cannot access property or method of null object reference. @ main_fla::maintimeline/eframe()"

this ive got (btw not code:) problem in part of code

mcexternal= loader.content movieclip; var current:int=mcexternal.currentframe; var total:int=mcexternal.totalframes;

import flash.display.movieclip;  var rq:urlrequest; var loader:loader= new loader(); stage.addchild(loader);  var numofmovies:int = 3; var path:string = "mov/"; var mymovies:array=["1.swf","2.swf", "3.swf"]; var movienum:int=1; var mcexternal:movieclip;  /*load req*/ function loadswf():void {     var tpath:string = path + movienum;     rq=new urlrequest(tpath + ".swf");     loader.load(rq);      // waiting loader ready     loader.contentloaderinfo.addeventlistener(event.complete,oncomplet);  } /*load req*/   function oncomplet(e:event):void {     loader.contentloaderinfo.removeeventlistener(event.complete,oncomplet);     trace("ready call eframe");     stage.addeventlistener(event.enter_frame, eframe); }   function eframe(e:event):void {     mcexternal= loader.content movieclip;     var current:int=mcexternal.currentframe;     var total:int=mcexternal.totalframes;      /*trace(current);     trace(total);*/      if (current >= total) {         trace("load next swf ");         loader.unloadandstop();          mcexternal=null;         movienum++;         stage.removeeventlistener(event.enter_frame, eframe);         rq=null;         loadswf();          if (movienum>=numofmovies) {             movienum=0;         }     } }   loadswf(); 


Comments

Popular posts from this blog

javascript - Jquery show_hide, what to add in order to make the page scroll to the bottom of the hidden field once button is clicked -

javascript - Highcharts multi-color line -

javascript - Enter key does not work in search box -