Best way to dynamically load jpegs?

Ask a Question related to Macromedia Flash, Design and Development.

  1. #1

    Default Best way to dynamically load jpegs?

    I am new to Flash and actionscript and just getting my feet wet
    learning how to put the pieces together. I would like to dynamically
    load series of jpegs and loop through them at, say, 1 every half
    second. When the last one is shown, then it should go back to the
    beginning and continue. I tried the following:

    - created a blank movie clip on a layer and called it "imageHolder_mc"
    - created a function called loadImage() that loads the jpeg by calling
    the loadMovie flash function, giving it the name of imageHolder_mc for
    the the location of where to load the jpeg into.
    - called the setInterval flash function like this:
    setInterval(loadMovie,1000)
    so a loadMovie function will be called every second and thus the new
    image will be loaded.

    The result is that the jpegs do load and loop, but as my function is
    always loading the images from the disk, there is a slight delay
    between images loading which causes it to flash unacceptably. How
    could I load the images only once and have a smooth transition from
    one to the other? Can I create a time line with one movie clip per
    frame, and call the loadMovie function on each of the frames?

    Any suggestions appreciated.

    Thanks,
    Marcus
    Marcus Guest

  2. Similar Questions and Discussions

    1. Load Image Dynamically
      Hi, brothers :) I'm rather novice in this area. I mean web programming and control building and though. I create UserControl: public class...
    2. Dynamically load of 3d models
      Hi! I'm about to create a larger realtime 3d project. I havn't completely decided on which technology to use, but my first choice is director....
    3. Can CSS file load dynamically?
      We have a large application. In our design, we make the whole application as one mxml application, and the other modules are the mxml components to...
    4. How can I dynamically load pictures with loading graphic?
      I have worked with flash for a few simple websites, but I know very little actionscript. I want to design a site very similar to this one:...
    5. Dynamically load an ASP Page
      I'm pretty new to ASP.Net (server side) Suppose that I have an instance of an ASP Page class, and I want the client's web browser to load it. I...
  3. #2

    Default Re: Best way to dynamically load jpegs?

    On Fri, 03 Oct 2003 22:25:54 -0700, Marcus wrote:
    > The result is that the jpegs do load and loop, but as my function is
    > always loading the images from the disk, there is a slight delay between
    > images loading which causes it to flash unacceptably. How could I load the
    does Flash MX glitch when you load an image dynamically ?

    I have Flash 5 and I've been thinking of upgrading... all my dynamic image
    loading is done on server scripts: it's fast and reliable.

    - n
    Niel Drummond Guest

  4. #3

    Default Re: Best way to dynamically load jpegs?

    What I would do (or what I have done) is to load each image to seperate
    movieclips, and after loading start the slide show. You're asking buch
    of questions here and it would take a lot to tell all the details.
    However, how it works in theory is that all the movieclips are in same
    coordinates, and only the one on the top is visible (using the _visible
    -property of movieclip). When displaying second image, I set _visible of
    second image to true and current image to _false. This I would loop,
    always swapping to the next image in row and when reached to last image,
    swap it with first image and so on. Transitions could be built for
    example fading the alpha of previous image to 0%, or using another
    movieclip as mask for nice animations. I'm sorry for not supplying
    actual code, but I have developed it as a part of commercial product. I
    can however give some guidance and main ideas, but I suggest you to work
    on this base or finding free working slideshows from the web.

    Mikko



    Marcus wrote:
    > I am new to Flash and actionscript and just getting my feet wet
    > learning how to put the pieces together. I would like to dynamically
    > load series of jpegs and loop through them at, say, 1 every half
    > second. When the last one is shown, then it should go back to the
    > beginning and continue. I tried the following:
    >
    > - created a blank movie clip on a layer and called it "imageHolder_mc"
    > - created a function called loadImage() that loads the jpeg by calling
    > the loadMovie flash function, giving it the name of imageHolder_mc for
    > the the location of where to load the jpeg into.
    > - called the setInterval flash function like this:
    > setInterval(loadMovie,1000)
    > so a loadMovie function will be called every second and thus the new
    > image will be loaded.
    >
    > The result is that the jpegs do load and loop, but as my function is
    > always loading the images from the disk, there is a slight delay
    > between images loading which causes it to flash unacceptably. How
    > could I load the images only once and have a smooth transition from
    > one to the other? Can I create a time line with one movie clip per
    > frame, and call the loadMovie function on each of the frames?
    >
    > Any suggestions appreciated.
    >
    > Thanks,
    > Marcus
    Mikko Toivola Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139