Forum Discussion
Drag and drop seq. - adding sound/no bounce back
Hi,
I have a drag and drop sequence question, and i put a sound for a correct drop (image/text group is dropped).
When I add a trigger to play the 'incorrect' sound, I lose the bounce back that occurs with incorrect drops. (Bounce back set in drag & drop options)
Any idea what's going on?
Thanks!
- PhilMayorSuper Hero
You cannot use states with groups but you can ungroup and put the objects inside of a state
- PhilMayorSuper Hero
adding a trigger when dropped on will break the bounce back.
I would use the drop correct/incorrect states instead and play media when state is equal to drop incorrect. You will have to uncheck the delay option in the form view.
- SanjuThapa-b5a0Community Member
The items I am dragging are Groups (image + text). Maybe I'm missing something, but it doesn't look like I can use correct/incorrect states with it.
I can get a sound to play with a correct drop (Play audio X when user drops Y on Z). Not sure how to use States with Groups (possible?) for your solution Phil.
- SanjuThapa-b5a0Community Member
If I ungroup, then I can't drag the image and text at the same time, correct? That's the reason I grouped it, the text can't be placed in the image in a way that is legible.
Maybe I'll just have a sound for the correct drop and no sound for incorrect (so I can keep the bounce back). Unless you know a way?
Thanks for all your help!
- PhilMayorSuper Hero
It is a bit of a rebuild, I try and work with only one object rather than groups. You can ungroup and the cut and paste the objects into one state and then redo the form to allow the object to be dragged again.
- NishaMakanCommunity Member
I was having the same issue with the bounce back not working when I added an incorrect sound, and Phil's fix of playing the sound when state = incorrect worked for me.
However I did find that the incorrect sound would only play the sound intermittently and added the following to get it to play every time.
1. Created a new True/False variable called tempSound2. Added the following triggers for each drag item
When the state of dragItem is Drop Incorrect- Stop audio incorrect sound
- Play audio incorrect sound
- set tempSound = True
3. Added the following triggers for when tempSound changes
- Change state of dragItem to Normal (repeat trigger for all your drag items)
if tempSound == True
and the state of dragItem ≠ Drop Correct
and the state of dragItem ≠ Hidden- repeat trigger above for all your drag items
- Set tempSound = False
if tempSound == True