actionscript 3 - How To Load Image Though URL in action script 3.0 -


i have tested code in action script 2.0 . working great not support gif want write in action script 3.0. have no idea in this.

 var current_loader: number = 1;  import flash.geom.*;  var current_img: number = 0;  this.createemptymovieclip('img_01', 999);  this.createemptymovieclip('img_02', 998);  var loader: moviecliploader = new moviecliploader();  var listener: object = new object();   listener.onloadcomplete = function (target_mc: movieclip) {      if (target_mc._name == 'img_01') {          img_02._visible = false;      } else {          img_01._visible = false;      }      progress_bar.visible = true;      current_loader.opaquebackground = 0xff0000;  };   var interval: number = setinterval(load_image, 1000);   function load_image() {      loader.addlistener(listener);  }   loader.loadclip("http://google/example3", current_loader);  current_loader = current_loader == 1 ? 2 : 1;  current_img = current_img == images.length - 1 ? 0 : current_img + 1;  } 

there simpler ways using straight as3 robust way load may file types lots of great documentation. https://greensock.com/loadermax-as3


Comments

Popular posts from this blog

Payment information shows nothing in one page checkout page magento -

tcpdump - How to check if server received packet (acknowledged) -