PDA

View Full Version : a very basic question



Adbul
March 4th, 2007, 02:40 PM
what i want to do is this:


next_btn.onRelease or Key.ENTER.onRelease= function() {
_root.nextFrame();
};


i know this doesnt work, but how do i do it?

thanks

Adbul

sogj
March 4th, 2007, 03:17 PM
what i want to do is this:


next_btn.onRelease or Key.ENTER.onRelease= function() {
_root.nextFrame();
};


i know this doesnt work, but how do i do it?

thanks

Adbul

If that's your actual code "or" is || but I don't know how you would make that into a single statement. (That doesn't mean it can't be done. I'm new.)

Adbul
March 5th, 2007, 03:05 AM
i dont even know how to make something happen on the release of a key. i know

if (Key.isDown(Key.ENTER)) {
_root.nextFrame
}

but i want it to change on the release.

also, i would like these two to be one statement if possible.

Icy Penguin
March 5th, 2007, 03:19 AM
just make the or into an equals sign

Adbul
March 5th, 2007, 10:29 AM
ok thanks, but it still doesnt work.

apparently .onRelease doessnt work for keys.
what do you use then?