Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
File Save as..
Check QuickTime Version
Noise Algorithm 2
Vector Shape - Create Sine Wave
HJ Install
Faux Typing
Scale the screen
Correct entry
Sneakers
BorderPatch
MediaMacros Xtras Mall
 

 

 

Behavior Font Size DropDown

Added on 11/29/2000

 

Compatibilities:
behavior D7 D8 Mac PC Shockwave

Rating:

Author: HasanKazmi (website)

Change font size with a drop down menu.

Download PC Source    Download Mac Source
--786
--Behaviour: Drop down box for changing Font Size
--By: Hasan Yasar Kazmi
-- Hamdard University Islamabad Pakistan
-- dir@37.com
--20/11/2000
--Instructions:
--Attach with any Field Sprite, it will be turned into a change font drop down box
-- The Initial title of the Drop down can be adjusted from the Behaviour Inspector

--Code
property spritenum,TextspriteNum,Title,FontSizeList

on getPropertyDescriptionList
  set description = [:]
  addProp description, #TextSpriteNum, [#default: 1,#format:#integer, #comment: "Field/Text Sprite Num To change Font:"]
  addProp description, #Title, [#default:"Font Size",#format:#string, #comment: "Title Of Drop Down Box:"]
  return description
end
on getBehaviorDescription---Behaviour Discription
  return "Dropdown Box for Changing Font Size"
end

on beginsprite me  
   FontSizeList = [6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,40,42,46,50,54,58,64,68,72,78,96]
  spritenum = sprite(the spritenum of me)
  sprite(spritenum).member.boxType = #Adjust
  sprite(spritenum).member.text = string(title)
  updatestage
end beginsprite me

on MouseEnter me  
  repeat with i = 1 to FontSizeList.count    
    Val = getAt(FontSizeList,i)    
    sprite(spritenum).member.line[i] =Val
  end repeat  
  updatestage
end  MouseEnter me

on Mousewithin me  
  sprite(spritenum).member.line[the mouseline].Hilite()
  updatestage  
end Mousewithin me

On mouseup me
  sprite(TextspriteNum).member.fontsize = value(sprite(spritenum).member.line[the mouseline])
  sprite(spritenum).member.text = string(title)
  updatestage
end mouseup me

on MouseLeave me  
  sprite(spritenum).member.text = string(title)
  updatestage  
end MouseLeave me

 


Upload Provided by ABCUpload ASP

Contact

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

Fax - (206) 339-5833

Send e-mail