Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Drag and Drop Tutorial in Flash Actionscript 3 (Part 3 of 3)

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
6,726
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on May 19, 2010

Learn how to write object oriented drag and drop Actionscript 3 code in Adobe Flash. The video takes you through the entire process from scratch, using a shopping trolley as an example. Covers external classes, event detection, drop target detection and much much more!

This is Part 3 of 3.

Category:

Education

Tags:

License:

Standard YouTube License

  • likes, 0 dislikes

Link to this comment:

Share to:

Uploader Comments (DNDigital)

  • I dont generally reply to videos on YouTube, but i just wanted to thank you for the effort and time you put into making this video, this is just what i was looking for and has helped me more than you can imagine! Thank you so much!

  • @Choshy Hi Choshy - I'm glad you took the time, it's always great to receive feedback - especially of the positive kind. Glad it helped you and keep coding!

  • OMG dude I loved your drag and drop videos amazing work

    I was searching a lot of videos for something like this and yours was by far the best

  • @GhostRyley Hi GhostRyley - congratulations on the first comment in 2012 and Happy New Year! Thanks for the positive response and happy coding!

Video Responses

see all

All Comments (59)

Sign In or Sign Up now to post a comment!
  • Thak you so much!

  • @swissrudiment I'll try to help you along. In DraggableShirt, just above the other 'protected var', put 'protected static var dropCount:uint = 0;'. The 'static' keyword means that this variable belongs to the class, rather than an instance, so it is shared between all the white/black/whatever t-shirts you might have. In the droptarget if-statement, you can increase the dropCount (dropCount++;) and use it for positioning (ie. x = dropCount * 10;). Hope that helps, enjoy and happy coding!

  • @DNDigital So I experimented with your Math series tutorial-Positioning and Centering (another great tut)- to get a better grip on object x, y placement. However, my novice skills keep me from constructing a code for tracking of other dropped items via a protected (or public) static variable. If you have or could suggest a resource that would help I'd be happy to see it. Otherwise I'm willing to pay for the expertise. Having great fun seeing my ideas come alive! Thanks

  • @swissrudiment In the droptarget if-statement you can adjust the x position of the dropped clips and use width and height for relative alignment. The y-position calc does something similar already. If you wanted you could keep track of other dropped items via a protected (or public) static variable in the DraggableShirt class - this would be shared with all draggable instances and hence you could account for previously dropped items when calculating the position. The world is your oyster...

  • @swissrudiment Many thanks for your kind comments - I'm glad it's been useful to you! You might have tried it already but if not, switching the video quality to 720p should hopefully make even the punctuation legible. Enjoy coding and welcome to AS3!

  • 1 more thing...how can I manipulate the placement of the dropped items at the bottom of the screen. My inteaction has students dropping lab report icons into a folder. Ideally, I'd like them to line up in a row along the bottom of the stage with an slight overlap (the alpha overlap adds a cool effect) or no overlap( edge to edge) would also be fine. Thanks again!!

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more