Does the dragged circle shape need to be positioned exactly on top of
the sensitive circle at (200, 500) OR should we have a beep whenever
a dragged circle touches the edge of the sensitive circle?
The code also depends on if you want it to only beep once or repeated
times as long as the sprites touch, and what should happen if the
user leaves a sprite on top of the sensitive circle and drags a new
one on top of it etc...
Here's a little something to start you off. (Make sure that you use
bitmap members for the circles, and that the sprites use matte ink to
get the most out of the intersetcs() function. Oh yeah, don't forget
to select the "moveable" option for the dragged sprites.)
----------------------------------------------------
-- Put this in a behavior on the sensitive sprite --
-- Put the sprite in channel 1
property pPreviouslyTouched
on beginSprite me
pPreviouslyTouched = []
end
on touch me, _toucher
if pPreviouslyTouched.getPos(_toucher) = 0 then
put _toucher
beep
pPreviouslyTouched.append(_toucher)
end if
end
------------------------------------------------
--Put this in a behavior on any nr of circles --
on exitFrame me
if sprite(1).intersects(me.spriteNum) then
sendSprite(1, #touch, me.spriteNum)
end if
go the frame
end
Watch the message window as you drag sprites.
-A.
>I have a a screen full of circle shapes that are draggable around the
>stage. I want a sound to play when one of the circles is dragged over a
>particlur spot on the stage. say 200,500.
>its only this one red circle that will have a sound and only when on
>this one spot.
>Can anyone hellp, thanks
>maria
>
>[To remove yourself from this list, or to change to digest mode, go to
>http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
>email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
>Lingo-L is for learning and helping with programming Lingo. Thanks!]
[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi To post messages to the list,
email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo. Thanks!]