Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

lingo help erase sprites

lingo help erase sprites

lingo help erase sprites

hi im not very familiar with lingo and i am trying to use one sprite to erase another.. i have no idea even how to begin and would really apreciate any help anybody can offer. thanks

RE: lingo help erase sprites

This may be what u are looking for:

-- Put this script in your eraser sprite
property click
property base
property eraser

on beginSprite me
  click = false
  -- sprite to be erased
  base = sprite(1)
  -- eraser sprite
  eraser = sprite(2)
  eraser.member.centerregPoint = true
end me

on mouseDown me
  eraser.loc = the mouseLoc
  click = true

on mouseUp me
  click = false

on exitframe
  if(click) then
    eraser.loc = the mouseLoc
    if sprite 2 intersects 1 then
      bImage = base.member.image
      eImage = eraser.member.image
      eRect = eImage.rect
      eOffsetX = eraser.member.image.width/2.0
      eOffsetY = eraser.member.image.height/2.0
      offset = point(the mouseLoc.locH - base.left, the mouseLoc.locV - base.top)
      r = rect(offset[1]-eOffsetX,offset[2]-eOffsetY,offset[1]+eOffsetX,offset[2]+eOffsetY)
    end if
  end if

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members! Already a Member? Login

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close