PDA

View Full Version : Flash preload bars...


Newbiezkid
07-12-2009, 02:24 PM
Hello all... my name in Dimitri and I have recently become very interested in flash... I would just like to tell you all on my first post that I promise to stay active...

Anyway, I made my first working progress bar but doesn't really work the way I want it to... My current action script stretch the progress bar till it reaches it's original size... What I'm looking for is some kind actionscript that acts as a kind of layer mask that reveals the progress done... If that makes any sense...

If it is important to know... it's a dot progress bar which expands from the center... not left to right...

loadlearn
07-12-2009, 02:34 PM
Attach or provide a link to your .fla.

Newbiezkid
07-12-2009, 02:54 PM
hmmm.... I only have winrar... not winzip...

This is my actionscript though...

bytes_loaded = Math.round(this.getBytesLoaded());
bytes_total = Math.round(this.getBytesTotal());
getPercent = bytes_loaded/bytes_total;
this.loadBar._width = getPercent*368;
this.loadText = Math.round(getPercent*100)+"%";
if (bytes_loaded == bytes_total) {
this.gotoAndPlay(3);
}

followed by

this.gotoAndPlay(1);

heres piccy http://i26.tinypic.com/6xvr45.png

finaiized
07-12-2009, 03:14 PM
As far as I know, WinRAR can zip files as well. You could also use the free 7-zip, at http://www.7-zip.org/

loadlearn
07-12-2009, 03:57 PM
Or upload the .fla to www.rapidshare.com and provide the link to download it.

Newbiezkid
07-13-2009, 07:28 AM
http://rapidshare.com/files/255237751/math.rar.html

TastyTeo
07-13-2009, 11:54 AM
Well, rapidshare sucks balls... you need to wait and it haves limited downloads.. Try uploading on sendspace.com or uppit.com.
And if you want to make a preloader without a bar, and only shows the percentage you should see this tutorial: http://www.youtube.com/watch?v=d-WTIGCf0w4
It is very good... and don't forget to add an instance name to your dynamic text field where the percentage shows: percen1

TastyTeo
07-13-2009, 12:00 PM
em sorry not the instance name, but the variable

Newbiezkid
07-13-2009, 11:20 PM
Well, rapidshare sucks balls... you need to wait and it haves limited downloads.. Try uploading on sendspace.com or uppit.com.
And if you want to make a preloader without a bar, and only shows the percentage you should see this tutorial: http://www.youtube.com/watch?v=d-WTIGCf0w4
It is very good... and don't forget to add an instance name to your dynamic text field where the percentage shows: percen1

Thats not what I want... I want a progress bar that doesn't stretch out... it reveals itself...

finaiized
07-15-2009, 04:02 AM
I guess you can create a bar than takes the loaded percentage and add it to a bar's alpha value.

Newbiezkid
07-17-2009, 10:59 AM
Yeah... thats exactly what i want but I don't have a clue how to do it

Newbie101
07-21-2009, 03:03 PM
I have a preloader in the game I am making. Here is he script I have for it.

onClipEvent (enterFrame) {
loaderc = _root.getBytesLoaded();
loadert = _root.getBytesTotal();
_root.per = Math.floor(loaderc/loadert*100)+"%";
this._xscale = Math.floor(loaderc/loadert*100);
if (loaderc == loadert) {
_root.gotoAndStop(2);
}
}


It is very similar. It also has a 100% thing, tells you how much percent is loaded. This is AS2. Just make a dynamic text that has a variable of _root.per, and make a bar with some color in it and then make it movieclip and name it preloader. Works for me.

loadlearn
07-22-2009, 01:00 AM
This what you want?

http://rapidshare.com/files/258540642/cormath.fla.html

Newbiezkid
08-08-2009, 10:24 AM
Still havn't managed to fix the problem...

TastyTeo
12-01-2009, 12:06 PM
Dimitri? Ow, my name is Theofilaktos xD

Ullallulloo
12-03-2009, 05:37 PM
I understand what you want is it to show the first few pixels of an image at 1%, the next few at 2%, the next few at 3%, and so on and so forth.

I have no idea how to do this, but I don't that the has anything to do with the alpha...

EDIT: Well, I guess that one way would be to put another image over it and scale that one down...