CREATING SIMPLE DRAG AND DROP APPLICATION USING STARTDRAG, STOPDRAG AND HITTESTOBJECT METHODS

One of the most popular functionality always you can find or notice in kids educational flash games & applications, That is pickup the things from one place and drop it to another place. Even I was also used same functionality in many kids e-learning applications and games in my e-learning work experience. But how does it works with flash ActionScript. Did you know.

Let’s see…, How!
See below, I have illustrated a simple example application.
Yes…! I know the graphics is poor, but my aim is showing you how it works. 🙂

You can drag the ducks to one pool to another pool.


Setup the MOUSE_DOWN and MOUSE_UP events to the all duck MovieClips.

[as3]
// Contain the duck movieclips into the array;
ducks = new Array(duck1,duck2,duck3);

// Assign events to the ducks MovieClips
for(var i:Number=0; iSource Code [dragndrop.zip]

0 replies

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply

Your email address will not be published. Required fields are marked *