View Full Version : [FMX]Preloading With Ease
Digitalosophy
September 11th, 2003, 04:10 PM
Howdy, wanted to make my preloader move with ease. How could I make my load bar mc move with ease to a percent? Will this make the preloader not accurate? Any ideas or links would be great.
Thanks
Btw here is the code I have
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent*100; // how can I change this to move my loadBar mc with ease?
this.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}
Eric Jr.
September 11th, 2003, 05:10 PM
Change the commented like with this:
var percent = getPercent*100;
this._width += (percent - this._width) / 20;
Digitalosophy
September 11th, 2003, 08:08 PM
thanks.
well now the loader bar in coming in right to left and my percent text box isn't working
had to zip
Digitalosophy
September 12th, 2003, 01:06 AM
hmm got an email saying awligon replied to this thread but I don't see it lol
Eric Jr.
September 12th, 2003, 03:03 AM
lol, anyway, sorry for screwing up the textfield:
Change the line into this:
this.loadText = Math.round(percent)+"%";
Digitalosophy
September 12th, 2003, 03:13 AM
thx eric much appreciated :)
Eric Jr.
September 12th, 2003, 03:20 AM
No problem at all .. (Brooklyn New York huh? Isn't it like 3:20 AM there?)
Digitalosophy
September 12th, 2003, 12:38 PM
lol ya what can i say, i'm a junkie :) na i have this week off so i'm taking full advantage
Eric Jr.
September 12th, 2003, 12:58 PM
LOL, I know I always do .. even if I have to get up at 6 am :| :P
awligon
September 12th, 2003, 10:03 PM
Well.... I did reply with the code I use for preloading to show a status bar and speed etc... but I realized it meant preload using ease instead of easy preloading :P
Digitalosophy
September 13th, 2003, 01:42 AM
haha well thanks anyway, and thanks for clearing that up :)
julianes0
December 21st, 2003, 12:34 AM
???
Digitalosophy
December 21st, 2003, 02:22 PM
Originally posted by julianes0
???
:h:
julianes0
December 22nd, 2003, 01:13 AM
somebody with the FLA finished of the preloader?
Digitalosophy
December 22nd, 2003, 01:05 PM
Originally posted by julianes0
somebody with the FLA finished of the preloader?
if i had it i would, but you really dont need an FLA dude, all the code is right here for you
weiron
December 23rd, 2003, 09:00 AM
Have problem with the code as well !
A fla would be great !
mjULTRA
February 4th, 2004, 04:30 PM
Im trying to use the AS code, but am having difficulties...
bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
var percent = getPercent*100;
this.loadBar._width -= (percent - this.loadBar._width) / 20;
this.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}
this code makes the loadBar move smoothly, however, it shoots way off to the right side of the screen, and that won't fly... im not great at interpretating AS, and i tried to follow the directions in this thread, but apparently, they are not clear enough.... whats the deal??
Also, it makes people like us feel stupid when we ask for help and get met with answers like, "you really dont need a FLA" If we really didn't need a FLA, we probably wouldn't ask for one...
Im still trying to figure this out by trial and error, but im getting really frustrated... :(
EDIT: Boo-yah!!! Found the solution on Actionscript.org...
Smooth Preloader Tutorial for Flash MX and Flash 5: http://www.actionscript.org/tutorials/beginner/Smooth_PreLoader/index.shtml
Powered by vBulletin® Version 4.1.10 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.