Indigo Rose Software
  #1  
Old 07-20-2005
ianhull ianhull is offline
Forum Member
 
Join Date: Jul 2004
Posts: 313
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.
Reply With Quote
  #2  
Old 07-20-2005
Corey's Avatar
Corey Corey is offline
Registered User
 
Join Date: Aug 2002
Posts: 9,746
Smile

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.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


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.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Copyright © 2000 - 2009 Indigo Rose Corporation. All rights reserved.
Indigo Rose Software