dcsimg
A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: [Resolved] Load jpg, wait 3sec. and change jpg

  1. #1
    Junior Member
    Join Date
    Aug 2002
    Posts
    21
    I am trying to make a slide show, that loads a picture and stay for 3 seconds and change picture. My question is if anyone know how to make it with action script.
    Thanks

  2. #2
    Flash Kit Moderator Genesis F5's Avatar
    Join Date
    Jan 2002
    Location
    Unallocated memory
    Posts
    1,845
    It depends... are you loading this from off your server, or will they be stored in flash and in a movie clip on different frames? If that is the case, do this:


    Code:
    onClipEvent(load){timerr=getTimer()+3000}
    onClipEvent(enterFrame){
    if(getTimer()>timerr){
    _root.slideshowclip.nextFrame()
    _root.timerr=getTimer()+3000}
    }


    -hope this is what you were looking for... If not, I will try to find an alternative route..

    I'm figuring though that what you really want is to load pictures from your server or what not... And I'm not too familiar with loading variables from sources outside of flash. I would guess you would use the loadvariable() or something, and then import it into a new Graphic Clip or Movie Clip or something.

    -genesis f5




  3. #3
    Junior Member
    Join Date
    Aug 2002
    Posts
    21
    Thanks, but I am trying to make it out of the server, out of the flash file and loading the picture. Can I do that

  4. #4
    Senior Member
    Join Date
    Jun 2001
    Posts
    190
    Originally posted by granvecchio
    Thanks, but I am trying to make it out of the server, out of the flash file and loading the picture. Can I do that
    are you trying to have it where all you have is a bunch o pics which are dynamically loaded and also you can change the number of pics by updating a single text file instead of recompiling the flash movie?
    basically a movie that scrolls through a series of pictures?

  5. #5
    Junior Member
    Join Date
    Aug 2002
    Posts
    21
    Exactly, I am trying to load a pic01, wait couple of seconds unload and load pic02. I want to do it dynamically
    Thanks

  6. #6
    Senior Member
    Join Date
    Jun 2001
    Posts
    190
    i have one that dynamically loads them on click of a button, they pull the control from an XML file. So really to add more pics all you do is add more lines in your xml file. And in your case all you have to do, is have a loop in the movie that loads a new pic instead of loading it on click. All you need to do is take the command that is on (release) and extend your timeline and put it at the end of your timeline. Does that make any sense? Email me ill send it to you, zeetaher@hotmail.com

  7. #7
    sorry to interrupt this topic,
    but i have a related question...
    when u load these jpgs dynamically is it possible to have a preloader for each image? and how would you do that

  8. #8
    Member of the Flashist Party
    Join Date
    Nov 2001
    Posts
    146
    Yes, I've done that.

    I developed a picture holder MC.

    Inside this MC, I have the following, more or less:

    On frame one I have nothing but a stop action. (A button on the main timeline will tell which picture it is, and will have a goto Frame 2 of this timeline action in it as well.

    On frame two, I have the action that loads the picture into an empty holderMC based on the variable that the button passed. I set the holder visible to false.

    On frame three I check the bytes loaded v. bytes total, I have my preloader MC on the stage, and an if statement that if (loaded=== total && total >0), goto frame 5.

    On frame 4, I have a goto frame 3 action.

    On frame 5 I set the holderMC visible to true, thus revealing the picture.

    I hope this makes sense.


  9. #9
    Junior Member
    Join Date
    Apr 2001
    Posts
    1

    this sounds like it

    this sounds extremely similar to what I want to do as well (I just want it on a cd vs being on a server).

    Zee - I emailed you as well...can you hook me up with the same file??

    Thanks a million.

    God bless Flashkit!

    Church

  10. #10
    doesnt sound too bad
    ill give it a go
    thanks mate

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