Copy link to clipboard
Copied
Hi,
I am using Adobe Animate CC 2017 & I've made a Dynamic Circular Preloader by following tutorial from :
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.
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
...Copy link to clipboard
Copied
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();