[Flashcoders] if(color == X) {} looking for method.

2007-05-10 Thread Paul V.
...I am wanting to run a color of instance test. I am wondering if I can do this? attachMovie(shapes,shapes,num); if( shapes /*color*/ == 0x33){ // action(s) } // this is sudo code but basically I want to know if I can test for color. Thanks, Vdst.

RE: [Flashcoders] if(color == X) {} looking for method.

2007-05-10 Thread Danny Kodicek
...I am wanting to run a color of instance test. I am wondering if I can do this? attachMovie(shapes,shapes,num); if( shapes /*color*/ == 0x33){ // action(s) } // this is sudo code but basically I want to know if I can test for color. A library symbol doesn't have a

RE: [Flashcoders] if(color == X) {} looking for method.

2007-05-10 Thread Durai Raj
www.expertbuddy.net -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul V. Sent: Thursday, May 10, 2007 8:18 PM To: Flash Coders Subject: [Flashcoders] if(color == X) {} looking for method. ...I am wanting to run a color of instance test. I am wondering if I can

Re: [Flashcoders] if(color == X) {} looking for method.

2007-05-10 Thread Leandro Amano
Please, test the code below: import flash.geom.Transform; import flash.geom.ColorTransform; var transf:Transform = new Transform(mc); var color:ColorTransform = new ColorTransform(); transf.colorTransform = color; color.rgb = 0x99; trace(color.rgb); trace(0x+color.rgb.toString(16)); if

Re: [Flashcoders] if(color == X) {} looking for method.

2007-05-10 Thread Ian Thomas
Take a look at the BitmapData function: getColorBoundsRect() It might be handy. It can certainly tell you if a clip contains any specific colour (if you take a BitmapData copy of the clip first). If not, I guess getPixel() and getPixel32() might be of help. Hope that's helpful, Ian On

Re: [Flashcoders] if(color == X) {} looking for method.

2007-05-10 Thread Johannes Nel
you can test for colour by taking a bitmap data snapshot and using getPixel or getPixel32 on it. On 5/10/07, Danny Kodicek [EMAIL PROTECTED] wrote: ...I am wanting to run a color of instance test. I am wondering if I can do this? attachMovie(shapes,shapes,num); if( shapes /*color*/ ==

Re: [Flashcoders] if(color == X) {} looking for method.

2007-05-10 Thread Leandro Amano
get color through getPixel method: import flash.display.BitmapData; var mc:MovieClip = this.attachMovie(mc, mc2, 1); var bmp:BitmapData = new BitmapData(mc._width, mc._height, false); bmp.draw(mc); color = bmp.getPixel(mc._x, mc._y); trace(color.toString(16)); []'s Leandro Amano On 5/10/07,

RE: [Flashcoders] if(color == X) {} looking for method.

2007-05-10 Thread Merrill, Jason
Please, test the code below: import flash.geom.Transform; import flash.geom.ColorTransform; var transf:Transform = new Transform(mc); var color:ColorTransform = new ColorTransform(); transf.colorTransform = color; color.rgb = 0x99; trace(color.rgb); trace(0x+color.rgb.toString(16)); if

Re: [Flashcoders] if(color == X) {} looking for method.

2007-05-10 Thread Leandro Amano
Hi Jason, []'s = hug's, regards... I finished to send another example with getPixel(). But I did not understand its email of reply, is an attack? I'm sorry for some aggression badly understood... bye Leandro Amano On 5/10/07, Merrill, Jason [EMAIL PROTECTED] wrote: Please, test the code