A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: sample preloaders

  1. #1
    Member
    Join Date
    Oct 2001
    Posts
    75

    sample preloaders

    this is for version 4.5
    of the sample preloaders,
    the only one that works is the
    loading squares.
    when i try to open the others
    to use them,
    an error message appears saying the
    following:

    Function 'erase' not found in Script
    on line 9 this.erase()
    1 errors found

    this one is from the loading bar,
    but the message appears for the others as
    well. the line number varies.

    can someone supply me with the correct
    script for the loading bar in version
    4.5?


    also , this version doesnt have a
    percentage loader. does anyone have
    one that works in 4.5 they would be
    willing to share?

    thanx.
    -leb.

  2. #2
    Senior Member kusco's Avatar
    Join Date
    Nov 2001
    Posts
    681

    Try this one...

    Hello leb,

    I've just put this one together. It has a percentage as well as the bar. It uses a mask and a paint object to provide the loader effect. Please let me know if you have any issues with this.

    Also, I have submitted your observations of the .erase() issue as an undocumented feature of 3DFA.
    Attached Files Attached Files
    Cheers,
    kusco
    (3DFA Support Team)

  3. #3
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    I prefer to scale my bar using percentage of loaded.

    Here's one I was about to do a tutorial on.
    Attached Files Attached Files

  4. #4
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    oops wrong one....

    Same idea though. here is the correct one for the up coming tutorial. (who knows maybe I'll use both)
    Attached Files Attached Files

  5. #5
    Member
    Join Date
    Oct 2001
    Posts
    75
    thanx folks,
    they r awesome.
    i will try them out.

  6. #6
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    A percentage loader is VERY easy to do. The script is just
    code:

    percentage = getBytesLoaded() / getBytesTotal() * 100;
    ptext="Loading "+toString (int(percentage))+"%"
    bar.scale.x=percentage



    what I do is move the center point of a graphic to one end and it will grow from there to it's original size.

  7. #7
    Member
    Join Date
    Oct 2001
    Posts
    75
    bret, when i use ur script, i get
    the following:
    'scale' is not a property of Null:'Undefined variable' on line 3 bar.scale.x=percentage
    Cannot assign property 'x' to undefined variable on line 3 bar.scale.x=percentage
    2 errors found

  8. #8
    Member
    Join Date
    Oct 2001
    Posts
    75
    never mind, i got it to work. i also stumbled on using the edit box way which is very easy als0.
    thnx again.

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