Monday 7 January 2013

Reflection: Week 15


Reflection Week 15

Assalamualaikum


Minggu ini merupakan kelas yang terakhir buat kami pada semester ini. Kami semua dikehendaki memulangkan iPad serta Wacon yang pinjam sebelum ini. X best sgt sbb saya x dapat gunakan lg iPad huhuhu.. Apps 1,2,3,4 sangat membantu saya dalam pembelajaran Adobe Flash selama ini. Kalau minggu lepas,saya belajar Drag and Drop tetapi kelas pada hari ini belajar untuk menandakan betul sekiranya pelajar meletakkan jawapan di tempat yang betul.


Antara langkah-langkah untuk membuat drag and drop adalah seperti berikut:

1. Create the circle and rectangle on the left side and convert it to movie clip symbols. While create two rectangles on the right side and convert it to movie clip symbols. Next create Next button symbols.  

2. Draw a rectangle in the first frame of the movie clip.

3. Then add stop action script on the frame.

4. Add a keyframe in frame 2 by press F6 and add stop action script on the frame.

5. Add also a red line  on the rectangle in frame 2 in the movie clip timeline.

6. Go back to your scene (Scene 1).

7. Open your library and drag place movie clip into the stage (in response layer). Rename the instance as box 1.

8. Drag place movie clip into the stage for the second time (in response layer). Rename the instance as box 2.

9. Create a movie clip symbol and draw a rectangle and name it as rec. Create another movie clip symbol and name it as circle.

10. Drag both movie clips on the stage (in the same layer).

11. In layer 5, insert stop action script.

12. Click at circle symbol in circle layer and add the following actionscript:

Actionscript behind the circle:

on(press){
startDrag(this);
}
on(release){
stopDrag();
if((this._x>=* lowest value for x in the box*)&(this._x<=*the highest value for x)&(this._y>=*the lowest value for y)&(this._y<=*the highest value for y))
{
_root.box1.gotoAndStop (2);
}else{
_root.box1.gotoAndStop (1);
this._x=*the origin of x-default location*;
this._y=*the origin of y*;
}
}

13. Click at rec symbol in circle layer and add the following action script:

Actionscript behind the rectangle:

on(press){
startDrag(this);
}
on(release){
stopDrag();
if((this._x>=* lowest value for x in the box*)&(this._x<=*the highest value for x)&(this._y>=*the lowest value for y)&(this._y<=*the highest value for y))
{
_root.box1.gotoAndStop (2);
}else{
_root.box1.gotoAndStop (1);
this._x=*the origin of x-default location*;
this._y=*the origin of y*;
}
}


14. Repeat it for the rectangle.

15. Save your file and test the movie.





Berikut merupakan paparan skrin bagi drag and drop tersebut:







Paparan ini menunjukkan tanda betul apabila circle diletakkan di tempat yang betul.




Paparan ini pula menunjukkan tanda betul apabila rectangle diletakkan di tempat yang betul.



Akhir sekali, anda boleh cuba dan lihat drag and drop ini di dalam google site saya nadeeya.






No comments:

Post a Comment