It is easy
Make a rectangle on frame 1 and write something like "start game" on it. Then make sure the rectangle is selected and turn it into a symbol by pressing F8. Choose "button" in behavior and name it "startButton", then click "ok". Now click on your button a couple of times on the screen so that the timeline changes into four states called "up, over, down and hit. Choose the one called "down" and insert a keyframe using F6. Then change the color of the button or whatever you wanna change, but change something about its look. After that look in the property inspector of the button and give it an instance name of
QUOTE
startButton
. Then go back to scene 1 (look in the top where it says "scene 1 - Button). When you are back in scene 1, then mark frame 1 and use F9 to open the actionscript panel. Type in this code:
CODE
startButton.onRelease = function() {
gotoAndStop(10);
}
Then insert a keyframe on frame 10 and make a Question. Insert four new buttons, who goes to different or the same keyframe depending on the users answer. So the code might look like this for a button which has the correct answer:
CODE
correctAnswerButton1.onRelease = function() {
gotoAndStop(20);
}
on frame 20, you then insert some text or happy animations telling the user that the answer was correct.
And if the user clicks the button with a wrong answer, the code for the button might look like this:
CODE
wrongAnswerButton.onRelease = function() {
gotoAndStop(30);
}
On frame 30 you then insert a keyframe, and write a text or whatever, telling that the answer was wrong.
Just make sure all the code is written in the actionscript panel, who says frame-actionscript and NOT button-actionscript.
This post has been edited by copenhagen: 23 Apr, 2008 - 09:15 AM