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
Set Properties of a Flash Sprite
LiveCD
Seurat-Alphamania
Hexadecimal numbers
Check valid date
Cast Control
Fuel
Video Mask
Cinemac
Shockwave Remote Faq
 

 

 

Behavior Vector Shape - Create Ellipse

Added on 2/7/2006

 

Compatibilities:
behavior D8 D8_5 D9 Mac PC

This item has not yet been rated

Author: Chunick (website)

Pass the custom handler a width and height and it will return a vertexList consisting of an elliptical shape to which you can set to a #vectorshape member type. The code can be used anywhere.

on createEllipse (aWidth, aHeight)
  rX = aWidth / 2.0
  rY = aHeight / 2.0
  rXk = rX * 0.552284749830794
  rYk = rY * 0.552284749830794
  vertList = [[#vertex: point(0, -rY), #handle1: point(rXk, 0), #handle2: point(-rXk, 0)], [#vertex: point(rX, 0), #handle1: point(0, rYk), #handle2: point(0, -rYk)], [#vertex: point(0, rY), #handle1: point(-rXk, 0), #handle2: point(rXk, 0)], [#vertex: point(-rX, 0), #handle1: point(0, -rYk), #handle2: point(0, rYk)]]
  
  return vertList

end

 


Contact

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

Send e-mail