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

Jump to frame to create a sort of loop

Guest
Feb 10, 2014 Feb 10, 2014

Hello and thanks for reading.

I'm currently having this problem: I'm making a flash game that includes talking interactions between the playable character and NPCs. What I want is a way to get the NPC to blink every once in a while if the player remains in the same screen.

In other words, I want to create a sort of 'loop', for example, in frames 1-5, with the character blinking during frames 4 and 5. I've already asignated buttons so that the player can get out of the 'loop', but I'm having trouble in getting from frame 5 back to frame 1. At first, I used

gotoAndPlay(1);

but it just kept crashing, until an error telling me to use onClipEvent popped up. I decided to try it, not really knowing how to in this particular case, and of course it didn't work. So basically, I'm out of ideas, since I know only the basics of AS 2.

Any help would be appreciated.

TOPICS
ActionScript
411
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
LEGEND ,
Feb 10, 2014 Feb 10, 2014
LATEST

Create the blinking activity as a separate movieclip and tell it to play thru whenever you wish to have a blink occur.  You could use a timing mechanism such as setInterval or setTimeout to tell that movieclip to play periodically.

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