Learning Activity 4 : Types of Interaction
Question 1: Multiple Choice Question
Apa itu types of interaction? Selalunya interaction ini kita guna untuk buat aktiviti seperti tutorial, latihan dan soalan2 yang memerlukan user untuk menjawab. Sebenarnya aktiviti ini merupakan cara yang paling sesuai untuk mendapat feedback atau maklum balas terhadap kefahaman atau respon kepada ape yang kita paparkan.
Untuk aktiviti kali ini saya akan buat aplikasi yang melibatkan user menjawab multiple choice question, input question, create interface menu dan Drag & Drop.
Question 1: Multiple Choice Question
Step for create MCQ:
- Name layer as Question.
- Choose text tool > choose static text > start typing the question
- Insert new layer > name layer as buttons
- Create button using oval tool >drag it on stage >choose appropriate color-->resize the button
- Choose text tool > Put 'A' on top of the button
- Select whole button > click modify > convert it to symbol > name the button as button A > choose button type > OK
- Same goes to others 3 button (buttonB,buttonC,buttonD) > choose appropriate color and resize each button (same size as buttonA) > convert all the buttons to symbol and choose button type.
- Insert new layer > name as respon.
- Choose text tool > choose dynamic text > put respon as it variable
- Insert another layer > name as action > put action script by right click and choose actions.The action script:
stop();
var respon;
respon = " "11. Since the answer is C > right click > choose actions > type in the action script below:
The action script:
12. Do the same step for buttonA,B and D (repeat right click > choose actions > type in the action script > just edit the respon according what you want it to be.
13. Control > test movie > done.
on(release){
respon = "Congrats your answer is correct!";
}
12. Do the same step for buttonA,B and D (repeat right click > choose actions > type in the action script > just edit the respon according what you want it to be.
13. Control > test movie > done.
Question 2: Input Question
Steps to create input text question:
- Create layer as Background and design your background by follow your desire.
- Create another layer as Question and type your question here.
- In this layer, draw a rectangle and name as input text (this is where you type the answer), there are properties you must set, at variable box, please name it as 'Answer'.
- Create dynamic text below the input text, here is to put the result after your type the answer. Variable must be name as 'respon'
- Create your play button and put below action script;
}
else
Question 3: Menu
Steps to create menu:
What we want to create.
getURL ("http://marvelkids.marvel.com/games/play/78/ultimate_spider-man_iron_spider");
}
3. Remove other button from Scene 1 and left 2 buttons (Setting Button and Home Button) to navigate to Scene 1.
gotoAndStop ("Scene 1",1);
}
gotoAndStop ("Scene 2", "choosePlayer");
}
startDrag(this,true);
}
on(release){
stopDrag ();
}
{
respon = "Incorrect!. Your answer "+answer+" is incorrect." ;
}
}
on(release, keyPress "") { if(answer == "usb port"){respon = "Correct!";
} else {
respon = "Incorrect!. Your answer "+answer+" is incorrect." ;
}
}
respon = "Incorrect!. Your answer "+answer+" is incorrect." ;
}
}
on(release, keyPress "") { if(answer == "usb port"){respon = "Correct!";
} else {
respon = "Incorrect!. Your answer "+answer+" is incorrect." ;
}
}
Now play your movie (Control>Test Movie)
Question 3: Menu
Steps to create menu:
What we want to create.
- A button that navigate from 1 page to another.
- A button that navigate from 1 scene to particular frame of different scene.
- A button that navigate users to other webpage.
Scene 1
- Create the background layer and design the background.
- Create layer stop and write below action script;
3. Create new layer and name it as button layer. Here you need to create 3 different buttons that are have different functions.
- Home - Is the home button after we jump to another scene.
- Setting - this button will jump to another scene.
on(release){
gotoAndPlay ("Scene 2",1);
}
on(release){gotoAndPlay ("Scene 2",1);
}
- Play Games - this button will jump to the website.
getURL ("http://marvelkids.marvel.com/games/play/78/ultimate_spider-man_iron_spider");
}
Scene 2
- Duplicate Scene 1 to Scene 2 (Windows > Other Panel > Scene)
- Test the movie. Here we can see that the description that we create are keep repeating non-stop. Hence, we insert action script at the button frame.
stop ();
3. Remove other button from Scene 1 and left 2 buttons (Setting Button and Home Button) to navigate to Scene 1.
- Home Button - action script
gotoAndStop ("Scene 1",1);
}
4. Create another layer and name it as button layer and create/name it as Choose Player button. Type below action script:
on (release){gotoAndStop ("Scene 2", "choosePlayer");
}
Scene 2 is scene and choose player is frame number/name
5. At layer setting, insert a keyframe at frame no 7. Label the first frame with settingPage while the second frame name it as choosePlayer
Now play your movie (Control>Test Movie)
- It is simple application.
- You need to create tree in tree layer, apple fruit is place on apple layer, and type the instruction by using static text on background layer.
- That's three pieces of apple is a symbol in the form of movie clip.
- Just click on the apple tu, enter this script action to all apple,
startDrag(this,true);
}
on(release){
stopDrag ();
}
0 comments:
Post a Comment