<?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>franto.com &#187; AS3 Tip</title>
	<atom:link href="http://franto.com/tag/as3-tip/feed/" rel="self" type="application/rss+xml" />
	<link>http://franto.com</link>
	<description></description>
	<lastBuildDate>Wed, 09 May 2012 19:38:06 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>AS3 Conditional Breakpoint &#8211; enterDebugger()</title>
		<link>http://franto.com/as3-conditional-breakpoint-enterdebugger/</link>
		<comments>http://franto.com/as3-conditional-breakpoint-enterdebugger/#comments</comments>
		<pubDate>Wed, 04 Feb 2009 10:41:47 +0000</pubDate>
		<dc:creator>Franto</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex Tips]]></category>
		<category><![CDATA[AS3 Tip]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Flex Tip]]></category>

		<guid isPermaLink="false">http://www.franto.com/?p=922</guid>
		<description><![CDATA[I have to confess I didn't know about great function enterDebugger() in flash.debugger package. If you ever want to have conditional breakpoint you can do it programatically. Just add this statement to you code and debuger will stop as it there would be normal breakpoint. So you can use it in IF statement and call it just when some conditions are met. I think I will use this function a lot from now on :)]]></description>
			<content:encoded><![CDATA[<div class='series_toc'><h3>Table of contents for flex-tips</h3><ol><li><a href='http://franto.com/flextips/' title='FlexTips'>FlexTips</a></li><li><a href='http://franto.com/flextips-mxtext-vs-mxtextarea/' title='FlexTip: mx:Text vs. mx:TextArea'>FlexTip: mx:Text vs. mx:TextArea</a></li><li><a href='http://franto.com/flextips-xmlsocket-connect-after-disconnect-from-server/' title='FlexTip: XMLSocket connect() after disconnect from server'>FlexTip: XMLSocket connect() after disconnect from server</a></li><li><a href='http://franto.com/flextips-problem-with-masks-and-scalable-flash/' title='FlexTip: Problem with masks and scalable Flash'>FlexTip: Problem with masks and scalable Flash</a></li><li><a href='http://franto.com/flextips-how-to-add-bitmap-to-uicomponent/' title='FlexTips: How to add Bitmap to UIComponent'>FlexTips: How to add Bitmap to UIComponent</a></li><li><a href='http://franto.com/flextips-stop-displaying-focus/' title='FlexTip &#8211; Stop displaying Focus'>FlexTip &#8211; Stop displaying Focus</a></li><li><a href='http://franto.com/preventing-checkbox-selection-with-keyspace/' title='FlexTip: Preventing CheckBox selection with Key.SPACE'>FlexTip: Preventing CheckBox selection with Key.SPACE</a></li><li><a href='http://franto.com/flextip-wordwrap-for-mxtext/' title='FlexTip: WordWrap for mx:Text'>FlexTip: WordWrap for mx:Text</a></li><li><a href='http://franto.com/add-thumbs-to-mxslider-programatically/' title='FlexTip: Add Thumbs to Mx:Slider programatically'>FlexTip: Add Thumbs to Mx:Slider programatically</a></li><li>AS3 Conditional Breakpoint &#8211; enterDebugger()</li></ol></div> <div class="TweetButton_button" style="float: right; margin-left: 10px;;height:20px;margin-bottom:5px;"><a href="http://twitter.com/share data-url="http://franto.com/as3-conditional-breakpoint-enterdebugger/" data-text="AS3 Conditional Breakpoint &#038;%238211; enterDebugger()"data-count="vertical" data-lang="en" data-related="AS3+Tip,Flex,Flex+Tip""><img src="http://franto.com/blog2/wp-content/plugins/tweetbutton-for-wordpress/images/tweet.png" style="border:none" /></a></div>
<p>I have to confess I didn&#8217;t know about great function enterDebugger() in flash.debugger package. If you ever want to have conditional breakpoint you can do it programatically. Just add this statement to your code and debuger will stop as it there would be normal breakpoint. So you can use it in IF statement and call it just when some conditions are met. I think I will use this function a lot from now on <img src='http://franto.com/blog2/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Enjoy</p>
 <div class='series_links'><a href='http://franto.com/add-thumbs-to-mxslider-programatically/' title='FlexTip: Add Thumbs to Mx:Slider programatically'>Previous in series</a> </div>]]></content:encoded>
			<wfw:commentRss>http://franto.com/as3-conditional-breakpoint-enterdebugger/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Crop whitespace from PNG image</title>
		<link>http://franto.com/crop-whitespace-from-png-image/</link>
		<comments>http://franto.com/crop-whitespace-from-png-image/#comments</comments>
		<pubDate>Sun, 01 Feb 2009 11:04:55 +0000</pubDate>
		<dc:creator>Franto</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[AS3 Tip]]></category>

		<guid isPermaLink="false">http://www.franto.com/?p=912</guid>
		<description><![CDATA[Yesterday, I've posted about interesting AS3 Class <a href="http://www.franto.com/interactivepng-useful-as3-class">InteractivePNG</a>, and now I'm adding new addition for solving other problem with transparent Bitmaps. If you have transparent bitmap with whitespace around image and you want to crop whitespace around "real" image, you can use this function...]]></description>
			<content:encoded><![CDATA[<div class="TweetButton_button" style="float: right; margin-left: 10px;;height:20px;margin-bottom:5px;"><a href="http://twitter.com/share data-url="http://franto.com/crop-whitespace-from-png-image/" data-text="Crop whitespace from PNG image"data-count="vertical" data-lang="en" data-related="ActionScript,AS3+Tip,Flash""><img src="http://franto.com/blog2/wp-content/plugins/tweetbutton-for-wordpress/images/tweet.png" style="border:none" /></a></div>
<p>Yesterday, I&#8217;ve posted about interesting AS3 Class <a href="http://www.franto.com/interactivepng-useful-as3-class">InteractivePNG</a>, and now I&#8217;m adding new addition for solving other problem with transparent Bitmaps. If you have transparent bitmap with whitespace around image and you want to crop whitespace around &#8220;real&#8221; image, you can use this function&#8230;</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">public</span> static <span style="color: #339966; font-weight: bold;">function</span> getBitmapCroppedOutWhitespace<span style="color: #000000;">&#40;</span>bd<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">BitmapData</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Bitmap</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> bmd<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">BitmapData</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">BitmapData</span><span style="color: #000000;">&#40;</span>bd<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">width</span><span style="color: #000066; font-weight: bold;">,</span> bd<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">,</span> 0x00000000<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	bmd<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">draw</span><span style="color: #000000;">&#40;</span>bd<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">rect</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Rectangle</span> = bmd<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">getColorBoundsRect</span><span style="color: #000000;">&#40;</span>0xFFFFFF<span style="color: #000066; font-weight: bold;">,</span> 0x00000000<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	<span style="color: #6699cc; font-weight: bold;">var</span> bmd2<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">BitmapData</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">BitmapData</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">rect</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">width</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #004993;">rect</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">height</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">true</span><span style="color: #000066; font-weight: bold;">,</span> 0x00000000<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
	bmd2<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">draw</span><span style="color: #000000;">&#40;</span>bmd<span style="color: #000066; font-weight: bold;">,</span> <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Matrix</span><span style="color: #000000;">&#40;</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000066; font-weight: bold;">,</span><span style="color: #000000; font-weight:bold;">1</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000066; font-weight: bold;">-</span><span style="color: #004993;">rect</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">x</span><span style="color: #000066; font-weight: bold;">,</span> <span style="color: #000066; font-weight: bold;">-</span><span style="color: #004993;">rect</span><span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">y</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #6699cc; font-weight: bold;">var</span> bmp<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Bitmap</span> = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">Bitmap</span><span style="color: #000000;">&#40;</span>bmd2<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
	<span style="color: #0033ff; font-weight: bold;">return</span> bmp<span style="color: #000066; font-weight: bold;">;</span>
<span style="color: #000000;">&#125;</span></pre></div></div>

<p>From BitmapData it creates Bitmap without whitespace. It will find whitespace automaticaly and removes it. If you want to insert Bitmap data instead of BitmapData, just edit this function slightly. This is just idea how to do such cropping. Enjoy, I hope it will be useful for someone.</p>
]]></content:encoded>
			<wfw:commentRss>http://franto.com/crop-whitespace-from-png-image/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>AS3Tip: Tween in AS3.0 project</title>
		<link>http://franto.com/as3tip-tween-in-as30-project/</link>
		<comments>http://franto.com/as3tip-tween-in-as30-project/#comments</comments>
		<pubDate>Wed, 25 Jul 2007 06:54:19 +0000</pubDate>
		<dc:creator>Franto</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[AS3 Tip]]></category>
		<category><![CDATA[Tween]]></category>

		<guid isPermaLink="false">http://www.franto.com/blog2/flextips-tween-in-as30-project</guid>
		<description><![CDATA[If you want make just pure AS3.0 project, not Flex project, there is problem with Tween. Adobe has not included Tween to pure AS3.0 project, it&#8217;s included in Flex framework library (at least I don&#8217;t know something). So you have few possibilites how to use Tween in your project. By including Flex framework library, make [...]]]></description>
			<content:encoded><![CDATA[<div class="TweetButton_button" style="float: right; margin-left: 10px;;height:20px;margin-bottom:5px;"><a href="http://twitter.com/share data-url="http://franto.com/as3tip-tween-in-as30-project/" data-text="AS3Tip: Tween in AS3.0 project"data-count="vertical" data-lang="en" data-related="ActionScript,AS3+Tip,Tween""><img src="http://franto.com/blog2/wp-content/plugins/tweetbutton-for-wordpress/images/tweet.png" style="border:none" /></a></div>
<p>If you want make just pure AS3.0 project, not Flex project, there is problem with Tween. Adobe has not included Tween to pure AS3.0 project, it&#8217;s  included in Flex framework library (at least I don&#8217;t know something). So you have few possibilites how to use Tween in your project. By <a href="http://www.hcxm.cn/blog2/article.asp?id=147">including Flex framework library</a>, make your own Tween Class, or use any already built framework, packages which has custom Tween class inside.</p>
<p>Let me know, how you are using Tween in your AS3.0 projects, maybe you will help someone.</p>
<hr />
<p>Here is list of already build Tween classes for you (I will update it, when someone point out new class):</p>
<ul>
<li><a href="http://code.google.com/p/tweener/">http://code.google.com/p/tweener/</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://franto.com/as3tip-tween-in-as30-project/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

