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

Dynamic Circular Preloader

Community Beginner ,
Aug 22, 2017 Aug 22, 2017

Copy link to clipboard

Copied

Hi,

I am using Adobe Animate CC 2017 & I've made a Dynamic Circular Preloader by following tutorial from :

Circular Dynamic Preloader Tutorial - Flash CS4 CS5.5 ActionScript 3.0 Website Content Loader - YouT...

but stuck at percent AS3 codes.

here is my .fla file : https://www.dropbox.com/s/mp7murk9ixou7di/DynamicCircularPreloader.fla?dl=0

Dropbox - DynamicCircularPreloader.fla

hoping if someone have a time and take a look whats the faulty on it.

Thank you.

Views

492

Translate

Translate

Report

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

correct answers 1 Correct answer

LEGEND , Aug 22, 2017 Aug 22, 2017

It will be hard to test, because everything loads immediately. If it ends up being a lot bigger FLA then you might see it work.

You would want to gotoAndStop on the loader, not gotoAndPlay. And on complete you want to gotoAndStop on the main timeline. Here's how I think the script should be:

function loadProgress(my_content:ProgressEvent):void {

     var percent:Number = Math.floor( (my_content.bytesLoaded * 100) / my_content.bytesTotal );

     myLoadText.text = percent + "%";

     loader.gotoAndStop

...

Votes

Translate

Translate
LEGEND ,
Aug 22, 2017 Aug 22, 2017

Copy link to clipboard

Copied

LATEST

It will be hard to test, because everything loads immediately. If it ends up being a lot bigger FLA then you might see it work.

You would want to gotoAndStop on the loader, not gotoAndPlay. And on complete you want to gotoAndStop on the main timeline. Here's how I think the script should be:

function loadProgress(my_content:ProgressEvent):void {

     var percent:Number = Math.floor( (my_content.bytesLoaded * 100) / my_content.bytesTotal );

     myLoadText.text = percent + "%";

     loader.gotoAndStop(percent);

}

function loadComplete(e:Event):void {

     gotoAndStop(currentFrame + 1);

}

loaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);

loaderInfo.addEventListener(Event.COMPLETE, loadComplete);

stop();

Votes

Translate

Translate

Report

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