Hi Ramesh,

Welcome to lingo-L.

here is a script, attach this to all the 26 alphabet sprites. Arrange the
box and alphabet sprites this way on the score..
box1
a
box2
b
box3
c
and so on upto z

--------Bahavior script for
Alphabets-----------------------------------------------------
property pSprite
property pTargetSprite
property pOrigLoc
property pDrag
property pOffset

on beginSprite me
  pSprite = sprite(me.spriteNum)
  pOrigLoc = pSprite.loc
  pTargetSprite = sprite(me.spriteNum - 1)
  pDrag = false
end

on mouseDown me
  pOffset = pSprite.loc - the mouseLoc
  pDrag = true
  pSprite.locZ = the lastChannel
end

on mouseUp me
  pDrag = false
  pSprite.locZ = me.spriteNum
  checkTarget(me)
end

on mouseUpOutside me
  mouseUp(me)
end

on checkTarget me
  if inside(pSprite.loc, pTargetSprite.rect) then
    pSprite.loc = sprite(pTargetSprite).loc
  else
    pSprite.loc = pOrigLoc
  end if
end

on exitFrame me
  if pDrag then
    pSprite.loc = the mouseLoc + pOffset
  end if
end
--------end of
script----------------------------------------------------------

Hope this helps
best regards
------------------------------------------
Ramesh CT
http://www.lingoman.net/
------------------------------------------


[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!]

Reply via email to