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
Fade
SecureNet Xtra
integer to binary and binary to integer
Read a File
Set DirectToStage of a Animated Gif CastMember
cXtraTransitions3
Allowing Users to Skew an Image
cXtraGraphicIO
Amplitude Xtra
Toggle ButtonsEnabled Property of a Flash Member
 

 

 

Behavior Rotate Vertexlist

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 will allow you to rotate a vertexList directly.

on rotateVectorShape vList, vAngle
  vCount = vList.count
  rad = vAngle / 180.0 * pi
  
  repeat with i = 1 to vCount
    if vList[i].ilk = #propList then
      nCount = vList[i].count
      repeat with j = 1 to nCount
        pPoint = vList[i][j]
        u = cos(rad) * (pPoint[1]) - sin(rad) * (pPoint[2])
        v = sin(rad) * (pPoint[1]) + cos(rad) * (pPoint[2])
        
        vList[i][j] = point(u,v)
      end repeat
    end if
  end repeat
  
  return vList
  
end

 


Contact

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

Send e-mail