Contents
Articles
Behaviors
Books
Director News
Director Web Sites
FAQ
Games
Mailing Lists
News Groups
Project Examples
Reviews
Software
Tools
Useful Web Sites
Utilities
Xtras

Don't miss these
NAB - 'Not Another Button'
Shockwave Safe Xtras
Minimizer
Tygtris
OpenAtLaunch
Increase/ Decrease ViewScale Property of a Flash Sprite
Progress Bar
EZIO
Get Visual Line Count and Current Visual Line of Insertion
Wait for explode to finish
 

 

 

Behavior Animate Text By Font Size

Added on 11/29/2000

 

Compatibilities:
behavior D7 D8 Mac PC Shockwave

Rating:

Author: HasanKazmi (website)

Zoom fint size on text

Download PC Source    Download Mac Source
--786
--Behaviour: Animate Text By Font Size
--By: Hasan yasar Kazmi
--Hamdard University Islamabad
--Dir@37.com
--19/Nov/2000.
-- Instructiions:
-- Attach with any Text  OR Field Sprites.

property spritenum, FontSize, effect, Event, CSize

on getPropertyDescriptionList
  set description = [:]
  addProp description, #spritenum, [#default: 1,#format:#integer, #comment: "Text Sprite Num:"]
  addProp description, #FontSize, [#default:1,#format: #integer, #comment:"Size Increment", #range: [#min:1, #max:50]]
  addProp description, #effect, [#default:"Decrease",#format: #string, #comment:"Effect", #range: ["Increase","Decrease"]]
  addProp description, #event, [#default:"MouseUp",#format:#string, #comment:"On Event", #range: ["MouseUp","MouseDown","MouseEnter","MouseLeave"]]
  return description
end

on getBehaviorDescription
  return "Animates text by increasing or decreasing FontSize"
end

on getBehaviorTooltip
  return "Animate Text By Changing Font Size"
end

-- events --
on mouseUp me
  if event="MouseUp" then
    Animate
  end if
end

on mouseDown me
  if event="MouseDown" then
    Animate
  end if
end

on mouseEnter me
  if event="MouseEnter" then
    Animate
  end if
end

on mouseLeave me
  if event="MouseLeave" then
    Animate
  end if
end

On Animate
    set CSize =  sprite(spritenum).member.FontSize
   case (effect) of
    "Increase":
      repeat with i = 1 to FontSize
            sprite(spritenum).member.FontSize = CSize + i
            updatestage
         end repeat
        "Decrease":
      repeat with i = 1 to FontSize
        sprite(spritenum).member.FontSize = CSize - i
        updatestage
      end repeat
      end case  
end Animate

 


Contact

MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA

Send e-mail