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
Quit Message
Using ActiveX
RUNNING LED's
EzeeAlert
Direct SMS Review
SM scroll slowdown
Director Showcase Site - Behaviors, interactive examples, Lingo to ActionScript translator & more
blending on casts
Irregular MIAW
Simatrix Menu
 

 

 

Behavior Vector Shape - Rounded Rectangle

Added on 5/30/2007

 

Compatibilities:
behavior D8 D8_5 D9 Mac PC Script Shockwave UK US

This item has not yet been rated

Author: Chunick (website)

pass the handler the width, height, and radius of the rounded edge and it will create a rounded rectangle.

on createRectangle (width, height, corner)
  ch = corner/2.0
  pt1 = [#vertex: point(0, corner), #handle1: point(0, -ch), #handle2: point(0,0)]
  pt2 = [#vertex: point(corner, 0), #handle1: point(0,0), #handle2: point(-ch,0)]
  pt3 = [#vertex: point(width - corner, 0), #handle1: point(ch,0), #handle2: point(-ch,0)]
  pt4 = [#vertex: point(width, corner), #handle1: point(0,0), #handle2: point(0, -ch)]
  pt5 = [#vertex: point(width, height - corner), #handle1: point(0,ch), #handle2: point(0,0)]
  pt6 = [#vertex: point(width - corner, height), #handle1: point(0,0), #handle2: point(ch,0)]
  pt7 = [#vertex: point(corner, height), #handle1: point(-ch,0), #handle2: point(0,0)]
  pt8 = [#vertex: point(0, height - corner), #handle1: point(0,0), #handle2: point(0,ch)]
  vertList = [pt1, pt2, pt3, pt4, pt5, pt6, pt7, pt8]
  
  return vertList
  
end

 


Contact

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

Send e-mail