I am trying to design some children’s games for a book I am doing in iBooks Author. I would like to be able to drag two items together. If they match I want them to click together and not if they don’t match. Is this possible? If so can you point me in the right direction to get it to work?
I modified the code slightly so that they snap together on release
if(event['hypeGesturePhase']=='end'){
console.log(a.id+' hit '+b.id)
a.style.left=b.style.left
a.style.top=b.style.top
}
hittest-1 2.zip (16.1 KB)
But if you want something to happen afterwards like an action you'll need to keep building on that with code, I'm afraid there's no other non javscript way to do this.