Professional Web Applications Themes

Automatic Slide Show - Adobe Flash, Flex & Director

Hi there Flash Guru's!! I got this from a tutorial and it works great. It flips through a folder of images and they fade out one at a time. The problem is that I want it to automatically play (and continue to play forever) when the movie starts. But this code tells it to play if you press a button. i don't want it to be on a button press but automatic. What can I do?? Please see attached code... Thanks for all your help! square._alpha=0; // set movie clip called square to transparent i.e. alpha=0 mypic=1; // mypic is ...

  1. #1

    Default Automatic Slide Show

    Hi there Flash Guru's!!

    I got this from a tutorial and it works great. It flips through a folder of images and they fade out one at a time. The problem is that I want it to automatically play (and continue to play forever) when the movie starts. But this code tells it to play if you press a button. i don't want it to be on a button press but automatic.

    What can I do??
    Please see attached code...

    Thanks for all your help!
    square._alpha=0; // set movie clip called square to transparent i.e. alpha=0

    mypic=1; // mypic is a variable we will use to count the images in the show
    _root.onEnterFrame = function() // _root main movie timeline, when movie starts call function
    {
    if (square._alpha <10) // if square movie contains image with less than 10% transparency
    {
    loadMovie("bm images/bm"+mypic+".jpg", "square") // load image1.jpg into movie square
    fadeOut=false; // image is not fading out
    fadeIn=true; // image fade In is set to true
    }
    if (square._alpha > 10 && fadeOut)
    { square._alpha -= 10; // if fading fade movie = movie ? 10% alpha until faded out
    }
    if (square._alpha < 100 && fadeIn && !fadeOut) // if image is fading and not Out
    {
    square._alpha += 10; // increment fade in 10% until completely faded in i.e. 100% alpha
    }
    else // if image is not fading in or out i.e. has loaded then do not fade in the image
    {
    fadeIn=false;
    }
    }





    autoforward.onPress=function()

    {autoAdvance();
    setInterval(autoAdvance, 5000) // calls function autoAdvance every 5000 milliseconds
    }

    function autoAdvance()
    {
    if (mypic <= 10 && !fadeIn && !fadeOut)

    {
    fadeout=true;
    mypic++;
    }
    if (mypic > 10) // must not be >= or will stop at 10
    { mypic=1;
    }
    }


    mimpoz123 webforumsuser@macromedia.com Guest

  2. #2

    Default Re: Automatic Slide Show

    I'm trying to do the same thing for a banner that will play the slides. Did the code at the bottom do the trick?
    belbs Guest

  3. #3

    Default Re: Automatic Slide Show

    I'm also working with this tutorial script, I'm new to Flash MX - I
    want to make a button that when pressed, goes to slide 1 and stops
    autoplaying. I have the button, but the action code I'm using doesn't
    work. It goes to slide 1, but it doesn't stop. I also tried just plain
    stop() instead of gotoAndStop, but that didn't work either.

    stopplay.onPress = function()
    {
    if (mypic > 1 && !fadeIn && !fadeOut)
    {
    fadeOut=false;
    mypic=1
    gotoAndStop(1);
    }
    }
    jen1234 Guest

Similar Threads

  1. Me Again. Need help on slide show
    By Robin in forum Web Design
    Replies: 3
    Last Post: April 6th, 12:09 AM
  2. Slide Show
    By Dustin Rupe in forum Macromedia Flash Actionscript
    Replies: 10
    Last Post: February 23rd, 03:53 PM
  3. Slide show on DVD
    By Bendik Engebretsen in forum Photography
    Replies: 10
    Last Post: September 23rd, 04:06 AM
  4. please, help me with a slide show
    By mashafurman webforumsuser@macromedia.com in forum Macromedia Flash Sitedesign
    Replies: 0
    Last Post: August 30th, 10:11 PM
  5. PDF Slide Show
    By Howard Funk in forum Adobe Photoshop 7, CS, CS2 & CS3
    Replies: 2
    Last Post: August 5th, 10:27 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not 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