| Home | Tutorials | Forums | Articles | Blogs | Movies | Library | Employment | Press | Buy templates |
|
|
#1 |
|
Registered User
Join Date: Jan 2001
Location: Cincinnati, Ohio, USA
Posts: 43
|
Ok, I am new to ActionScripting so this is probably something stupid I am doing wrong. I did the Drag n Drop tutorial, but when I add the _droptarget command, the StopDrag stops working. The startDrag and stopDrag work fine by themselves, but as soon as I add a _droptarget, the object I am dragging sticks to the mouse until you click again, instead of stopDragging on release as specified.
Any help? on (press) { startDrag (this, true); } on (release) { stopDrag (); if (this._droptarget == "/target") { _root.target.gotoAndPlay(2); } } Thanks in Advance |
|
|
|
|
|
#2 |
|
Administrator
Join Date: Nov 2000
Location: Australia
Posts: 8,612
|
There's nothing wrong with that code (that I can see). Assuming your target clip is called "target" (instance name), and it lives on the main stage, it should work fine....
Cheers Jesse
__________________
Cheers Jesse Stratford ActionScript.org Cofounder Email: presented in this way to stop spam-bots: My email is composed of my first name (jesse) followed by my last name (stratford) followed by @ followed by actionscript.org Please don't email or PM me Flash questions, that's what the Forums are for! ![]() Please don't rely on me reading my PMs either. Email me about important stuff. |
|
|
|
|
|
|
|
|
#3 |
|
Registered User
Join Date: Jan 2001
Location: Cincinnati, Ohio, USA
Posts: 43
|
The drop action works if I can get the thing off my mouse, but it still sticks, requiring an extra click (or 2 or 3) to get the MC to quit dragging.... could it be a bug?
|
|
|
|
|
|
#4 |
|
Administrator
Join Date: Nov 2000
Location: Australia
Posts: 8,612
|
It's not likely to be an error in your code but I got my example working fine so it aint a bug either. Does you button have any other On events on it? That could be confusing things...
Cheers Jesse
__________________
Cheers Jesse Stratford ActionScript.org Cofounder Email: presented in this way to stop spam-bots: My email is composed of my first name (jesse) followed by my last name (stratford) followed by @ followed by actionscript.org Please don't email or PM me Flash questions, that's what the Forums are for! ![]() Please don't rely on me reading my PMs either. Email me about important stuff. |
|
|
|
|
|
#5 |
|
New Member
Join Date: Jan 2001
Posts: 245
|
If you drag outside the movie area this can often happen. Do you have constraints on the drag action?
mgb |
|
|
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Drag and Drop Problem - Answer is always wrong | ladyjbd3155 | ActionScript 2.0 | 3 | 07-20-2006 07:12 PM |
| XMheLl (Xml) problem.. looks like nothing is wrong but yet it won't push to arrays | ukspudnie | ActionScript 2.0 | 0 | 05-12-2006 01:48 AM |
| function went wrong....very wrong. | omega10mg | ActionScript 1.0 (and below) | 2 | 02-19-2004 12:51 AM |
| Using if..esle to test variables | pinkaboo | ActionScript 1.0 (and below) | 2 | 06-27-2003 02:13 AM |
| Droptargets: what am I doing wrong? | DigiScript | ActionScript 1.0 (and below) | 0 | 01-16-2001 05:28 PM |