HOME | DD

Published: 2007-10-23 04:55:50 +0000 UTC; Views: 5297; Favourites: 91; Downloads: 188
Redirect to original
Description
My first official tutorial. Hope it;s actually helpfulThis isn't exactly under my usual theme in this gallery, but I decided Ched was small enough to count XD
I know it's more programming than design oriented, but I think it's important for people to understand what's exactly happening in the actionscript for a change
One note though, the code isn't mine. I based myself on a tutorial I found over the net. Very good code wise, but not very helpful for those who don't know what was happening there
If you have any questions, suggestions or comments don't be afraid to post them bellow. Any feedback is most useful ^^
Source: [link]
Related content
Comments: 59
SFcelebnaur [2011-08-04 23:11:06 +0000 UTC]
Greetings, thank you for the tutorial, it was very useful. :3 Its great having some more advanced flash tutorials that are easy and simple to follow.
I wanted to let you know for the multiple Drag and Drop objects, your red A and B circles don't always center them selves when even directly placed onto the blue A and B. however, lot of of times it does center. I just wanted to make sure you were aware of that, and if they would have the same effect on my animation?
👍: 0 ⏩: 0
evolvd-studios [2010-02-19 22:47:09 +0000 UTC]
Would you like to Join EvolvdStudios Online? Here you can share all your latest flash animations and games, as well as ask questions and watch our new tutorials that will help you on new animating tricks as well as actionscripting faqs (You can also upload your own tutorials, otherwise what would it all be about?). You can also access our newly created ANIMATED SPRITE DATABASE, Here you can download spritepacks from many famous characters, for example, sonic and mario. These are added weekly, but to enjoy all this, all you have to do is this:
CLIC ON THE CLUB BELOW, FIND THE JOIN NOW BUTTON, PRESS IT, AND VOILA!!! UR IN!
!!!JOIN NOW!!!
PS: Had to do a personal invitation scince all our actual invites are now used up >.>
👍: 0 ⏩: 1
MMWoodcock [2010-02-13 20:02:15 +0000 UTC]
when i want the circle to return to its original spot (without slowing the speed) am i supposed to enter the X and Y positions of the circle in the script?
i was able to make the code work for drag and drop and i pasted the code after the first one (like you said, unless i misunderstood) but it only continues to do drag and drop. It does not return to original position.
i've only been using flash for a few months and only know how to do buttons so yeah <<
👍: 0 ⏩: 1
resizer In reply to MMWoodcock [2010-03-01 04:20:47 +0000 UTC]
Better if you check the final section of the tutorial. It shows how the full code looks
I need to redo this anyway
👍: 0 ⏩: 0
Hello-Pebbles [2009-10-18 04:39:26 +0000 UTC]
Erm , may I know is there a way to drag as many copy of that object as I want , just from ONE of that certain object? (:
👍: 0 ⏩: 1
resizer In reply to Hello-Pebbles [2009-11-15 10:29:07 +0000 UTC]
If you mean by clicking on the original (or one of the copies) dragging all of the objects, yes it would be possible but it would involve 2 things
One having all the objects share the same name (obj1, obj2, obj3, etc) and using _root["obj"+i] in a cycle. Two would be having a function that would call all the objects
Hope this makes sense
👍: 0 ⏩: 0
Thezephyr81 [2009-05-16 22:27:13 +0000 UTC]
It didn't work. I have two layers, Actions and Layer 1.
Layer 1 has a circle which has been converted to a movie clip.
Actions has nothing on it except for the code:
circle.onPress = function() {
startDrag(this);
}
circle.onRelease = circle.onReleaseOutside = function () {
stopDrag();
}
👍: 0 ⏩: 2
resizer In reply to Thezephyr81 [2009-05-17 18:30:11 +0000 UTC]
Have you given the instance name 'circle' to the movieclip?
👍: 0 ⏩: 1
Thezephyr81 In reply to resizer [2009-05-17 18:31:30 +0000 UTC]
I didn't xD
I named the layer instead. But I figured that out already.
And the code for it to pop back won't work. :/
👍: 0 ⏩: 1
resizer In reply to Thezephyr81 [2009-05-17 18:42:46 +0000 UTC]
It happens, even to pros
Hm.... it's hard to judge without having a look at the actual file Xp
👍: 0 ⏩: 1
Thezephyr81 In reply to resizer [2009-05-17 19:03:14 +0000 UTC]
Oh well. I gave up anyway. Dx
👍: 0 ⏩: 0
Jtb-X [2009-04-24 23:23:08 +0000 UTC]
Awesome! was looking for this kind of tutorial.. Is it also possible that when you drop the ball into the circle it will launch a picture or something?
👍: 0 ⏩: 1
resizer In reply to Jtb-X [2009-04-25 00:34:54 +0000 UTC]
Sure, you just need to have a flag or a function to trigger that event
👍: 0 ⏩: 0
PrincessTita [2009-03-02 17:15:09 +0000 UTC]
Hey there. Im looking for a parnter on DA who can help with me codes and actionspricts. I have flash mx. I been having such a hard time.
If you can I help out I can send you the files what im doing.
👍: 0 ⏩: 1
resizer In reply to PrincessTita [2009-03-02 21:07:10 +0000 UTC]
Going to be honest with you, I have no free time to go around and teach people beyond the tutorials I do. The best I can do is recommend you to learn more about algorithms and actionscript (there are tons of tutorials out there) and give feedback on the works you produce
Here are some sites for you to start on, just to name a few [link] [link] [link] [link] [link]
Best of luck
👍: 0 ⏩: 0
resizer In reply to RedGryphonArt [2009-02-09 02:09:10 +0000 UTC]
If you use actionscript 2, yes
👍: 0 ⏩: 1
RedGryphonArt In reply to resizer [2009-02-09 03:26:30 +0000 UTC]
Cool. Thank you. It worked btw. Great tutorial.
👍: 0 ⏩: 1
resizer In reply to RedGryphonArt [2009-02-09 03:35:26 +0000 UTC]
Glad to know I could be of help ^^
👍: 0 ⏩: 0
carmiecarmela [2008-08-24 11:17:52 +0000 UTC]
Thanks,very helpful. Do you know how to do this ( the one whre you drag the thing to another thing and i detects it, collision detection) but instead of dragging it with your mouse cursor, can you just move like a movable character and so on so forth? Thanks
👍: 0 ⏩: 1
resizer In reply to carmiecarmela [2008-08-24 21:52:29 +0000 UTC]
You'll have to set up a key listener so every time you press the arrow keys it moves the object along the axis
👍: 0 ⏩: 0
Eva-ve [2008-06-07 23:14:05 +0000 UTC]
this is very, very helpful and i'll make sure to test it. thanks. :>
👍: 0 ⏩: 1
resizer In reply to Eva-ve [2008-06-08 00:24:02 +0000 UTC]
Glad I could be of service ^^
Do tell me if you bump into any problems
👍: 0 ⏩: 1
resizer In reply to Tomochiro [2008-05-25 01:02:49 +0000 UTC]
Yay, it was useful to someone XD
👍: 0 ⏩: 0
Scarabsi [2008-01-11 07:10:18 +0000 UTC]
Hee, if I drag the returning circle a certain way, it starts avoiding my cursor like a repulsed magnet. It's pretty funny, actually, but I really don't think it's supposed to be doing that. . .
Sorry you can't fix it, though. D: You should back up your files. Or burn them onto CDs. Or something. *shrug*
Is there a way I can drag the object with a replacement cursor without putting the object on TOP of the cursor? Right now it will only drag if the replacement cursor is underneath it. . . D: It's not working for the game I wanna make.
👍: 0 ⏩: 1
resizer In reply to Scarabsi [2008-01-11 07:31:48 +0000 UTC]
I thought that was a glitch when using a tablet (doesn't use mouse) Xp
No, that's not the reason I can't fix it. It's because the code isn't originally mine. As I said in the description, I only picked a good tutorial on drag and drop and decided to make it clearer to non-programmers
I don't understand what you mean by replacement cursor
👍: 0 ⏩: 1
Scarabsi In reply to resizer [2008-01-13 20:15:51 +0000 UTC]
Ohhhhhh. o_o;; Okay, then. . . I guess it'd just be a matter of trying to figure out what the code is saying, eh?
Replacement cursor, like when you hide the mouse and draw a symbol (movie clip) that will go where the mouse will go. It's a common trick for programming games. . .? Well, I figured out the problem anyway, so nevermind about that.
👍: 0 ⏩: 1
resizer In reply to Scarabsi [2008-01-16 02:15:23 +0000 UTC]
Yeah. But it's a bit harder when you don't have formal training on it Xp
Ah, I know what it is.... just not by that name
No, I didn't use it here. But am glad you got it fixed X3
👍: 0 ⏩: 1
Scarabsi In reply to resizer [2008-01-17 05:59:11 +0000 UTC]
Yeah, the only reason why I know anything is because I read Flash Programming for Dummies. The teacher gives assignments, and that's just about it. . . *fail* It's a pretty useful book, though, if you haven't read it yet.
👍: 0 ⏩: 1
resizer In reply to Scarabsi [2008-01-17 06:50:58 +0000 UTC]
I had to learn all mine from scratch. None of my teachers knows a ting about flash Xp
I have a pretty awesome book called "Flash MX ActionScript for Fun and Games" and another one that's "Flash MX Game Design Demystified". Even being for MX they're very good flash manuals to have. I highly recommend them
👍: 0 ⏩: 1
posiechan [2007-10-23 20:19:48 +0000 UTC]
great job resizer! i just bought myself flash and this will really help
👍: 0 ⏩: 1
resizer In reply to posiechan [2007-10-23 22:05:03 +0000 UTC]
Yay, can't wait to see the result XD
👍: 0 ⏩: 0
5ft-2-Eyes-of-Blue [2007-10-23 07:22:10 +0000 UTC]
I took a Flash class. It was cool, but the whole coding things made my head spin. I always had to have m prof help me. Props to you for having such a firm grasp on it.
👍: 0 ⏩: 1
resizer In reply to 5ft-2-Eyes-of-Blue [2007-10-23 22:04:41 +0000 UTC]
If I actually had a firm grasp on it I would write code from scratch instead of studying other people's code Xp
I took the computer science course, so it's nothing special for me to decipher code
👍: 0 ⏩: 0
collectable [2007-10-23 05:36:01 +0000 UTC]
I used to have flash but now gone. very well done.
👍: 0 ⏩: 2
resizer In reply to collectable [2007-10-23 22:02:52 +0000 UTC]
Thanks
And out of curiosity, how that happened?
👍: 0 ⏩: 1
collectable In reply to resizer [2007-10-24 05:34:44 +0000 UTC]
Cause i just had the version of the internet i found it for free but we wiped computer and we cant find it anymores
👍: 0 ⏩: 1
resizer In reply to collectable [2007-10-24 07:06:02 +0000 UTC]
Ouch. That's why I always save the downloader file, just in case Xp
Still I know plenty of good sites that can tell you where to find a copy
👍: 0 ⏩: 1
| Next =>