Question 7:
What is the actionscript in flash to solve these following situations:
a. To link from one frame to another frame in the same scene in file
b. To link from one scene to another scene in the same file
c. To link one flash file with another flash file
d. To link flash file with any webpage


Answer:

a. To link from one frame to another frame in the same scene in file
On (release){
            gotoAndPlay( );
}
 -->put frame no or frame label in the bracket

b. To link from one scene to another scene in the same file

On (release){
            gotoAndPlay("Scene 2", 1);
}
-->put scene name in " " & frame no (for example 1 is frame no in scene 2)

c. To link one flash file with another flash file
on (release) {
loadMovieNum (“flash file name”, level number);

}
-->put file name in " " & level no
-->flash file must be .swf

d. To link flash file with any webpage

On (release){

            getURL("http://www.lescopaque.com ");
}
-->put the url of the website in bracket
DRAG N DROP APPLICATION

1. Open a file
2. Draw a tree by using pen/line tool
3. Name the layer as tree
4. Color the tree
5. Select the tree -->right click-->convert to symbol-->movie clip-->name it as tree
6. Insert a new layer-->name as fruit-->Draw a fruit by using shape tool-->color it
7. Select the fruit -->right click-->convert to symbol-->movie clip-->named it as fruit
8. Right click at tree shape-->chose action
9. Type action script code :

on (press) {

startDrag(this,true)

}

on(release){

stopDrag();

}

10. Close action window
11. Do step 8 for the fruit
12.Repeat step 6-7 to create another 4-5 fruits.
13. Repeat step 11 to insert action script to all fruits
14. ctrl+enter to test the movie
15. Save the file
click on the image to see the exercise

TEXT ENTRY QUESTION

Steps:

1. Open a new file
2. Draw a background
3. Type a topic question by using text tool-->choose as static text type
4. Named the layer as bg
5. Insert a  new layer-->named it as question
6. In this layer,use text tool-->type the question-->choose as static text type
7. Create a box  at the stage by using rectangle shape
8. Select text tool-->put the text above the box-->choose as input text type
9. Select text tool--->choose as dynamic text type (Below the box)
10. Insert new layer-->named it as button
11. In this layer,drag a play button from library panel to the stage-->resize as u want
12. Insert another new layer-->named it as stop
13. Right click at the first keyframe-->choose action-->Type this action script:

stop( );
var answer;
var respon;
answer = ""
respon = ""

14. Close action window
15. Select the button-->choose action-->Type this action script:

 on (release) { if (answer == "print client") {respon = "Your answer is correct!";

} else {

respon = "Sorry..Your answer "+ answer +" is wrong. Try again.";

}

}

on (release, keyPress "<Enter>") {

if (answer == "print client") {respon = "You're correct!";

} else {

respon = "Sorry..Your answer "+ answer +" is wrong. Try again.";

}

}

16. Close the window
17. In input text field,type answer for it variable
18. In dynamic text field,type respon for it variable
19. ctrl+enter to test the movie
20. Save the file
 
click on the image to see the exercise

APPS 4: mcq

10:39 AM | 0 Comments

APPS 4: TYPES OF INTERACTION

MULTIPLE CHOICE QUESTION

Steps:

1. Open a new file
2. Named layer 1 as question
3. Click text tool-->choose static text-->type the question
4. Insert new layer-->named as button
5. Create circle shape by using oval tool-->colored it-->resize it
6. Type A on top of the button
7. Select whole button-->modify-->convert to symbol-->named it-->choose button-->OK
8. Repeat step 5-7 to create button B, C and D
9. Arrange the button
10. Type the four answers.
11. Insert new layer-->named as respon
12. Put dynamic text-->type respon as variable
13. Insert another new layer-->named as action
14. Right click-->choose action-->type the action script:

stop();
var respon;
respon=""

15. Right click at the correct answer-->choose action-->type the action script:

 On (release){

            respon = "Congrates. Your answer is correct";

}

16. Close action window.
17. Right click at the wrong answer-->choose action-->type the action script:

on(release){

            respon = "Sorry. Your answer is incorrect";

}

18. Close action window.
19. Repeat step 17-18 for the next two button (wrong answer)
20. ctrl+enter to test the movie
21. Save the file
 
click on the image to see the exercise

About