Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Drag and Drop interface

Status
Not open for further replies.

gashed99

Technical User
Apr 6, 2001
15
FR
I have made a simple drag and drop interface for a kids website.

I am trying to trigger and sound, "onMouseRelease", when the user places the object in the correct target.

I'm not sure how to do this in Flash. If someone could help on this I would be most grateful.

Thanks

Jim
 
Make a new movie clip place your sound here and add a stop action on the last frame. then go to your button and ctrl L and drag your movie clip into the mouse over frame. Make sure to add an object bigger then the text on the last frame.
 
hi all

Help120: your method is fine if you want to make a button which gives a sound on rollover, but it will not work while dragging a movie-clip at the same time, nor would it work "onMouseRelease", nor would it be able to tell one object from another.

Jim: I think this is more what you're after, a basic shoot-the-hoop:


(I know it says sound on 'hit', but it was a previous sample i made, modified to sound on 'drop' for your purposes)

The scripting utilises variable checking to see which (if you had more than one object) object were being picked and dropped. It also utilises a 'hittest' action to check the location of the dragged clip.

If you have any hassle with it, or need more explanation, just shout.

dave davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
ps: before anyone shouts out that the sound is triggered even if the object just touches the hoop, I know, but this is an 'exampe' of a method. To restrain the 'hit' area you would simply swap the 'hitest' method for an (x/y +- 50) mc property test.

dave davdesign@pinkzeppelin.com

^^^^^^^^^^^^^^^^^^^^^
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top