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
Date Time Xtra
Follow the leader
CatCube
Play/ Pause/ Stop/ Rewind a Flash Sprite
Hold Till Flash Directmedia finishes playing
Convert between bases-Integer to String
Flash Movie Controls
Opening and closing a CD-door behaviour
selling|sound - royalty free music
3 State Button
 

 

 

Behavior Get Rect of 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 allows you to get the rect of a vertexList directly.

on getRect vList
  vCount = vList.count
  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]
        if i = 1 and j = 1 then
          aLeft = pPoint[1]
          aTop = pPoint[2]
          aRight = pPoint[1]
          aBottom = pPoint[2]
        end if
        aLeft = min(aLeft, pPoint[1])
        aTop = min(aTop, pPoint[2])
        aRight = max(aRight, pPoint[1])
        aBottom = max(aBottom, pPoint[2])
      end repeat
    end if
  end repeat
  return rect(aLeft, aTop, aRight, aBottom)
end

 


Contact

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

Send e-mail