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
27 Sum Game-Score Field
Volume Control Behavior
Dervich Pivot Xtra
Turn puppeting off for a range of sprite channels
Irregular Slider
Yak
ProFusion Xtra for Authorware and Director
cXtraGraphicIO
DataSafe Xtra for Authorware and Director
Direct Media Volume Slider
 

 

 

Behavior encrypt/decrypt Image

Added on 3/29/2005

 

Compatibilities:
behavior

This item has not yet been rated

Author: eldemir (website)

encrypt/decrypt image cast member

----------------------------------------------------------------------------------------------
----------------------------------------------------------------------------------------------
--    encrypt/decrypt image
------------------------
--
--    
--    Emre Eldemir                  03/29/2005
----------------------------------------------------------------------------------------------

on mouseUp me
  member("newImage").image = encryptionImage("newImage",123)
end

on encryptionImage gMember, seed
  
  the randomSeed = seed

  tempImage = member(gMember).image.duplicate()
  imgWidth = member(gMember).width-1
  imgHeight = member(gMember).height-1
  
  repeat with i=1 to imgWidth
    repeat with j =1 to imgHeight
      
      temp = tempImage.getPixel(point(i,j))
      rd = random(255)
      colorDot = rgb(bitXor(temp.red,rd),bitXor(temp.green,rd),bitXor(temp.blue,rd))
      tempImage.setPixel(i,j,colorDot)
      
    end repeat
  end repeat
  
  return tempImage
  
end

 


Contact

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

Send e-mail