Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Set Frame Rate for Flash Member
StarMenu Xtra
Hex to integer
Creating a Marquee Tool
NightWares
Cutting Puzzle Pieces
Removing the stage border
MUI-GUI
Imaging Lingo Basics
Mouse Up Trigger-Alphamania
MediaMacros Xtras Mall
 

 

 

Behavior Sprite Expander

Added on 11/6/2000

 

Compatibilities:
behavior D7 D8 Mac PC Shockwave

This item has not yet been rated

Author: KurtKoenig (website)

This behavior expands the size of a sprite on mousewithin,With parameters to change the width, height, and expanding speed. Use this behavior on a bitmap, or vectorshape-sprite

--------- SPRITEXPANDER _____________________________________________________________________
--___________________________________________________________________________________________
--
-- this behavior expands the size of a vector, or bitmap-sprite when the mousecursor
-- is over this sprite. It can be used as RollOver-Expander in a single frame.
--
--  11/04/2000                       D 7 , D 8
--                                  
--  Kurt Koenig * Belgium                                  
--
--____________________________________________________________________________________________

----------------------------------------------------------------------------------------------



property pTheWidth
property pTheHeight
property pLargeWidth
property pLargeHeight
property pExSpeed


on getPropertyDescriptionList
  desclist = [:]
  addprop desclist, #pLargeWidth,[#comment:¬
"The size (Width) in pixels when the mouse is over this sprite:", ¬
  format: #integer , default: "20"]
  addprop desclist, #pLargeHeight,[#comment:¬
"The size (Height) in pixels when the mouse is over this sprite:", ¬
  format: #integer , default: "20"]
  addprop desclist, #pExSpeed, [ #comment:¬
  "The speed when the sprite"s expanding :", ¬
  #format: #integer, #range:[#min: 1, #max: 10],¬
  #default: "10"]
  return desclist
end getPropertyDescriptionList

on getBehaviorDescription
  return " This behavior expands the size of a sprite on"&return&" ¬
mousewithin,With parameters to change the width, "&return&"¬
height, and expanding speed. Use this behavior"&return&" ¬
on a bitmap, or vectorshape-sprite          Kurt * Belgium"
end getBehaviorDescription


on getBehaviorTooltip me
  return "Increase the size of a sprite"&return&"¬
on RollOver in a single frame."
end getBehaviorTooltip

on beginsprite me
  pTheWidth = sprite (me. spritenum) . width
  pTheHeight = sprite (me. spritenum) . height
end beginsprite

on mousewithin me
  if sprite(me.spriteNum).width <= pLargeWidth - pExSpeed then
    sprite(me.spriteNum).width = sprite(me.spriteNum).width + pExSpeed
  end if
  if sprite(me.spriteNum).height <= pLargeHeight - pExSpeed then
    sprite(me.spriteNum).height = sprite(me.spriteNum).height + pExSpeed
  end if
  cursor 200
end mousewithin

on mouseleave me
  sprite(me.spriteNum).width = pTheWidth
  sprite(me.spriteNum).height =  pTheHeight
  cursor 0
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