A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Preload help

  1. #1
    Junior Member
    Join Date
    Mar 2000
    Posts
    5

    Question

    I know how to do the main scene of the preloader, where you have the looping "If Frame Is Loaded" command, but I have a question about scripting to get the actual % loaded.

    I have a movie clip of a small loading animation, but I also want to have a movie clip which will display the % loaded in numbers.

    In that movie clip, I have a text field labeled "percentdisp".

    Then in the first frame, I have the following code:

    Set Variable: "percentdisp" = (_framesloaded/_totalframes)*100 & " % "

    That way, the text field would display the percent (the number of loaded frames divided by the total number of frames), but for whatever reason, it displays 100% as its value no matter how much is loading when I test it as "Show Streaming" and a 56K modem in the testing environment.

    Is there a hole in my script? Please help me out.

    _-bMd-_

  2. #2
    Senior Member Mad-Sci's Avatar
    Join Date
    Mar 2000
    Posts
    2,756

    Lightbulb

    Hi,You can find an example in the movie sec. uder NEW--> BAR Preloader. Everything is explained there. Tell me what you think.
    Mad-sci

  3. #3
    Member
    Join Date
    Feb 2000
    Posts
    34

    Post

    I have this same statement in my preloader, but without the & "%" and it seems to work fine.

    i.e. Set Variable: "percent"= (_framesloaded/_totalframes)*100

    I tried putting in the "%" and even adding more (), but I got the same 100 loaded problem the you got.

    Just go ahead and add an extra text field on the stage for your your % sign and put it next to the output text field.

    Hope that helps if you haven't already figured it out.


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