Skip to main content
Inspiring
November 10, 2023
Answered

AS3 HTML5 - Play, Stop, Pause, Play HELP!

  • November 10, 2023
  • 1 reply
  • 563 views

Here's my scenario. I have a button that has AS3 attached that tells it on mouseclick to play a movie clip. The movie clip plays from frame 1 - 15. On frame 15 there is a this.stop(). When it's hit again, the movie clip plays from frame 16-30. The first 1-15 frames of the movie clip is a tween that fades the object up...and the latter half fades it down. 

 

What I'm struggling with is I'd like the movie clip to continue playing after X seconds in case no one has pressed the button a second time and I don't know how. Essentially, after X seconds, fade the movie clips down. 

 

As I indicated, I have an Actions layer associated with each buttons that tells them what to do, then Actions layer on the movie clips that have stops at frame 1 and 15 with tweens for fading up and down.

This topic has been closed for replies.
Correct answer kglad

use setInterval or setTimeout

1 reply

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
November 10, 2023

use setInterval or setTimeout

mnarlockAuthor
Inspiring
November 10, 2023
Yep. Tried that. No joy. I'm undoubtedly doing it wrong.

--
Michael J. Narlock
kglad
Community Expert
Community Expert
November 10, 2023

what code did you use that failed? (don't post all your code, just the relevant part.)