|
||||||||||||||
. . . . . |
Flash 5 and MX - Drag and Drop Learning Interactions
Open Flash MX Pro Create a "Dynamic Text" field and call the var "answer1". This is where you will get the feedback whether the choice is right or wrong. Chop up the various sections of the drawing and make each section a MovieClip.
I used guides to ease the process. I called the bow "bow_mc" and named the instance "bow.
Repeat the process for the other sections of the boat. (stern, port, starboard, midships) Click on the "draggers" layer and with the Text tool write "bow" , then hit "f8" to turn it into a MovieClip.
Call it bowtext_mc and name the instance bowtext, for example. Go to the "Edit Symbols" button and select
"bowtext_mc" in order to edit this movieclip. Add another layer to this movie and call it "button". You will be creating a transparent button
that has only a "hit area". First lock the text layer then click on the "button" layer,
and drag a rectangle around the text "bow". Select the rectangle and hit "f8" and create a Button.
Call it "bowtext_btn". Go to "edit Symbols" - bowtext_btn to edit the bowtext button. Go back to "Edit Symbols" - "bowtext_mc" and click on the button. Open the Actions window
and put this code into the window :
on(press) {
startDrag(this);
_root.answer1="";
}
on(release) {
stopDrag();
if (this._droptarget == "/bow") {
_root.answer1="Correct";
}
else{
_root.answer1 = "wrong";
}
}
Repeat for the other draggables but change the line :
if (this._droptarget == "/bow") {
to:
if (this._droptarget == "/stern") {
etc etc
Flash Tutorials in Video Format -
Watch them now at LearnFlash.com _droptarget(from Flash MX Pro Help docs) _droptarget is a Property of a movieClip and returns the absolute path in slash syntax notation of the movie clip
instance on which the MovieClip was dropped. Its usage is as follows :
if(eval(this._droptarget) == _root.bow) {
Did you recently purchase Photoshop? The web is a great place to find Chicago Photoshop training. You can also use the net to find classes on other subjects like Dreamweaver training and InDesign training. Addendum - 15th September, 2003 How to respond if user gets all them right
Go onto the next tutorial about Drag and drop to outline shapes. Flash 8 update for drag and drop |
|
||||||||||||
|
. | Home | Flash MX | Actionscript 2.0 | Flash 3D | Flash 8 | Flash Database | Flash Mobile | Flash CS3 | Java For Kids | Video Course | General Video | Photoshop | Web Design | Digital Photography | Games | free backgrounds | Resume | Streaming Video | Students Work | Links | Contact me | sitemap | reviews | . . |
||||||||||||||