Monday, December 17, 2012

Apps 4: Activity on Types of Interaction

بِسْــــــــــــــــــمِ اﷲِالرَّحْمَن اارحِيم


Assalamualaikum w.b.t semua ^_^

Baiklah seperti yang ditulis pada entry lepas, kali ini saya ini menjelaskan proses/steps untuk menghasilkan dan menyiapkan keempat-empat task yang diberikan.

Untuk itu, di sini saya beri link google sites yang menunjukkan aktiviti-aktiviti yang dihasilkan. 

Langkah-langkahnya:

Task 1: Create a multiple choices questions that will provide a correct or incorrect response upon your answer.



Steps:
  1. Name layer as Question.
  2. Choose text tool -->choose static text -->start typing the question
  3. Insert new layer --> name layer as buttons
  4. Create button using oval tool --> drag it on stage --> choose appropriate color--> resize the button
  5. Choose text tool --> Put 'A' on top of the button
  6. Select whole button --> click modify --> convert it to symbol --> name the button as buttonA --> choose button type --> OK 
  7. 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.
  8. Insert new layer --> name as response
  9. Choose text tool -->choose dynamic text --> put response as it variable
  10. Insert another layer --> name it as action --> put action script by right click and choose Actions.
The action script:

stop();
var respon;
respon = " "

   11.  Since the answer is A --> right click -->choose actions --> type in the action script below:

The action script: 

on (release) {
respon = "Congrates, Your answer is correct!";
}

     12. Do the same step for button B, C, 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

Task 2: Create one application that allows users to type an input of question provided.



Steps:
  1. Prepare your background
  2. Choose rectangle tool --> fill it with color --> drag on to the stage
  3. Choose text tool to type in topic Question by make sure it is STATIC TYPE --> name layer as background
  4. Insert new layer --> name as question
  5. Choose text tool --> choose STATIC TYPE --> type in the questions.
  6. Then, select rectangle tool and create box on stage
  7. Select text tool --> preposition it and make sure selecting INPUT TEXT in the properties
  8. Select text tool again --> but now choose DYNAMIC TEXT.
  9. Insert new layer --> name as buttons
  10. From library panel -->choose play button --> drag to stage --> resize the button
  11. Insert new layer and name it as stop
  12. Right click on first keyframe and choose actions.  Type in the action script below.
The action script:

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

(We need to call all of this function so that when user insert an answer, the answer will appear, and when user click enter, var response function will be working and response whether the answer correct or not.

      13.  Select button --> right click --> choose actions.  Type in the action script below.

The action script:

on (release) {if (answer == "print client") {respon = "Correct!";}
else {
respon = "Incorrect, Your answer "+ answer +" is wrong";
}
}

on (release, keyPress "<Enter>") {if (answer == "print client") {respon = "Correct!";}
else {
respon = "Incorrect, Your answer "+ answer +" is wrong";
}
}

    14.  In the INPUT text field --> type in 'answer' for it variable
    15.  In the DYNAMIC text field --> type in 'respon' for it variable
    16.  Control --> test movie --> Done

Task 3: Create Main Menu that contain following actions:
  •   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.

Steps:

  1. Firstly, design the background 
  2. Next, click on the 'Home' button --> go properties --> Type in 'home' in the Instance name field
  3. Repeat step 2 for the other two button, but do change the instance name according to the button name.
  4. Duplicate scene.  To do this, go to window --> Other panels --> Scene -->Rename it from Scene 1 to Scene 2
  5. Now we have 2 Scene.
  6. Select Scene 2 -->Choose text tool --> Type in the description
  7. Do the same as step 6 for Scene 1.
  8. 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. Action script : stop ();
  9. Testing again.  
  10. Before we do that, we insert frame for all the layer (until frame no 15) in Scene 1.  Same goes to Scene 2.
  11. In Scene 2, insert new layer --> name as about --> go to properties --> in the frame field, type 'about'. On the about layer, it shows the name of frame that we type in.
  12. Still in the Scene 2, insert new layer -->name as stop --> right click on the first frame -->choose actions --> Type action script 'stop ();'.
  13. Now, change to Scene 1, right click on the 'About' button -->choose actions. Type in the action script.
The action script:

on (release) {
gotoAndPlay("Scene 2", 1);

}

    14.  Test the movie --> click on the 'about' button, it will show about page.  But when click on the Home button, nothing happen.  It is because we not insert the action script yet.
     15.  To do this, we change from Scene 1 to Scene 2, then we right click the 'Home' button -->choose actions.  Type in the action script.

The action script:

on (release) {
gotoAndStop("Scene 1", 1);

}


    16.  Testing the movies again.  Now try click on the home button and about button.  It will show the pages.
    17.  To activate button 'Contact', in Scene 1 --> right click the contact button -->choose action. Type in the action script.

The action script:

on (release) {
getURL("http://www.pintarbistari.edu.my");

}

    18.  Same goes in Scene 2 --> right click the contact button -->choose action. Type in
             the action script as above.
    19.  Control --> test movie --> Click on the menu button ans see what happen. ^_^  
            Done


Task 4: Based on your own creativity, create a simple flash application that involves drag and drop function.




Steps:
  1. Draw  tree image
  2. Select tree image --> click modify --> convert it to symbol --> name as tree --> choose MOVIE CLIP type --> OK
  3. Insert new layer --> name as apples
  4. Draw an apple image --> select the image --> convert it to symbol --> name as apple1 (apple2, apple3) --> choose MOVIE CLIP -->OK
  5. Since we want to drag the apples on to the tree, then, right click on the apple image --> choose actions. Type in the action script below.
The action script:

on (press) {
startDrag(this, true);
}

on (release) {
stopDrag();
}

    6.  Repeat step 5 and apply to apple2 and apple3.
    7.  Control --> test movie --> Done


Latihan sebegini memberi peluang kepada saya untuk mempelajari pelbagai ilmu baru.  Saya tahu dan faham bagaimana untuk menggunakan action script yang diberikan.
Saya dapati latihan ini sungguh menarik dan tidak membosankan.  Ia membantu dalam memberi lebih kefahaman berbanding dengan hanya teori sahaja.
Flash is INTERESTING!!

Sekian sahaja.
Wassalam ^_^

0 comments:

Post a Comment

Daisypath Happy Birthday tickers