loop 3 times, then Replay button

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

  1. #1

    Default loop 3 times, then Replay button

    Just went through David Stiller's excellent tutorial on how to
    [url]http://www.quip.net/blog/2006/flash/how-to-loop-three-times[/url], however the ad
    spec I have requires it to loop 3 times, then display a "replay" button - can't
    seemt to get the two to cooperate. using AS2, by the way.

    Torbot Guest

  2. Similar Questions and Discussions

    1. Automatic replay
      I have created some files using v8.0. I have 2 questions: 1) how can I set up a file to automatically loop to the beginning and play continuously?...
    2. FLV streaming replay
      I am using the generic Macromedia FLV player. Has anyone found a work around to not being able to replay a video once it plays thru the end? The...
    3. replay
      i want to know witch script make the button that i choose to replay my flash movie
    4. Loop Button in Slideshow
      I have a slideshow in my project and I want to use a loop button, so when this button is active, a specific number of frames loops, and when the...
    5. windowtype cause flash replay
      I use window("mywindow").windowtype=8, it cause the flash which in the window to replay. I don't know what cause this. but I am sure it do well...
  3. #2

    Default Re: loop 3 times, then Replay button

    You'll need to set the button up to clear the counter variable so that it
    appears to the script that it's the first time the playhead has entered the
    frame with David's useful little script.

    my_btn.onRelease = function() {
    loopCount:Number = 0;
    this._parent.gotoAndPlay(1);
    };

    aniebel Guest

  4. #3

    Default Re: loop 3 times, then Replay button

    thanks for the reply! I actually figured out a different (although probably
    less efficient) way to do it. I put David's script just before the replay
    button and set it up like this:

    stop();
    gotoAndPlay(1);

    if (!loopCount) {
    var loopCount:Number = 0;
    }
    loopCount++;
    if (loopCount >= 3) {
    this.gotoAndPlay(359);
    }

    this was placed at frame 358, with the button placed at 359, so after it
    looped 3 times it continued on to 359, showed the button and stopped the movie
    there. again, not the most elegant but it did the job :grin;

    Torbot 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