A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: picture slideshow script help!

  1. #1
    Member
    Join Date
    Mar 2003
    Posts
    74

    picture slideshow script help!

    Hi!
    I'm trying to create a picture slideshow for my website in Flash.

    I wanted to have a preloader for each time the user clicks the next button, for the image to load. What i have done is, I've got 3 preloader scenes, and three scenes with an image in each one.

    I hoped that the movie would flow thru the scenes like this

    preloader --> Image --> preloader --> Image etc...

    Anyway im having some trouble with this one and some help would be much apreciated.

    I'l upload the file
    Attached Files Attached Files

  2. #2
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    You can not prevent Flash from loading. It will load all scenes no matter what you do.

    Usually in image galleries and slide shows you just just one scene and one frame. This beacuse you load the images only when needed. So you would have all images ( jpg's ) lying on the server.

    Normally you would have a empty movieclip ( target ) that you load the external images into...

    Movieclip targets are what it sounds like. A empty movieclip placed on the stage just for the purpose of loading a swf file or jpg into it. The advantage is that you can place it anywhere, manually ( as opposed to loading in _levels) .

    Usually you give the movieclip an instance name of container. ( you give a instance name by selecting the empty movieclip on stage and write the name in the Property Panel )

    //To load a external jpg into a target movieclip from a button ( both being on the main timeline ).

    on(release){
    container.loadMovie("myExternalFile.jpg");
    }

    The external jpg's top left corner will place it self where the empty movieclip is.

    Heres an example.( with preloader for the external image ).
    http://www.flashkit.com/movies/Scrip...5958/index.php

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  3. #3
    Member
    Join Date
    Mar 2003
    Posts
    74
    okay i did what you said.

    I'm loaded all my jpegs in swf files and it works. I loaded them all inside an empty movieclip called container.

    The thing is It will only load the first three images and then it goes back to the first.

    In other words i click to the button --> the swf is loaded --> click the button again --> new swf is loaded etc. However whenever i click the button for the 4th time it goes back to the first picture..

    if this helps, heres my button script

    on(release){
    gotoAndPlay(1);


    container.loadMovie("boat1.swf");
    }

    -------------------- then two frames latter its the same script except its boat2.swf

  4. #4
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Seems like you either have forgotten to have a stop action in frame 4 or the timeline is to short.

    To go just one frame at the time you can use...

    this.nextFrame();


    .... instead of play.

    Note that you dont need the images to be in a swf. You can load the jpg's straight into the container clip.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

  5. #5
    Member
    Join Date
    Mar 2003
    Posts
    74
    YAY! it works!

    thanks champ. Yeh i got it working. Funny though, all i did was delete all the unneeded frames and put in that nextframe script


    cheers

  6. #6
    Senior Member pellepiano's Avatar
    Join Date
    Feb 2000
    Location
    Stockholm, Sweden
    Posts
    15,151
    Using nextFrame() Flash will always try to go to the next frame instead of defaulting to the first frame which gotoAndPlay will, unless you have a stop action in the last frame.

    -Pelle Piano
    // Image Gallery
    www.studiobild.com
    // Photo Blog
    http://talesofthepixel.blogspot.com

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