Skip to main content
Known Participant
April 30, 2013
Question

Button Help

I need help writing the code for a button that will switch the current scene.

-I want the button to be activated by the spacebar

-when the button is activated it will automatically switch the scene to another scene playing simoutaenously

-if the button isnt activated after 5 seconds it will dissapear

Could someone give me an example of what this code will look like. I am a beginner to Actionscript with very limited knowledge of coding, I appreciate all help thank you.

Ce sujet a été fermé aux réponses.

1 commentaire

kglad
Community Expert
Community Expert
April 30, 2013

it's not clear what you mean by, "..the button to be activated by the spacebar".

clicking the button (with the mouse) could trigger a scene change or pressing the spacebar could trigger a scene change.

Known Participant
April 30, 2013

Sorry let me make myself clearer.

I want to have a video clip playing and at a specific frame I want a button to appear on the screen, only the spacebar can activate this button nothing else.

When this button is activated it will switch the video clip to another one playing simultaneously.

kglad
Community Expert
Community Expert
April 30, 2013

what purpose does the button serve?  does it need to be clicked?