CLICK HERE FOR A LIVE DEMONSTRATION OF THE TUTORIAL
On this tutorial we show how to start the drag through an event listener. The event listener will fire a function that starts the drag, stops the listener for mouse down and starts waiting for release.
DOWNLOAD THE TUTORIAL TO YOUR HARD DRIVE
Here is the Code!!
// Circle Flash Drag and Drop
// by Avraham Saltoun solutions at say-web dot com
// FREE to use, copy and Distribute.
//It all starts with an Event Listener
Circle_mc.addEventListener(MouseEvent.MOUSE_DOWN, Drag);
/*
The _mc enables CODE HINTING for Movie Clip
(The drop down with suggestions)
When the mouse button is clicked the compiler
will look and go for the Drag function */
function Drag (e:MouseEvent): void {
// The e represents the value beign recieved
// void is good practice to state no value
// will be return. Would work without it!
Circle_mc.startDrag();
Circle_mc.removeEventListener(MouseEvent.MOUSE_DOWN,Drag);
Circle_mc.addEventListener(MouseEvent.MOUSE_UP, Drop);
}
function Drop (e:MouseEvent):void
// Let’s copy and paste
// This will release the circle
// from the mouse!
{
Circle_mc.stopDrag();
Circle_mc.removeEventListener(MouseEvent.MOUSE_UP,Drop);
Circle_mc.addEventListener(MouseEvent.MOUSE_DOWN, Drag); }
// Thanks for Watching !!!!






70 Responses to “ActionScript 3.0 Lesson 13: Flash Drag and Drop”
Trackbacks/Pingbacks
Tumblr article…
I saw a writer writing about this on Tumblr and it linked to…
…For further Information click here…
[...]Excellent blog here! Also your site so much up fast![...]…
ab346368@gmail.com…
A friend told me I needed to read this article, so here I am. I found this to be interesting and well-written. It’s very good….
ab346368@gmail.com…
Your article has inspired me. It’s interesting, thoughtful, compelling and well-written. You are a very talented writer with great skills and original thoughts. Your viewpoints match mine in many ways….
ab346368@gmail.com…
This topic usually doesn’t interest me, but you have managed to write this article in a unique manner. It’s not boring and I read the whole thing without stopping once….
click to know…
Intivar Review…
ab346368@gmail.com…
I’m honestly impressed by the information you have used in your article. I just happened to find your article and I’m glad. Your points are valid and the information is easy to read and understand….
ab346368@gmail.com…
Thank you for submitting this article. This is information I have been looking for. I’ve been hoping to find clear and concise content like yours. Your unique points helped me think about this information differently….
ab346368@gmail.com…
I agree with a lot of the points you bring up in this article. Your passion for this subject and the way you describe it is very interesting. Great job….
ab346368@gmail.com…
Great stuff, would love further information about this though…
…Visitor recommendations…
[...]Very efficiently written information. It is going to be priceless to anyone who usess it, including myself. Keep up the good work � for sure i will check out more posts.[...]…
ab346368@gmail.com…
When I started reading your article, I figured this would be the same old boring content I had been reading. I was completely wrong. Your article made this topic more clear in an interesting way….
ab346368@gmail.com…
I have been reading a lot on this topic lately, but your info is great. You have written your article in a most unique manner….
ab346368@gmail.com…
It’s not uncommon for an article with this much information to become confusing, but your content is clear. I can relate to many of the points contained in this material….
ab346368@gmail.com…
I think you did an awesome job explaining it. Sure beats having to research it on my own. Thanks…
ab346368@gmail.com…
Your articles are always of great quality, and I thoroughly enjoyed this one particularly. I do hope you continue to create more writings. Thank you!…
ab346368@gmail.com…
{Beautiful and Unique Oak Furniture hand built from solid Oak Wood….
Title…
Rats that was weird. I just wrote an extremely detailed response but after I clicked submit my comment didn’t show up. Sigh well I’m not writing all that again. Anyways, just wanted to say cool blog!…
Title…
Wow, I’m so happy that I landed on this site, great info here! Better than http://facebook.com!…
Title…
Ugh, I just typed a huge comment, but it disappeared when I hit send. Anyway, I’m not going to redo it again, so I just wanted to say nice blog! Better than http://facebook.com!
…