Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Dither Black and White Image - Imaging Lingo
First Class Text Picture
Indeo Video
WebViewer Xtra
zlibXtra
Type Writer Fonts
Custom Hyperlink Colors And Cursor Change
Bounce That Sprite
Sound slider
ECTI Editor
MediaMacros Xtras Mall
 

 

 

Behavior Ripple Follow Mouse on Rollover-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 postLength
property frameCount

on getBehaviorDescription me
  return "This behavior will place ripples at the mouse location as it rolls over the sprite. The result is a water ski effect."
end

on getPropertyDescriptionList me
  set list = [:]
  addProp list, #postLength, [#comment: "Exit Delay:", #format: #integer, #default: 100, #range: [#max: 1000, #min:1]]
  return list
end

on beginSprite me
  set sNum = the spriteNum of me
  set frameCount = postLength
  ripple(sprite sNum)
  
  if not rollover(sNum) then
    PauseEffect(sprite sNum, #ripple)
  end if
end

on endSprite me
  set pos =   getone(the actorList, me)
  if pos then
    deleteAt(the actorList, pos)
  end if
end

-- add drops at mouse location
on mouseWithin me
  set x = the mouseH - (the left of sprite sNum)
  set y = the mouseV - (the top of sprite sNum)
  ripple(sprite sNum, [xLocation: x, yLocation: y])
end

on mouseEnter me
  set frameCount = postLength
  StopEffect(me) -- removes the actor
  ContinueEffect(sprite sNum, #ripple)
end

on mouseLeave me
  Add(the actorList, me)
end

on stepFrame me
  set frameCount = frameCount - 1
  if frameCount <= 0 then
    StopEffect(me)
  end if
end



on StopEffect me, sym
  -- removes this behavior from the actorList
  if not voidP(sym) then
    if sym <> #ripple then exit
  end if
  set pos =   getone(the actorList, me)
  if pos then
    deleteAt(the actorList, pos)
    PauseEffect(sprite sNum, #ripple)
  end if
end

on ResumeEffect me, sym
  -- adds this behavior to the actorList
  if not voidP(sym) then
    if sym <> #ripple then exit
  end if
  set pos =   getone(the actorList, me)
  if pos = 0 then
    Add(the actorList, me)
    ContinueEffect(sprite sNum, #ripple)
  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