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
Rotator 1.1
Simple Character Substitution
Find all occurances of a string in a Text member
Graph Class
Get OS Language
PrimeBase Xtra
qwiScriptStyler
PsychicParrot.com
Initialize QuickTime Video (no white flash)
Hexadecimal numbers
 

 

 

Behavior Vector Shape - Create Frame

Added on 2/7/2006

 

Compatibilities:
D8 D8_5 D9 Mac PC

This item has not yet been rated

Author: Chunick (website)

This custom handler returns a vertexlist of a frame shape. Pass the width and height of the inside and outside border of the frame.

on createFrame (width1, height1, width2, height2)
  
  dX = (width1 - width2) / 2.0
  dY = (height1 - height2) / 2.0
  
  vertList = []
  
  vertList1 = [[#vertex: point(0, 0)], [#vertex: point(width1, 0)], [#vertex: point(width1, height1)], [#vertex: point(0, height1)]]
  
  repeat with i in vertList1
    vertList.add(i)
  end repeat
  
  vertList.add([#newCurve])
  
  vertList2 = [[#vertex: point(0 + dX, 0 + dY)], [#vertex: point(width2 + dX, 0 + dY)], [#vertex: point(width2 + dX, height2 + dY)], [#vertex: point(0 + dX, height2 + dY)]]
  
  repeat with i in vertList2
    vertList.add(i)
  end repeat
  
  return vertList
end

 


Contact

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

Send e-mail