Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

"Play" command not working when published???

Status
Not open for further replies.

propshop

Technical User
Aug 16, 2002
9
US
Help - I know this has to be an easy thing, but I can't seem to get it working.

When viewing my published animation, I want the viewer to be able to hit enter, have the animation play to the point I have it stop, then they hit enter again to start it again - up to the next stop point and so on. I can't seem to get a PLAY command to work on just the enter key.

I'm not sure if I can assign the command to the OBJECTs in the animation, or the FRAME...?

Thanks in advance for any help!
Julie
 
On the first frame of your movie...

Code:
myListener = new Object();
myListener.onKeyDown = function () {
    if(Key.isDown(Key.ENTER)) {
		play();
	} 
}
Key.addListener(myListener);

stop();

Regards,

cubalibre2.gif
 
Thank you THANK YOU. This saves my *** for Monday. And I promise to study why and how your solution worked. I appreciate your help. Cheers! -Julie
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top