Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Print Dialog Behavior
Sending Email
QuickTime Notes
Overlay Dragger
Countdown Timer
Billenium Transitions Xtra v2
EXE Screen Saver
AutoCropper v1.2
DisplayRes
Cursor trails
MediaMacros Xtras Mall
 

 

 

Behavior Roil Button-Alphamania

Added on 6/10/1999

 

Compatibilities:
D6_5 D7 D8 Mac PC Script

Required Xtras:
Alphamania
Effector Set II for Alphamania

This item has not yet been rated

Author: MediaLab (website)

Requires Effector Set 2

property sNum
property speed
property stretch
property overMe
property actionType, actionText -- what to do or where to go

on getBehaviorDescription me
  return "A simple button behavior that applies roil when the user clicks. "
end

on getPropertyDescriptionList me
  set list = [:]
  addProp list, #speed, [#comment: "Speed:", #format: #integer, #default: 7, #range: [#max: 20, #min:0]]
  addProp list, #stretch, [#comment: "Stretch:", #format: #integer, #default: 6, #range: [#max: 8, #min:0]]
  addProp list, #actionType, [#comment: "Action Type:", #format: #symbol, #range: [#goToFrame, #doLingo], #default: #doLingo]
  addProp list, #actionText, [#comment: "Action Text:", #format: #string, #default: "beep()"]
  return list
end

on beginSprite me
  set sNum = the spriteNum of me
  set overMe = -1
end

on ApplyRoil me
  roil(sprite sNum, [#speed: speed, #stretch: stretch])
end

on RemoveRoil me
  removeEffect(sprite sNum, #roil)
end

on mouseDown me
  set overMe = TRUE
  applyRoil(me)
  updateStage
end

on mouseEnter me
  if the stillDown and overMe = FALSE then
    applyRoil(me)
    set overMe = TRUE
  end if
end

on mouseLeave me
  if the stillDown and overMe = TRUE then
    RemoveRoil(me)
    set overMe = FALSE
  end if
end

on mouseUp me
  if overMe = TRUE then
    RemoveRoil(me)
    set overMe = FALSE
    
    action(me)
    updateStage
  end if
  set overMe = -1
end

on mouseUpOutside me
  set overMe = -1
end

on action me
  if actionType = #goToFrame then
    if value(actionText) > 0 then
      go to frame value(actionText) -- go to frame number
    else
      go to frame actionText -- go to frame label
    end if
  else if actionType = #doLingo then
    do actionText
  end if
end

 


Upload Provided by ABCUpload ASP

Contact

MMI
22 West Court Sq
Suite 2C
Newnan, GA 30263
USA

Fax - (206) 339-5833

Send e-mail