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
::17052012::

APPS 4: TYPES OF INTERACTION


CREATING MAIN MENU

Steps:

1. Open a new file
2. Create 3 buttons: MAIN PAGE, UPIN & IPIN , WEB
3. In button layer, drag the three buttons into stage
4. Click at MAIN PAGE button--> go to properties-->type the instance name
5. Repeat the step to the UPIN & IPIN and WEB button
6. Go to Window-->other panel-->scene
7. at scene window-->click duplicate scene
8. Double click at scene copy 1-->rename it as scene 2
9. @scene 2, insert upin & ipin image
10. @scene 1, insert upin & ipin’s text banner
11. At button layer -->right click at 1st frame-->choose action-->Type stop();
12. Click at 15th frame-->Insert frame to all layers
13. Repeat step 12 to scene 2
14. @scene 2-->insert new layer-->named as upin
15. At properties panel-->named the frame label as upin
16. Insert new layer-->named it as stop-->right click at 1st frame-->choose action-->Type stop ();
17. @scene 1-->click at upin & ipin button-->choose action-->type command:

On (release){

            gotoAndPlay("Scene 2", 1);

}

18.close action window.

19.@scene 2-->click at main page button-->choose action-->type command:

on(release){

            gotoAndPlay("Scene 1", 1);

}

20. Close action window.
21. Test the movie
22. @scene 2-->Create a new button-->name as members
23. Click on frame 10-->press F6-->named as kawanupin on frame label
24. Insert a picture of upin & ipin members
25. Click members button-->type the instance name for this button
26.@scene 2-->click at members button--> choose action-->type command:

 on(release){

            gotoAndStop ("Scene 2", "kawanupin");

}

27.close action window.
28.test the movie
29.@scene 1-->click at about button-->choose action-->type command:

On (release){

            getURL("http://www.lescopaque.com ");

}

30. Close action window.
31. Copy the coding and paste to news button in scene 2.
32. Save the file

 
click on the image to see the output

Animated upin.....
Juz took previous upin n animated him....


Steps:
1.Open a file. (use previous upin drawn b4)
2.Insert keyframe at 5th.Adjust his mouth a little bit
3.Insert keyframe at 10th. Repeat step 2 and make the mouth smaller. At the same frame, adjust the eye. Just make the eye become 1 line.
4.Adjust his hand.
5. To make it smooth (xnampak ulang yg sama je), repeat the steps (copy paste the frame) and adjust the mouth/eye/hand(ikut creativity)
6.ctrl+enter to test the movie
7.Save file.


This week, we have many tasks:

1st Task : Create an animated bouncing ball

2nd Task : Shape tweening (text --> shape)

3rd Task : animation using motion guide (semut merah cari gula)

**************************************************************

Below are the step by step completing the task.

1st Task : Create an animated bouncing ball

The steps:

1. Open new file
2. Select shape tool n choose oval..
3. Draw a circle. you can draw a real ball n color it using paint bucket tool
4. Select the ball-->right click-->convert to symbol-->choose graphic-->named it as ball-->click OK
5.Click at frame 10,then right click-->insert keyframe/ press F6
6.At frame 10, change ball position
7.Then, at frame 20, right click-->insert keyframe/ press F6 n again change the ball position..
8. Repeat step 7 until frame 60 (its up 2 u).
*U can change the ball size n color
9.Select the layer-->right click at the frame area( all frame in this layer will be highlighted-->choose create motion tween
10.Press ctrl+enter to test the movie
11. Dont forget to save your file :)



2nd Task : Shape Tweening (transform from text to shape)

1.Open new file
2. Use text tool then type a text e.g i typed “diyana”
3. Break apart the text twice/ press ctrl+B
4. Right click at frame 20-->insert keyframe/ press F6
5.Right click at frame 60-->insert keyframe/ press F6
6. At frame 60, delete text then draw a star
**can choose insert blank keyframe, means at frame 60, it will be blank.
7. Between frame 20-60, choose tween="shape" at properties.
8.Press ctrl+enter to test the movie
9. Dont forget to save your file :)

3rd Task : animation using motion guide (semut merah cari gula)

1.Open new file
2.Draw a background of underground and named the layer as bg
3.Insert new layer--> named it as ant
4.Draw an ant using shape tool. Select the ant-->right click-->convert to symbol-->choose movie clip-->named it as semut-->click OK
5.Click at frame 60-->insert keyframe
6.Drag the ant to the new position.
7.Click layer ant-->click motion guide
8.Click pencil tool-->choose smooth
9. Draw 'laluan semut'
10. Click at the frame between frame 1 to 60-->Create Motion Tween
11.At properties-->tweening-->click orient to path
12. ctrl+enter to test the movie
13. Save the file



About