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

Unable to Simulate Download

Participant ,
Jan 09, 2017 Jan 09, 2017

Hi All,

Just used to Preloader function to create a loading bar at the start of my flash file.

I've seen that the Simulate download has been removed from the Animate package, but I wonder if theres a way to do this?

There's nothing huge in my file to make it load for a long time, but I want to make sure it's working.

My code:

stop();

//check file size left

this.addEventListener(Event.ENTER_FRAME, loading);

function loading(e:Event):void{

  var total:Number = this.stage.loaderInfo.bytesTotal;

  var loaded:Number = this.stage.loaderInfo.bytesLoaded;

  bar_mc.scaleX = loaded/total;

  loader_txt.text = Math.floor((loaded/total)*100)+ "%";

  if (total == loaded){

  play();

  this.removeEventListener(Event.ENTER_FRAME, loading);

  }

}

Thanks,

Jack

131
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
no replies

Have something to add?

Join the conversation