A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: multiple jpgs preloader

  1. #1
    Senior Member olias32's Avatar
    Join Date
    Jan 2003
    Location
    Romania
    Posts
    126

    multiple jpgs preloader

    ok here's my problem
    i have built a viewer for a number of jpgs. the jpgs are not embeded, they are loaded at runtime.

    what i want to do:
    i want each thumbnail to appear after the corresponding large jpg has been loaded into memory and be available for clicking.

    the structure:
    one empty MC for the large JPG
    one small MC with another MC (invisible) and a button inside.

    the small MC loads the large jpg inside it (in the invisble MC) and onEnterFrame checks to see how much of the jpg is loaded (using getbytesloaded). when done, it duplicates itself and this new copy does the same thing and so on (based on an array of files in the root frame)

    the loading of the large jpg in the invisible MC is done so that the JPG will (hopefully!) be loaded into memory, and when i call it again (to be displayed in the large empty MC on stage), it will show right away.
    if this is wrong, please correct me

    Ive done this so people can start clicking on the thumbnails as soon as they're loaded (instead of having to wait for all the pictures).

    The issue: while loading, if i click on a button inside a MC that already loaded its jpg, it takes a very long time to load the jpg. It seems it loads it again (not using the one in memory).

    Does this make any sense?
    Please help

  2. #2
    Senior Member olias32's Avatar
    Join Date
    Jan 2003
    Location
    Romania
    Posts
    126
    i will submit the fla if you want

  3. #3
    Senior Member olias32's Avatar
    Join Date
    Jan 2003
    Location
    Romania
    Posts
    126
    ok here's a possible solution (the idea of it, as i dont know how to approach it)

    while loading, the large jpgs load correctly into each small MC. can i take these jpg from there and place them inside the large "viewer" MC? instead of loading them from the server again?

    kind of loading them into the library
    10x

  4. #4
    Senior Member olias32's Avatar
    Join Date
    Jan 2003
    Location
    Romania
    Posts
    126
    got it.
    the problem was offline. once put online, it worked like it was supposed to. so for anyone trying to acheive this result, this is the way to go - the loaded jpg will stay in memory and therefore will be displayed in an instant.

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