A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: Help - Loading multiple external jpg's sequentially or streaming?

  1. #1
    Member
    Join Date
    Jul 2001
    Location
    USA
    Posts
    78

    Help - Loading multiple external jpg's sequentially or streaming?

    Anyone have any idea how to load multiple external jpg's, sequentially or
    streaming?

    I would like the site to work as follows:

    as your viewing the first initial .jpg (the project button has already been
    clicked) others are already being loaded behind the scenes (for that project
    only).

    Here's a direct link to the site I'm currently work on (go to section below
    to see what it is that I'm horribly trying to describe).

    Once your in the site (flash 8 needed and popup blocker disabled) Click
    ENTER >>>>>> go to /Projects, click on any project and then click any one of the numbered swatches. See how there's a lag between each image as they come up. I'd like them all to be loading after you click on that particular project and are viewing the first initial image. Any thoughts or .fla samples I could view.

    LINK:
    http://www.kitchensinkstudios.com/client/kss

    Thanks in advance to all,

    L
    Thanks!
    Leah5569

  2. #2
    Senior Member
    Join Date
    Aug 2001
    Location
    new york
    Posts
    205
    if you put the location of the images to load in an array, you can probably use the for() loop to load them in the background and make the alpha or visibility 0 until needed. The idea is to have them cached.

    Let me know if this works

  3. #3
    Member
    Join Date
    Jul 2001
    Location
    USA
    Posts
    78
    I'm not sure I understand - I mean I know what an array is but am unsure as to how I create that in actionscript. Can you help me out with the actionscript? I'd really appreciate you're help!
    Thanks!
    Leah5569

  4. #4
    Senior Member
    Join Date
    Aug 2001
    Location
    new york
    Posts
    205
    here's an example:

    Code:
    var image_filename:Array = new Array; //create an array object
    //populate array
    image_filename[0] = "project01.jpg";
    image_filename[1] = "project02.jpg";
    image_filename[2] = "project03.jpg";
    
    for (i=0; i<image_filename.length; i++){
       placeholder_mc.loadMovie(image_filename[i]);//load each image to a placeholder mc
    }

  5. #5
    Member
    Join Date
    Jul 2001
    Location
    USA
    Posts
    78
    Thanks! I'll give that a shot and see if I can figure it out.
    Thanks!
    Leah5569

  6. #6
    Member
    Join Date
    Jul 2001
    Location
    USA
    Posts
    78
    Okay, so I can get my images to show up but I think I need to make each image an array and then put all the array's in another array in order to control the alpha of each image. Is that correct or is there an easier way of doing it. This is what i have so far:

    var image_filename:Array = new Array; //create an array object
    //populate array
    image_filename[0] = "linkedimages/freight_10.jpg";
    image_filename[1] = "linkedimages/freight_9.jpg";
    image_filename[2] = "linkedimages/freight_8.jpg";
    image_filename[3] = "linkedimages/freight_7.jpg";
    image_filename[4] = "linkedimages/freight_6.jpg";
    image_filename[5] = "linkedimages/freight_5.jpg";
    image_filename[6] = "linkedimages/freight_4.jpg";
    image_filename[7] = "linkedimages/freight_3.jpg";
    image_filename[8] = "linkedimages/freight_2.jpg";
    image_filename[9] = "linkedimages/freight_1.jpg";

    for (i=0; i<image_filename.length; i++){
    container.loadMovie(image_filename[i]._alpha = 0);//load each image to a placeholder mc
    }
    Thanks!
    Leah5569

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