I want to go from scene 1 to scene 2 after -any- key is pressed.
I looked at the Asteroids & Crusader "Start" buttons and was puzzled. For example the Asteroid game "start" button has an action associated with it (Asteroids w/flash icon) but there is no scene, element, or function named "Asteroids"; so were does it go when the start button is pressed?
About Asteroids "start" button... Game starts by playing first scene and stops.. start button simply continues to play from there ( so it goes to "play game" scene... ) Start button action play "Asteroids" refers to the movie name which is "Asteroids"
"any key" is bit harder... using actionscripting you could add key "down" handler and do anything with it (it gets all keyboard "down" events),.. no problem if you use scripting as "backbone" of you game but simply plugging it in sample game like Asteroids might mess things up..
2) yes something like that, however if you use keyboard element and then add you own key listener what will happen... anyway here is actionscript3 example of keyboard events: http://edutechwiki.unige.ch/en/AS3_e...yboard_control
-- cut down version --
root.stage.addEventListener(KeyboardEvent.KEY_DOWN , keyPressedDown);
private function keyPressedDown(event:KeyboardEvent):void {
trace ("You pressed a key.");
}
---
Scene name is simple what you see it in 3dfa, like "Scene 1" and going to that position should be like this: gotoAndPlay ("Scene 1"); or you could create frame label at wanted position and gotoAndPlay ("framelabel");
However, it seems that framelabels are not registering at the moment and renaming Scenes bugs at least in my computer so I'll go and report bug or two to 3dfa
edit: renaming works when using edit scenes button ( "edit scenes -> rename" )
Unfortunately at the moment 3dfa preview does not handle all action scripting so some scripting only works when exported to flash... in this case flash9 (action script 3 syntax was used.. )
From what I have understood, in near future 3dfa will offer full flash "preview" and debugging and internal preview will be closer to full flash too..
I modified your example little bit to provide some sort of "debugging" in flas as tracing is not directly supported in flash "screen".