<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>CodeGuiles.com</title>
	<atom:link href="http://www.codeguiles.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codeguiles.com</link>
	<description>Code Guiles and other programming stuff</description>
	<lastBuildDate>Sat, 03 Oct 2009 18:04:38 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>Flex transparency with PNG on mouse over and mouse click</title>
		<link>http://www.codeguiles.com/2009/09/20/flex-transparency-with-png-on-mouse-over-and-mouse-click/</link>
		<comments>http://www.codeguiles.com/2009/09/20/flex-transparency-with-png-on-mouse-over-and-mouse-click/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 02:50:13 +0000</pubDate>
		<dc:creator>Trak</dc:creator>
				<category><![CDATA[Flex]]></category>
		<category><![CDATA[action script]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.codeguiles.com/?p=18</guid>
		<description><![CDATA[Handling transparencies of PNG images in flex can be a burden, here I show a very simple method to do it without vectorizing it.]]></description>
			<content:encoded><![CDATA[<p>If you have tried using a PNG image in Flex and getting the transparency to work with on RollOver or Click events you might have noticed the transparency IS recognized as a valid mouse area. Therefore your rollOver or click events get called even when the user click on the transparent area of the image.</p>
<p>Well this happened to me in a project and was very frustrating. <a title="Post" href="http://dougmccune.com/blog/2007/02/03/using-hittestpoint-or-hittest-on-transparent-png-images/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/dougmccune.com/blog/2007/02/03/using-hittestpoint-or-hittest-on-transparent-png-images/?referer=');">Here</a> you can see a more detailed explanation of what&#8217;s going on with the hitTest in PNGs.  The ideal solution would be to have the image vectorized. This could be accomplished using Flash&#8217;s Trace Bitmap feature. However sometimes this method ends with a very heavy shape that it&#8217;s hard to render and to drag around the screen.   The good thing about it is that you can scale it as far as you want without loosing too much quality depending on how good your tracing was.</p>
<p>Here I leave a little guile of how it could be accomplished without vectorizing the image, just removing the transparency. Here I assume you already know how to embed flash symbols in Flex converting them in ActionScrip exportable components. If you don&#8217;t know how to then Adobe has great documentation on it.</p>
<ul>
<li>First put your PNG image in <em>Flash</em></li>
<li>Right click on it and select <em>Break Appart</em></li>
<li>Select the <em>Magic Wand (you have to select the lazo first)</em> and then select all the transparent area of your image</li>
<li>Delete the selected area and repeat until all the transparent areas are deleted</li>
<li>Convert your image to a new actionscript exportable symbol (and all the rest to make it available in <em>Flex</em>)</li>
<li>Use the new symbol in <em>Flex </em>as an image source.</li>
</ul>
<p>After doing it I reazlied the process isn&#8217;t a big deal, anyone could have done it but well for us it took  us a while to think about it so I&#8217;m posting it here hoping someone could save some time or get more ideas.  Feel free to comment and tell me what you think, or even better tell me if there is a better way to do it <img src='http://www.codeguiles.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.codeguiles.com/2009/09/20/flex-transparency-with-png-on-mouse-over-and-mouse-click/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>My First Blog Post</title>
		<link>http://www.codeguiles.com/2009/09/13/my-first-blog-post/</link>
		<comments>http://www.codeguiles.com/2009/09/13/my-first-blog-post/#comments</comments>
		<pubDate>Sun, 13 Sep 2009 09:53:58 +0000</pubDate>
		<dc:creator>Trak</dc:creator>
				<category><![CDATA[About Me]]></category>
		<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[first blogging logo symfony extjs php]]></category>

		<guid isPermaLink="false">http://codeguiles.com/?p=6</guid>
		<description><![CDATA[So after a few new followers on my tweeter account (@ivanmreys) and some thoughts about sharing some of my ideas I decided to start my own blog. This blog will be about coding standards, tricks, methods, solutions, and anything else I can think that would be useful for somebody somewhere.  If something here helps you [...]]]></description>
			<content:encoded><![CDATA[<p>So after a few new followers on my tweeter account (@ivanmreys) and some thoughts about sharing some of my ideas I decided to start my own blog. This blog will be about coding standards, tricks, methods, solutions, and anything else I can think that would be useful for somebody somewhere.  If something here helps you save a couple of mins or hours with some problem then please leave a comment and if it doesn&#8217;t then also please leave a comment.</p>
<p>I&#8217;m an engineer and as most of them my aesthetic sense is screwed up. If anyone can help with some logo then please leave me a comment or contact me on tweeter.</p>
<p>So far this is all I have to say, but hopefully pretty soon I&#8217;ll start posting more info in here. Oh I almost forgot&#8230; my name is Ivan Rey but I&#8217;ll post here under my favorite nickname Trak <img src='http://www.codeguiles.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.codeguiles.com/2009/09/13/my-first-blog-post/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

