RE: [Flashcoders] if(color == X) {} looking for method.
...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 colour - what exactly are you trying to do? Danny ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] if(color == X) {} looking for method.
I don't think u can check the color of the mc which is set at authoring time When u set the color of the mc through a color object u can retrive the color Here is the code var my_color:Color = new Color(mc); my_color.setRGB(0xFF); // my_mc turns red trace(my_color.getRGB().toString(16)); //Retruns a value converted to hexadecimal format //ff You can check for these values If u set the color at authoring time.. you need to set the color to a variable to check the condition and execute any statement.. I think this would solve ur problem Durai 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 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. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com DISCLAIMER: This communication may be confidential and privileged and the views expressed herein may be personal and are not necessarily the views of ReDIM. It is for the exclusive use of the intended recipient. If you are not the intended recipient, please note that any distribution, copying or use of this communication or the information in it is strictly prohibited.If you have received this communication in error, please notify us by email ([EMAIL PROTECTED]) and then delete the email and any copies of it. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] if(color == X) {} looking for method.
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 (parseInt(color.rgb.toString(16)) === 99) { trace(ok); } []'s Leandro Amano On 5/10/07, Paul V. [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*/ == 0x33){ // action(s) } // this is sudo code but basically I want to know if I can test for color. Thanks, Vdst. ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- -- Leandro Amano Digital Bug Chief Creative Officer Adobe Certified Expert Adobe Certified Instructor Adobe User Group Leader ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] if(color == X) {} looking for method.
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 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*/ == 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 colour - what exactly are you trying to do? Danny ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] if(color == X) {} looking for method.
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*/ == 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 colour - what exactly are you trying to do? Danny ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- j:pn http://www.lennel.org ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] if(color == X) {} looking for method.
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, 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*/ == 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 colour - what exactly are you trying to do? Danny ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- -- Leandro Amano Digital Bug Chief Creative Officer Adobe Certified Expert Adobe Certified Instructor Adobe User Group Leader ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] if(color == X) {} looking for method.
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 (parseInt(color.rgb.toString(16)) === 99) { trace(ok); } []'s Leandro Amano I believe he's asking to check color on an existing movie clip, not something you set via ColorTransform. I don't think it's possible is it? And by the way, curious what []'s is used for in your sig - some inside joke or something subtle I don't get? Jason Merrill Bank of America GTO Learning Leadership Development eTools Multimedia Team ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] if(color == X) {} looking for method.
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 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 (parseInt(color.rgb.toString(16)) === 99) { trace(ok); } []'s Leandro Amano I believe he's asking to check color on an existing movie clip, not something you set via ColorTransform. I don't think it's possible is it? And by the way, curious what []'s is used for in your sig - some inside joke or something subtle I don't get? Jason Merrill Bank of America GTO Learning Leadership Development eTools Multimedia Team ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- -- Leandro Amano Digital Bug Chief Creative Officer Adobe Certified Expert Adobe Certified Instructor Adobe User Group Leader ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com