Skip to main content
Inspiring
Nov 10, 2023 8:25 PM UTC
Answered

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

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 is closed to new replies. Start a new post to keep the conversation going.
kglad
kgladCorrect answer
Community Expert
Nov 10, 2023 8:50 PM UTC

use setInterval or setTimeout

5 replies

kglad
Community Expert
kgladCommunity ExpertCorrect answer
Community Expert
Nov 10, 2023 8:50 PM UTC

use setInterval or setTimeout

Translate
mnarlockAuthor
Inspiring
Nov 10, 2023 9:23 PM UTC
Yep. Tried that. No joy. I'm undoubtedly doing it wrong.

--
Michael J. Narlock
Translate
kglad
Community Expert
Community Expert
Nov 10, 2023 9:45 PM UTC

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

Translate