Contents
Articles
Behaviors
Books
Director News
Director Web Sites
FAQ
Games
Mailing Lists
News Groups
Project Examples
Reviews
Software
Tools
Useful Web Sites
Utilities
Xtras

Don't miss these
Radio Button Groups
Print Dialog Behavior
SendAppleEvent
HTML-ingo
IMS CharacterGenerator Studio
Lingo Paradise Smartgroups
Get Keyboard Delay and Speed
Text Shifting
Popup Xtra
Detect MS Media Player v9
 

 

 

Behavior Behavior Killer behavior

Added on 6/10/1999

 

Compatibilities:
behavior D6_5 Mac PC

This item has not yet been rated

Author: StephaneComeau

Deletes behaviors from a range of sprites by script name

on getBehaviorDescription
  return "deletes behaviors from a range of sprites by script name."
  return "Stephane Comeau        Steph@brunnet.net"
end

property startSprite
property endSprite
property scriptName
property whichEvent

on getPropertyDescriptionList
  
  set p_list = [startSprite : [ #comment:   "Sprite to remove from:", #format:   #integer, #default:    1 ], endSprite : [ #comment:   "Sprite to remove from:",  #format:   #integer, #default:    1 ], scriptName:   [#comment: "Script to remove:", #format:  #string, #default:  "script name"], whichEvent: [#comment:  "Activation event:", #format:   #symbol, #default:   #endSprite, #range:     [#mouseUp, #mouseDown, #beginSprite, #endSprite, #mouseUpOutside, #mouseEnter]]]  
  return p_list  
end

on new me
  return me
end

on beginSprite me
  if whichEvent = #beginSprite then
    run me
  end if
end

on endSprite me
  if whichEvent = #endSprite then
    run me
  end if
end

on mouseDown me
  if whichEvent = #mouseDown then
    run me
  end if
end

on mouseUp me
  if whichEvent = #mouseUp then
    run me
  end if
end

on mouseUpOutside me
  if whichEvent = #mouseUpOutside then
    run me
  end if
end

on mouseEnter me
  if whichEvent = #mouseEnter then
    run me
  end if
end

on run me  
  repeat with n = startSprite to endSprite
    if the scriptInstanceList of sprite n <> [] then
      repeat with i = count(the scriptInstanceList of sprite n) down to 1
        if string(getAt(the scriptInstanceList of sprite n, i)) contains scriptName then
          deleteAt the scriptInstanceList of sprite n, i
        end if
      end repeat
    end if
  end repeat  
end

 


Contact

MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA

Send e-mail