Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
1

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

Contributor ,
Nov 10, 2023 Nov 10, 2023

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.

TOPICS
ActionScript , Code , How to
609
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Nov 10, 2023 Nov 10, 2023

use setInterval or setTimeout

Translate
Community Expert ,
Nov 10, 2023 Nov 10, 2023

use setInterval or setTimeout

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 10, 2023 Nov 10, 2023
Yep. Tried that. No joy. I'm undoubtedly doing it wrong.

--
Michael J. Narlock
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 10, 2023 Nov 10, 2023

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Nov 13, 2023 Nov 13, 2023

I don't know how or why, but the precise code I used on Friday that didn't work, suddenly works as expected on Monday morning. I guess it just needed the weekend to get itself together!

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Nov 13, 2023 Nov 13, 2023
LATEST

thanks for the update.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines