Be a Supporter!

Loader Animation help.

  • 223 Views
  • 4 Replies
New Topic Respond to this Topic
nmb910
nmb910
  • Member since: Jul. 7, 2009
  • Offline.
Forum Stats
Member
Level 07
Blank Slate
Loader Animation help. 2011-04-03 18:32:37 Reply

I'm trying to get an animation on a movie clip to play when you press enter. But for some reason it goes to the next frame on the scene instead of the movie clip.

A noob problem, I know.

FLA: http://www.newgrounds.com/dump/item/60fa bb8c55b700d85d613d193038a77a

MichaelJ
MichaelJ
  • Member since: Mar. 2, 2009
  • Offline.
Forum Stats
Member
Level 18
Voice Actor
Response to Loader Animation help. 2011-04-03 18:52:47 Reply

You have to give the movie clip an instance name (to do so, click the movie clip, and to go properties) and then in the script of the button you have to tell it to make the movie clip play.
EX: - if you named the movie clip "stickman" (it's instance name), put this in the play button's code:

on(press){
_root.stickman.play();
}

BBS Signature
nmb910
nmb910
  • Member since: Jul. 7, 2009
  • Offline.
Forum Stats
Member
Level 07
Blank Slate
Response to Loader Animation help. 2011-04-03 20:52:58 Reply

At 4/3/11 06:52 PM, Animator1mike wrote:

on(press){
_root.stickman.play();
}

Did you even look at the FLA?

angryshroom
angryshroom
  • Member since: May. 14, 2010
  • Offline.
Forum Stats
Member
Level 03
Programmer
Response to Loader Animation help. 2011-04-03 22:52:26 Reply

Its a not-so-well known fact that when running "Test Movie" (Ctrl+Enter) that that window, although a standalone flash player, is launched through Flash, and has some extra features including hot keys.

Enter is the hot key for next frame in the main timeline, so its not recommended to use at all for testing.

You'll notice that if you upload the .swf and try it out in-browser, it'll work just fine. Again, its just a hot key thats built into the Flash Player when running it through Flash.

To put it simply you have three options:
1. Don't use the Enter key, use something else.
2. Only test in-browser (which you'll have to write a template html document with the .swf embedded of course, then open the document instead of using Ctrl+Enter to test it).
3. Don't use Ctrl+Enter to test, instead Publish it then run it on the regular standalone version of Flash Player you have by double clicking the .swf

To be honest, I'd go with the first one. The Enter key is pretty cumbersome to press during anything anyway :/


Perfectly PO'ed.

BBS Signature
nmb910
nmb910
  • Member since: Jul. 7, 2009
  • Offline.
Forum Stats
Member
Level 07
Blank Slate
Response to Loader Animation help. 2011-04-04 07:21:26 Reply

Yeah, I noticed that, so i changed the key, and tried it out, still didn't play the animation. D: