Skip navigation
ash_vir1
Currently Being Moderated

help with drag and drop behaviour

May 11, 2012 2:32 PM

hi can some one help me please.

 

i'm creating a educaional game which involves drag and drop behaviour.

 

i have a word with a missing letter. the child drags a letter to the empty space (underscore sprite) . if it is uncorrect beeps and goes back to its origainal place howver if it correct it needs to stay on the underscore . i have 3 sprites which i need to interact and have created 3 different scripts  (one for each sprite) but i need help creating 1 script which does it all.  plz help. thanks

 

on mouseDown

  global currentPos

  currentPos=sprite(9).loc

  put currentPos

end

 

on mouseUp

  global currentPos

if sprite(9).Intersects(5)then

beep

 

end if

 

sprite(9).loc=currentPos

end

 

 

 

on mouseDown

 

  if sprite(8).intersects(5)then

    sprite(8).loc=sprite(5).loc

 

  end if

 

end

 

 

on mouseDown

  global currentPos

  currentPos=sprite(7).loc

  put currentPos

end

 

on mouseUp

  global currentPos

if sprite(7).Intersects(5)then

beep

 

end if

 

sprite(7).loc=currentPos

end

 
Replies

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points