1. Typing the questions as static text.
2. Insert a new layer and named it as 'buttons', create a buttons using oval tool for A, B, C and D options.
3. Insert a new layer and named it as 'respon'. Put a dynamic text on the stage and named the variable as 'respon'.
4. Insert a new layer and rename it as action, right click on it and type the action script:
stop( );
var respon;
respon = " "var respon;
5. Right click on the right answer button and type the action script:
on(release){
respon = "Congratulation, your answer is correct!";
}
The example if the user click on A button =) |
6. Right click on the other three button of the wrong answer and type the action script:
on(release){
respon = "Your answer is incorrect.";
}
respon = "Your answer is incorrect.";
}
The example when the user click on the wrong answer |
TASK 2: TEXT ENTRY QUESTIONS
1. Set the background of the questions and name the layer as background.
2. Insert a new layer and name it as question and write the question as a static text.
3. Create a rectangle on the stage. Put the 'input text' on the rectangle. Type in 'answer' for it variable.
4. Put the 'dynamic text' as a respond to user's answer. Type in 'respon' for it variable
5. Insert a new layer and name it as 'button'. Choose 'play button' from the library.
6. Insert a new layer and name it as 'stop'. Right click on the frame 1 and insert the action script:
stop( );var answer;
answer =" "
respon = " "
7. Right click on the play button and insert the action script:
} else {
respon ="Your answer "+answer+" is incorrect.";
}
}
respon ="Your answer "+answer+" is incorrect.";
}
}
on(release,keyPress"<Enter>"){if(answer=="print client"){respon="Correct!";
} else {
} else {
respon ="Your answer "+answer+" is incorrect.";
}
}
The example when the user key in the correct answer.. =) |
The example when the user key in the wrong answer.. =( hehe |
TASK 3: CREATING MAIN MENU
We will learn on how to navigate the button to other pages or website..
1. In my previous entry, I already explain on how to create a button symbol. Lets say we have a homepage like the following;
2. We need to name the 'instance name' for example 'home', 'news' and 'about' for the buttons.
3. Click on 'Window', go to 'other panel' ans go to 'scene'. Duplicate the scene 1 and rename it as scene 2.
4. Right click on frame 1 of button layer, go to 'Action' and type "stop ();".
5. Insert frame by right click on frame 15, and 'Insert frame' for every layer in scene 1 and scene 2.
6. Add a new layer to scene 2 and rename it as 'news'. Rename the 'frame label' too as 'newspage'.
7. Insert a new layer in scene 2 and name it as 'stop' and go to 'Action' and type "stop ();"
8. Right click on news button in scene 1, go to 'Action' and type:
gotoAndPlay ("Scene 2", 1);
}
9. So now, your news button link to scene 2.
10. Go to scene 2, right click on home button go to 'Action' and type:
on(release){
gotoAndStop ("Scene 1", 1);
}
11. We add 'Latest news' button on scene 2, insert keyframe on frame 10 of news layer, named it as 'latestNews' on frame label, and type the text on stage. Dont forget to put the instance name of the latest news button as 'latestButton'.gotoAndStop ("Scene 1", 1);
}
12. Right click on latest news button, go to 'Actions' and type:
on(release){
gotoAndStop ("Scene 2", "lastestNews");
}
13. Go to scene 1, right click on about button, go to 'Actions' and type:
on(release) {
getURL("http://www.one-school.net/");
}
TASK 4 : DRAG AND DROP
on(press) {
startDrag (this, true);
}
on(release) {
stopDrag ( );
}
1. Type the static text on the stage as the question or direction.
2. Insert a new layer and draw / import the tree image. Convert it to 'graphic' type.
3. Repeat the same step for the apple image. Convert it to 'movie clip' type.
4. Right click on the apple and insert the action script:
on(press) {
startDrag (this, true);
}
on(release) {
stopDrag ( );
}
5. Copy and paste the apple in the stage.
Now you can drag the apples to the tree!!! =) |
Alhamdulillah.. at last I've completed the task given..Many things dat I've learned thru the activities, sometimes I'm getting down because I tried so many times but still the application is not functioning well, but failure is not the end...there are no shortcuts to the way of success.. Impossible is just a big word.. Believe in yourself ok!! =) HAPPY TRYING!!
See you in the next entry..daaaa
No comments:
Post a Comment