A Flash Developer Resource Site

Results 1 to 12 of 12

Thread: getBytesLoaded and Total

Hybrid View

  1. #1
    Member
    Join Date
    Jul 2007
    Posts
    91

    getBytesLoaded and Total

    Hi,

    I wanna use thise simple scrpt:

    Code:
    if (someLoader.getBytesLoaded >= someLoader.getBytesTotal) {
    element ("Button").show(); {
    } else {
    element ("Button").hide();
    }
    But it doesn't work

  2. #2
    3DFA hobby scripter LewxX²'s Avatar
    Join Date
    Jul 2006
    Location
    Germany, Karlsruhe
    Posts
    198
    You've made a little mistake:

    if (someLoader.getBytesLoaded >= someLoader.getBytesTotal) {
    element ("Button").show(); {
    } else {
    element ("Button").hide();
    }
    sorry for my bad school English
    btw. visit my Page: projects.lewxx.de
    or lewxx.de (<= German)

  3. #3
    Senior Member Zoranan's Avatar
    Join Date
    May 2008
    Posts
    126
    it doesn't usually make a difference, bit try putting () at the end of getBytesTotal and getBytesLoaded. Also, get rid of the extra {

    if (someLoader.getBytesLoaded() >= someLoader.getBytesTotal()) {
    element ("Button").show(); {
    } else {
    element ("Button").hide();
    }

  4. #4
    Member
    Join Date
    Jul 2007
    Posts
    91
    I try do that, but still doesn't work. Meybe attach file help my with this problem. Plz check this file.

    ---

    I need that script for simple gallery (for my friend). I wanna make 30 small picture, and load these images from server, using "Loader" from 3DFA. But in one time, you can see max 15 small picture. For next 15 pictures, must use button 'next page'. And now i got a problem with this button, becose if my friend put only 15 images, then i don't need that button. So, i can hide it. But if he put image nbr. 16, then i wanna show this button, to check next images.

    Btw. Here is my prototype gallery:
    http://photo-passion.galtim.pl/galeria/
    Attached Files Attached Files
    Last edited by 3DH; 06-07-2008 at 11:38 AM.

  5. #5
    Member
    Join Date
    Nov 2007
    Location
    Brazil
    Posts
    47
    I guess that I make what you are looking for.
    Can you programming using the progress script of loaders
    Take a look!
    Attached Files Attached Files
    []'s
    leocavalcante.com

  6. #6
    Member
    Join Date
    Jul 2007
    Posts
    91
    Thx again Leo

  7. #7
    Member
    Join Date
    Jul 2007
    Posts
    91
    This work, but it's very, hm, heavy for processor. That why i don't use this preloaders

  8. #8
    Member
    Join Date
    Nov 2007
    Location
    Brazil
    Posts
    47
    I'm not sure but, is this?!
    Attached Files Attached Files
    []'s
    leocavalcante.com

  9. #9
    Member
    Join Date
    Jul 2007
    Posts
    91
    Unfortunately no. For explane. When i activate progress bar, then i use 80% my processor. And this is only one photo and button! So, if i try use this on normal website, then my web browser crash.

    Btw. When i turn off this progress bar, then i use only 7% my processor.

    Btw2. mr. Kusko, when you do somthing with that bar??

  10. #10
    Senior Member Zoranan's Avatar
    Join Date
    May 2008
    Posts
    126
    That is pretty weird...

    Zoranan

  11. #11
    Member
    Join Date
    Jul 2007
    Posts
    91
    Maybe progress script is wrong? Maybe this script doesn't stop (or delete) when finish loading some file, and that why use more processor? I don't know.

  12. #12
    Senior Member Zoranan's Avatar
    Join Date
    May 2008
    Posts
    126
    try taking your existing progress script, and adding this if statement to it

    if (some_loader.getBytesLoaded() < some_loader.getBytesTotal()){
    //the rest of your progress bar script
    }

    Zoranan

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