ࡱ                >  	                                                      	   
      
                        R o o t   E n t r y                                                   	           F                      W o r d D o c u m e n t                                                                                    !       C o m p O b j                                                                                           ^                                                                                                                                      0  1  2  3                                C  D  E          	  
        *  +  ,  B  C  D  E  F  T  U  V  W  n  o  p  v  w             ] ^] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ^] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ^] ^ 7                               F  G  H  I      t  u  v  w  ,	  -	  .	  b	  c	  	  	  	  
  
  
  W
  X
  Y
                    
  
  
        o  p  q  ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ^] ] ] ] ] ] ] ] ] ] ] ] ] ]  8q  r                    
                                                                                                                                                                                                                                                                                                                                     ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ] ]        1  2  3                      D  E      	  
    +  E                                                                                                                                                                                                                                                                                                     E  U  o  w                         G  H  I  u  w  -	  .	  c	  	  	                                                                                                                                                                                                                                                                                                     	  
  
  X
  Y
              
  
      p  r                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                          	          /      E      K        @  Normal     a	                   " A@ " Default Paragraph Font                                                                                              @                                                                                                                                                                                                                                                                                 ܥe #	                    !                  /                                  ,   l   ,   l                                                                                     
   
   
             9   (                                                                                                                       T                                                   	                                                                                                                                                                                                                                                                                            9      MS Sans Serif    Symbol     Times New Roman General Information

This Xtra will work on Macintosh and Windows computers. 


This Xtra will let you adjust the colors of a cast member in runtime. The cast member should be an image. 

The Xtra will adjust the brightness , saturation  and specific red green and blue components of the selected image.

Since the Xtra alters a cast member, you still maintain all the control over the display of the member as a sprite, including ink affects, blends, and layering.

Opening the Xtra.

Put the Xtra in the "Xtras" folder near your Director application. Then call -  

set AdjustObj = new(Xtra "AdjustColors")

Have AdjustObj declared as a Global variable since you will be referring to it later. 

You will probably be doing this in the beginning of the movie so your handler will probably look like this:

on StartMovie
	Global AdjustObj 
	if not  AdjustObj then		
	set AdjustObj=
		new(Xtra"AdjustColors")
	end if
end StartMovie

Closing the Xtra.

When you are done you should close the Xtra by assigning 0 to the variable. 

on stopmovie
  global AdjustObj
  set AdjustObj= 0
end

Adjusting the colors of a cast member.


Before you can adjust the colors of a cast member you must prepare an aditional cast member which will accept the result of the adjustments. This cast member must be of kind "Image". You can create one by opening 	the paint window and scribeling something. You can also copy an existing cast member.
	
On Windows computers the source cast member you are adjusting must be of color depth 32 bit, on Macs any color depth will work. The screen color depth does not matter on any machine

To adjust colors you call the "AdjustColors" method.
The AdjustColors(AdjustObj, Source, Destination, Brightness, Saturation, Red, Green, Blue ) takes eight arguments.

AdjustObj - The instance number returned from New().

Source - An integer which is the number of the cast member to be adjusted.

Destination - An integer which is the number of the cast member that the result of the adjustments will be placed in. Make sure that a cast member of type "Image" does exist in this number.

Brightness -  An integer between 0 - 100. Where 50 will leave the brightness of the cast member untouched. Any value under 50 will result in a darker image than the original, Any value above 50 will result in a brighter image.

Saturation -  An integer between 0 - 100. Where 100 will leave the Saturation of the cast member untouched. any value under 100 will reduce the saturation of the cast member. A value of 0 will result in a grayscale image.

Red -  An integer between 0 - 100. Where 50 will leave the red level of the cast member untouched. Any value under 50 will result in an image with less red. Any value above 50 will boost the red levels in the image.

Green -  An integer between 0 - 100. Where 50 will leave the greenlevel of the cast member untouched. Any value under 50 will result in an image with less green. Any value above 50 will boost the green levels in the image.

Blue -  An integer between 0 - 100. Where 50 will leave the blue level of the cast member untouched. Any value under 50 will result in an image with less blue. Any value above 50 will boost the blue levels in the image.
	
Therefore the call:

	AdjustColors(AdjustObj,1,2,50,100,50,50,50)

will result in an untouched copy of 	castmember no. 1 being copied to cast member no. 2.

Be aware that the adjustments are being applyed in the order of the arguments ie. first the brightness is adjusted, then the saturation, and finaly the color values. 


For aditional help and purchasing:
www.itp.tsoa.nyu.edu/~danny/Xtras.html
danny@rozin.com
                                                                                                                                                                                                                                               
   	           F   Microsoft Word 6.0 Document 
   MSWordDoc     9q                                                                                                                                                                                                                                                                                                                                                                                                                                              