Search content:

 

Personal Menu
Username:
Password:
Save password

Become a member

Forgot Password?

 

Don't miss these
Play and Review Flash
Easy Dialog
3DPI
MPEGXtra
cXtraSoundRec
Full Screen Projectors
ScreenFade
Director To Go
Move sprite along mouse vector Behavior
INSIDE Macromedia Director & Lingo
MediaMacros Xtras Mall
 

 

 

Behavior Vector Shapes - Create Donut

Added on 2/7/2006

 

Compatibilities:
D8 D8_5 D9 Mac PC

This item has not yet been rated

Author: Chunick (website)

This custom behavior returns a vertexList of a donut shape. the outRad defines the outer radius and the inRad defines the inner radius (the hole of the donut).

on createDonut(outRad, inRad)
  vertList = []
  rXY1 = outRad * 0.552284749830794
  rXY2 = inRad * 0.552284749830794
  vertList1 = [[#vertex: point(0, -outRad), #handle1: point(rXY1, 0), #handle2: point(-rXY1, 0)], [#vertex: point(outRad, 0), #handle1: point(0, rXY1), #handle2: point(0, -rXY1)], [#vertex: point(0, outRad), #handle1: point(-rXY1, 0), #handle2: point(rXY1, 0)], [#vertex: point(-outRad, 0), #handle1: point(0, -rXY1), #handle2: point(0, rXY1)]]
  repeat with i in vertList1
    vertList.add(i)
  end repeat
  
  vertList.add([#newCurve])
  
  vertList2 = [[#vertex: point(0, -inRad), #handle1: point(rXY2, 0), #handle2: point(-rXY2, 0)], [#vertex: point(inRad, 0), #handle1: point(0, rXY2), #handle2: point(0, -rXY2)], [#vertex: point(0, inRad), #handle1: point(-rXY2, 0), #handle2: point(rXY2, 0)], [#vertex: point(-inRad, 0), #handle1: point(0, -rXY2), #handle2: point(0, rXY2)]]
  
  repeat with i in vertList2
    vertList.add(i)
  end repeat
  
  return vertList
end

 


Upload Provided by ABCUpload ASP

Contact

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

Fax - (206) 339-5833

Send e-mail