all groups > flash actionscript > april 2006 >
You're in the

flash actionscript

group:

on (keyPress "<Enter>") --PLZ check


") --PLZ check -- flash actionscript ">
on (keyPress "<Enter>") --PLZ check digitalnoob
4/1/2006 10:28:40 PM
flash actionscript:
Hi,

For some reason, I can't get the published SWF to advance to the target frame
called 'enter name'

On frame 1, I have an invisible button with the following code attached:

on (keyPress "<Enter>") {
gotoAndPlay ("enter name");
}

Any help would be greatly appreciated.

Cheers

Re: on (keyPress "<Enter>") --PLZ check abeall
4/2/2006 2:06:50 AM
Re: on (keyPress "<Enter>") --PLZ check digitalnoob
4/2/2006 2:50:02 AM
Hi,

Thanks for your reply.

I know that pressing the Enter key can advance the SWF ehen testing the movie
within Flash.

The issue is that the published SWF (even with Flash closed down) does not
advance to the target frame.

In order to avoid the Enter key altogether, I have switched it to use the
space bar instead:

on (keyPress "<Space>") {
gotoAndPlay ("enter name");
}

However, it doesn't advance.

Any ideas?

Cheers!
Re: on (keyPress "<Enter>") --PLZ check kglad
4/2/2006 2:54:21 AM
is that code attached to a true button or a movieclip button? if it's a true
button, is the button on the timeline you want to advance and does that
timeline have a frame with label "enter name"? if it's a moviecilp button is
it the movieclip's timeline that you want to advance?
Re: on (keyPress "<Enter>") --PLZ check digitalnoob
4/5/2006 2:36:55 AM
Hi,

Sorry to take couple days to get back to you. Thanks very much for your
replies.

[quoted text, click to view]
-----> the code is attached to a true button

[quoted text, click to view]
does that timeline have a frame with label "enter name"?
------> the button is on the first frame which is the frame the user needs to
press ENTER on.

The only way this could be fixed was to make a keylistener on the a.s. layer.
It now works but I am still puzzled. Oh well, there's good and then there's
good enough ;)

cheers
Re: on (keyPress "<Enter>") --PLZ check ntoo
7/29/2006 3:50:07 PM
I just had the on (keyPress "<Enter>") problem occur in mx2004 after weeks of
the 2 buttons that use <Enter> working correctly.

As an educational experiment I added a loader component to the fla to learn a
bit about components. Pressing <Enter> stopped working while on (release)
continued to work correctly in the fla, swf and exe . I deleted the component
and the btns worked again.

The loader component is, as far as I can see, totally unrelated to the btns.
The btns and loader were in different movie symbols, frames and layers. Can
anyone point me in the right direction to find out how the loader affected the
btns?
Re: on (keyPress "<Enter>") --PLZ check kglad
7/29/2006 5:48:46 PM
Re: on (keyPress "<Enter>") --PLZ check ntoo
7/31/2006 12:00:00 AM
AddThis Social Bookmark Button