|
#1
|
|||
|
|||
|
Flash retun mc to first position
Hi Guys,
a little flash problem here if any of you would be kind enough to help. I am using drag and drop with targets in Flash but if the drag object is not dropped onto the corect target I would like it to return to the start position on the bottom of the movie so the user can try again. here is what I have upto now which works fine. // on (press) { startDrag(this, false); _root.answer1 = ""; } on (release) { stopDrag(); if (this._droptarget != "/a2") { _root.answer1 = "wrong"; // Instead of this I would like the movie clip t1 to return to the start position. } else { _root.answer1 = "Correct"; } // end if } Any help will be greatly apprecited. Thanks in advance. |
|
#2
|
||||
|
||||
|
Hi. There's a few different ways. One easy way is to store the objects co-ordinates on startDrag, i.e.:
on (press) { origX = this._x; origY = this._y; startDrag(this, false); _root.answer1 = ""; } And then you can restore it here if you need: if (this._droptarget != "/a2") { this._x = origX; this._y = origY; _root.answer1 = "wrong"; } I didn't check the code but it should work. Hope that helps.
|
![]() |
«
Previous Thread
|
Next Thread
»
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Camtasia Flash in AMS Pro | Neill Karl | AutoPlay Media Studio 5.0 | 4 | 10-21-2005 01:34 PM |
| lowest flash version | LegoGirl | AutoPlay Media Studio 4.0 | 13 | 07-31-2003 07:04 AM |
| Here's an easy-to-use fully configurable general purpose Flash timer for your projects... | Corey | AutoPlay Media Studio 4.0 | 14 | 06-24-2003 05:21 AM |
| HOWTO: AutoPlay Media Studio 4.0 and Flash Interaction | Support | AutoPlay Media Studio 4.0 Examples | 0 | 10-30-2002 11:40 AM |
| HOWTO: Install the Flash Player from a CD-ROM | Support | AutoPlay Media Studio 4.0 Examples | 0 | 10-29-2002 05:05 PM |
All times are GMT -6. The time now is 07:27 AM.








Linear Mode

