Hi,
for a small animation, i want to play true sound when player response is good
- Player drag label on a picture, if label is in good place "true Sound" is play (="coq07"), i have a solution for this
But if player drag label on a false position i want to play "false sound", and I dont know how made this!!!
Can you help me ?
Merci beaucoup ;-)
I use this code :
yepnope({nope:['jquery-ui-1.10.4.custom.min.js', 'jquery.ui.touch-punch.min'], complete: init});
function init(){
// Draggable CERVEAU-1
sym.$('cerveau_1').draggable({opacity:.5, revert:'invalid'});
// Droppable on the target
sym.$('targetCerveau_1').droppable({
accept:sym.$('cerveau_1'),
drop: function() {
sym.getSymbol("cerveau_1");
var audio = sym.$("coq07")[0];
audio.currentTime = 0;
if (audio.paused) {
audio.play(); }
}
}
);
sym.$('defaultCerveau_1').droppable({
accept:sym.$('cerveau_1'),
drop: function() {
}
}
);
// Draggable BOUCHE-2
sym.$('bouche_2').draggable({opacity:.5, revert:'invalid'});
// Droppable on the target
sym.$('targetBouche').droppable({
accept:sym.$('bouche_2'),
drop: function() {
sym.getSymbol("bouche_2");
var audio = sym.$("coq07")[0];
audio.currentTime = 0;
if (audio.paused) {
audio.play(); }
}
}
);
sym.$('defaultBouche').droppable({
accept:sym.$('bouche_2'),
drop: function() {
}
}
);
...