-
(what should have been) A simple preloader...
Hey peeps.
I'm trying to create a preloader, but my action script is pants, and it wont work. The preloader consists of a loading bar that extends inside a box until it is fully loaded (like most loady things.) I got all my symbols done an all, but I just cant get it to work.
If someone could post a basic .fla up here I'd be very grateful, because like I said, I always get my actionscripts in the wrong place.
But I suppose a very basic explained step-by-step action script would do...
Peace out.
naM latneM
Everything I say is the truth.
The above statement is a lie.
-
Newbie Forever It Seems
This is a tutorial I learned from it has source file with it
http://www.actionscript.org/tutorial...rs/index.shtml
-
Banned
first create a movie clip, in this clip draw your download bar. create an animation 100 frames long that shows the bar filling up. place this clip on your main timeline. next attach a clip event to the movie clip,
code:--------------------------------------------------------------------------------
onClipEvent(load) {
this.stop();
_root.stop();
}
onClipEvent(enterFrame) {
if (_root.getBytesTotal() > 0) {
loaded = _root.getBytesLoaded();
total = _root.getBytesTotal();
frame = Math.ceil((loaded / total) * 100);
this.gotoAndStop(frame);
if (frame == 100) {
_root.play();
}
}
}
-
thanks all, I got my preloader to work, for now...
THANKS AGAIN!
naM latneM
Everything I say is the truth.
The above statement is a lie.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|