Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
robotduck.com
Shockwave Safe Xtras
Behavior Writer
RUNNING LED's
Tint bitmap behaviour
Wind-Xtra
Billenium Transitions Xtra
DrawXtra
Accessing Keys to Control a Sprite
Play/ Pause/ Rewind/ StepForward/ StepBackward Video Sprite
MediaMacros Xtras Mall
 

 

 

Behavior A cool button

Added on 5/22/2004

 

Compatibilities:

This item has not yet been rated

Author: spiderman3388

the code manuplates 3 sprites the main button and a color sprite with low opacity and a dot sprite

Download PC Source
property mysprite
property colorsprite
property dotsprite
property myright
property myleft
property f
property colorright
property colorleft
property which
property which2
property distancei

on beginsprite me
  mysprite=sprite(me.spritenum)
  colorsprite=sprite(which)
  dotsprite=sprite(which2)
  myright=mysprite.right
  myleft=mysprite.left
  colorright=colorsprite.right
  colorleft=colorsprite.left
  f=0
end

on mousewithin me
  f=2
end
on mouseleave me
  f=1
end
on prepareframe me
  if f=0 then
    set the right of colorsprite to colorleft
    set the blend of dotsprite to 100
    set the visibility  of dotsprite to 0
    set the loch of dotsprite to myright
  end if
  
  if f=2 then
    if the right of colorsprite      set the right of colorsprite to the right of colorsprite +10
    end if
  end if
  if f=2 then
    if the right of colorsprite>=myright then
      if the loch of dotsprite> myleft-Distancei then
        set the visibility  of dotsprite to 1
        set the loch of dotsprite to the loch of dotsprite -10      
      end if
    end if
  end if
  if f=1 then
    if the right of colorsprite>colorleft then
      set the right of colorsprite to the right of colorsprite -10
    end if
  end if
  if f=1 then
    if the blend of dotsprite>0 then
      if the loch of dotsprite< myright + the width of dotsprite*2 then
        if the right of colorsprite<=colorleft then
          set the loch of dotsprite to the loch of dotsprite +10
          set the blend of dotsprite to the blend of dotsprite -10
        end if
      end if
    end if
  end if
  if the blend of dotsprite=0 then
    f=0
  end if  
end
on getPropertyDescriptionList me
  set props= [:]
  props.addProp(#which, [#format: #integer, #default: 2, #comment: "which sprite is the color"])
  
  props.addProp(#which2, [#format: #integer, #default: 1, #comment: "which is the dot"])
  props.addProp(#distancei, [#format: #integer, #default: 16, #comment: "how far away?"])
  
  
  return props

 


Upload Provided by ABCUpload ASP

Contact

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

Fax - (206) 339-5833

Send e-mail