dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: (what should have been) A simple preloader...

  1. #1
    The village idiot
    Join Date
    Jan 2003
    Location
    UK!!
    Posts
    81

    (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.

  2. #2
    Newbie Forever It Seems Dar's Avatar
    Join Date
    Aug 2002
    Location
    Columbus,OH
    Posts
    218
    This is a tutorial I learned from it has source file with it

    http://www.actionscript.org/tutorial...rs/index.shtml
    USING MX

  3. #3
    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();
    }
    }
    }

  4. #4
    The village idiot
    Join Date
    Jan 2003
    Location
    UK!!
    Posts
    81
    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
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center