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
Get the computer name of user
Change Filled property of a Shape Sprite
cXtraSoundRec
QuickTime Installer
Opening and closing a CD-door behaviour
Wait for explode to finish
Blend Sprite
DOMAJ Site and Forum
Image Xport
Importing bitmaps without loosing white space
 

 

 

Behavior Flip Image Algorithm - Imaging Lingo

Added on 8/23/2005

 

Compatibilities:
D8 D8_5 D9 Mac Parent PC Shockwave

This item has not yet been rated

Author: Chunick (website)

This code will flip your image.

on flipImage (anImage, aFlip)
  --------------------------------------------------------------------
  -- original code by Luke Wigley www.lingoworkshop.com
  -- I added the flip parameter.
  -- aFlip can be these values: #flipV, #flipH, #flipVH
  --------------------------------------------------------------------
  aRect = anImage.rect
  aQuad = [point(0,0), point(aRect.width,0), point(aRect.width,aRect.height), point(0,aRect.height)]
  Case aFlip of
    #flipV:
      newQuad = [aQuad[4], aQuad[3], aQuad[2], aQuad[1]]
    #flipH:
      newQuad = [aQuad[2], aQuad[1], aQuad[4], aQuad[3]]
    #flipVH:
      newQuad = [aQuad[3], aQuad[4], aQuad[1], aQuad[2]]
  end Case
  newImage = image(anImage.width, anImage.height, anImage.depth)
  newImage.copyPixels(anImage, newQuad, aRect)
  return newImage
end  

 


Contact

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

Send e-mail