<?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>Yahoo! Flash (R) Blog &#187; Examples</title>
	<atom:link href="http://www.yswfblog.com/blog/index.php/category/examples/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.yswfblog.com/blog</link>
	<description>News and Articles on Yahoo! Flash Components and Libraries</description>
	<lastBuildDate>Sat, 19 Jun 2010 23:05:10 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Flash 10 Experiments: The Warholizer (Loading and Processing Local Images)</title>
		<link>http://www.yswfblog.com/blog/2008/12/22/flash-10-experiments-the-warholizer-loading-and-processing-local-images/</link>
		<comments>http://www.yswfblog.com/blog/2008/12/22/flash-10-experiments-the-warholizer-loading-and-processing-local-images/#comments</comments>
		<pubDate>Mon, 22 Dec 2008 18:21:44 +0000</pubDate>
		<dc:creator>Allen Rabinovich</dc:creator>
				<category><![CDATA[Examples]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Flash 10]]></category>
		<category><![CDATA[Local Images]]></category>
		<category><![CDATA[Warholizer]]></category>

		<guid isPermaLink="false">http://www.yswfblog.com/blog/?p=97</guid>
		<description><![CDATA[One of the new features in Flash Player 10 is the ability to read local files. We&#8217;ve been looking at this feature for some of our upcoming components, and built a small example that demonstrates how to load, display, and process local images.  This example, dubbed &#8220;The Warholizer&#8221;, allows you to open any image file [...]]]></description>
			<content:encoded><![CDATA[<p>One of the new features in Flash Player 10 is the ability to read local files. We&#8217;ve been looking at this feature for some of our upcoming components, and built a small example that demonstrates how to load, display, and process local images.  This example, dubbed &#8220;The Warholizer&#8221;, allows you to open any image file on your machine, and without uploading it to the server, extract the image&#8217;s bitmap data, and run it through some color filters, achieving an effect not unlike the one in some of Andy Warhol&#8217;s work. Try it out by dropping in a photo of your own for those 15 minutes of fame (though make sure the image is not too large: Flash has an upper limit on the size of bitmaps):</p>
<p><script src="http://us.js2.yimg.com/us.js.yimg.com/lib/flash/swfobject/1.0/swfobject.js" type="text/javascript"></script></p>
<div id="ImageLoaderDemo">Note: The proper version of <a href="http://www.adobe.com/go/getflashplayer">Flash Player</a> is not installed or JavaScript is not enabled. Unable to display SWF content.</div>
<p><script type="text/javascript"><!--
 var swfobj = new SWFObject( "http://www.yswfblog.com/blog/wp-content/uploads/2008/12/imageloader.swf", "ImageLoaderDemo", "100%", "500", "10.0.0" ); 
swfobj.write( "ImageLoaderDemo" ); 
// --></script></p>
<p>The code for the example is below the fold.</p>
<p><span id="more-97"></span></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #66cc66;">&lt;</span>?<span style="color: #0066CC;">xml</span> <span style="color: #0066CC;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #66cc66;">&gt;</span>
&nbsp;
<span style="color: #66cc66;">&lt;</span>mx:Application xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span> layout=<span style="color: #ff0000;">&quot;absolute&quot;</span> initialize=<span style="color: #ff0000;">&quot;init();&quot;</span> xmlns:ns1=<span style="color: #ff0000;">&quot;com.yahoo.astra.mx.controls.*&quot;</span><span style="color: #66cc66;">&gt;</span>
&nbsp;
<span style="color: #66cc66;">&lt;</span>mx:Script<span style="color: #66cc66;">&gt;</span>
	<span style="color: #66cc66;">&lt;!</span><span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span>
&nbsp;
<span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">core</span>.<span style="color: #006600;">Container</span>;
<span style="color: #0066CC;">import</span> mx.<span style="color: #006600;">core</span>.<span style="color: #006600;">UIComponent</span>;
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">FileReference</span>;
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">BitmapData</span>;
&nbsp;
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> fileRef:FileReference = <span style="color: #000000; font-weight: bold;">new</span> FileReference<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> init<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	fileRef.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">SELECT</span>, handleSelectedImage<span style="color: #66cc66;">&#41;</span>;
	fileRef.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">COMPLETE</span>, handleFileLoad<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> handleBrowseClick <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> typeFilter:<span style="color: #0066CC;">Array</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	typeFilter.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> FileFilter<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Images&quot;</span>, <span style="color: #ff0000;">&quot;*.jpg;*.gif;*.png&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
	fileRef.<span style="color: #006600;">browse</span><span style="color: #66cc66;">&#40;</span>typeFilter<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> handleSelectedImage<span style="color: #66cc66;">&#40;</span>evt:Event<span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	fileName.<span style="color: #0066CC;">text</span> = fileRef.<span style="color: #0066CC;">name</span>;
	fileRef.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> handleFileLoad <span style="color: #66cc66;">&#40;</span>evt:Event<span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> fileByteData:ByteArray = <span style="color: #000000; font-weight: bold;">new</span> ByteArray<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	fileByteData = fileRef.<span style="color: #0066CC;">data</span> as ByteArray;
&nbsp;
	<span style="color: #000000; font-weight: bold;">var</span> loader:Loader = <span style="color: #000000; font-weight: bold;">new</span> Loader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	loader.<span style="color: #006600;">contentLoaderInfo</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">COMPLETE</span>, extractBitmapData<span style="color: #66cc66;">&#41;</span>;
	loader.<span style="color: #006600;">loadBytes</span><span style="color: #66cc66;">&#40;</span>fileByteData<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> extractBitmapData <span style="color: #66cc66;">&#40;</span>evt:Event<span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> sourceBMP:Bitmap = evt.<span style="color: #006600;">currentTarget</span>.<span style="color: #006600;">loader</span>.<span style="color: #006600;">content</span> as Bitmap;
	<span style="color: #000000; font-weight: bold;">var</span> outputBMP:Bitmap = <span style="color: #000000; font-weight: bold;">new</span> Bitmap<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> BitmapData <span style="color: #66cc66;">&#40;</span>sourceBMP.<span style="color: #0066CC;">width</span><span style="color: #66cc66;">*</span><span style="color: #cc66cc;">2</span> + <span style="color: #cc66cc;">10</span>, sourceBMP.<span style="color: #0066CC;">height</span><span style="color: #66cc66;">*</span><span style="color: #cc66cc;">2</span> + <span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span>, <span style="color: #ff0000;">&quot;auto&quot;</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<span style="color: #000000; font-weight: bold;">var</span> sourceRect:Rectangle = <span style="color: #000000; font-weight: bold;">new</span> Rectangle<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">0</span>,sourceBMP.<span style="color: #0066CC;">width</span>, sourceBMP.<span style="color: #0066CC;">height</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<span style="color: #000000; font-weight: bold;">var</span> blueTransform:ColorTransform = <span style="color: #000000; font-weight: bold;">new</span> ColorTransform<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #000000; font-weight: bold;">var</span> yellowTransform:ColorTransform = <span style="color: #000000; font-weight: bold;">new</span> ColorTransform<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">10</span>,<span style="color: #cc66cc;">10</span>,<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #000000; font-weight: bold;">var</span> greenTransform:ColorTransform = <span style="color: #000000; font-weight: bold;">new</span> ColorTransform<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">10</span>,<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #000000; font-weight: bold;">var</span> redTransform:ColorTransform = <span style="color: #000000; font-weight: bold;">new</span> ColorTransform<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">10</span>,<span style="color: #cc66cc;">1</span>,<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
	outputBMP.<span style="color: #006600;">bitmapData</span>.<span style="color: #006600;">copyPixels</span><span style="color: #66cc66;">&#40;</span>sourceBMP.<span style="color: #006600;">bitmapData</span>, sourceRect, <span style="color: #000000; font-weight: bold;">new</span> Point<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
	outputBMP.<span style="color: #006600;">bitmapData</span>.<span style="color: #006600;">copyPixels</span><span style="color: #66cc66;">&#40;</span>sourceBMP.<span style="color: #006600;">bitmapData</span>, sourceRect, <span style="color: #000000; font-weight: bold;">new</span> Point<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, sourceBMP.<span style="color: #0066CC;">height</span> + <span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
	outputBMP.<span style="color: #006600;">bitmapData</span>.<span style="color: #006600;">copyPixels</span><span style="color: #66cc66;">&#40;</span>sourceBMP.<span style="color: #006600;">bitmapData</span>, sourceRect, <span style="color: #000000; font-weight: bold;">new</span> Point<span style="color: #66cc66;">&#40;</span>sourceBMP.<span style="color: #0066CC;">width</span> + <span style="color: #cc66cc;">10</span>, <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
	outputBMP.<span style="color: #006600;">bitmapData</span>.<span style="color: #006600;">copyPixels</span><span style="color: #66cc66;">&#40;</span>sourceBMP.<span style="color: #006600;">bitmapData</span>, sourceRect, <span style="color: #000000; font-weight: bold;">new</span> Point<span style="color: #66cc66;">&#40;</span>sourceBMP.<span style="color: #0066CC;">width</span> + <span style="color: #cc66cc;">10</span>, sourceBMP.<span style="color: #0066CC;">height</span> + <span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
	outputBMP.<span style="color: #006600;">bitmapData</span>.<span style="color: #006600;">colorTransform</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Rectangle<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">0</span>, sourceBMP.<span style="color: #0066CC;">width</span>, sourceBMP.<span style="color: #0066CC;">height</span><span style="color: #66cc66;">&#41;</span>, blueTransform<span style="color: #66cc66;">&#41;</span>;
	outputBMP.<span style="color: #006600;">bitmapData</span>.<span style="color: #006600;">colorTransform</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Rectangle<span style="color: #66cc66;">&#40;</span>sourceBMP.<span style="color: #0066CC;">width</span>+<span style="color: #cc66cc;">10</span>, <span style="color: #cc66cc;">0</span>, sourceBMP.<span style="color: #0066CC;">width</span>, sourceBMP.<span style="color: #0066CC;">height</span><span style="color: #66cc66;">&#41;</span>, yellowTransform<span style="color: #66cc66;">&#41;</span>;
	outputBMP.<span style="color: #006600;">bitmapData</span>.<span style="color: #006600;">colorTransform</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Rectangle<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>,sourceBMP.<span style="color: #0066CC;">height</span> + <span style="color: #cc66cc;">10</span>, sourceBMP.<span style="color: #0066CC;">width</span>, sourceBMP.<span style="color: #0066CC;">height</span><span style="color: #66cc66;">&#41;</span>, redTransform<span style="color: #66cc66;">&#41;</span>;
	outputBMP.<span style="color: #006600;">bitmapData</span>.<span style="color: #006600;">colorTransform</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Rectangle<span style="color: #66cc66;">&#40;</span>sourceBMP.<span style="color: #0066CC;">width</span>+<span style="color: #cc66cc;">10</span>,sourceBMP.<span style="color: #0066CC;">height</span>+<span style="color: #cc66cc;">10</span>, sourceBMP.<span style="color: #0066CC;">width</span>, sourceBMP.<span style="color: #0066CC;">height</span><span style="color: #66cc66;">&#41;</span>, greenTransform<span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<span style="color: #000000; font-weight: bold;">var</span> ratio:<span style="color: #0066CC;">Number</span> = outputBMP.<span style="color: #0066CC;">width</span> <span style="color: #66cc66;">/</span> outputBMP.<span style="color: #0066CC;">height</span>;
	<span style="color: #000000; font-weight: bold;">var</span> sourceRatio:<span style="color: #0066CC;">Number</span> = sourceBMP.<span style="color: #0066CC;">width</span> <span style="color: #66cc66;">/</span> sourceBMP.<span style="color: #0066CC;">height</span>;
	sourceBMP.<span style="color: #0066CC;">width</span> = <span style="color: #cc66cc;">200</span>;
	sourceBMP.<span style="color: #0066CC;">height</span> = <span style="color: #cc66cc;">200</span><span style="color: #66cc66;">/</span>ratio;
&nbsp;
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>outputPanel.<span style="color: #0066CC;">width</span> <span style="color: #66cc66;">&gt;</span> outputPanel.<span style="color: #0066CC;">height</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
	outputBMP.<span style="color: #0066CC;">height</span> = outputPanel.<span style="color: #0066CC;">height</span> - <span style="color: #cc66cc;">100</span>;
	outputBMP.<span style="color: #0066CC;">width</span> = outputBMP.<span style="color: #0066CC;">height</span> <span style="color: #66cc66;">*</span> ratio;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span>
	outputBMP.<span style="color: #0066CC;">width</span> = outputPanel.<span style="color: #0066CC;">width</span> - <span style="color: #cc66cc;">50</span>;
	outputBMP.<span style="color: #0066CC;">height</span> = outputBMP.<span style="color: #0066CC;">width</span> <span style="color: #66cc66;">/</span> ratio;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #000000; font-weight: bold;">var</span> outputContainer:UIComponent = <span style="color: #000000; font-weight: bold;">new</span> UIComponent<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #000000; font-weight: bold;">var</span> sourceContainer:UIComponent = <span style="color: #000000; font-weight: bold;">new</span> UIComponent<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	<span style="color: #000000; font-weight: bold;">var</span> arrowContainer:UIComponent = <span style="color: #000000; font-weight: bold;">new</span> UIComponent<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
	sourceContainer.<span style="color: #0066CC;">width</span> = sourceBMP.<span style="color: #0066CC;">width</span>;
	sourceContainer.<span style="color: #0066CC;">height</span> = sourceBMP.<span style="color: #0066CC;">height</span>;
&nbsp;
	outputContainer.<span style="color: #0066CC;">width</span> = outputBMP.<span style="color: #0066CC;">width</span>;
	outputContainer.<span style="color: #0066CC;">height</span> = outputBMP.<span style="color: #0066CC;">height</span>;
&nbsp;
	arrowContainer.<span style="color: #0066CC;">width</span> = <span style="color: #cc66cc;">10</span>;
	arrowContainer.<span style="color: #0066CC;">height</span> = <span style="color: #cc66cc;">40</span>;
&nbsp;
	sourceContainer.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>sourceBMP<span style="color: #66cc66;">&#41;</span>;
	arrowContainer.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>drawArrow<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
	outputContainer.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>outputBMP<span style="color: #66cc66;">&#41;</span>;
&nbsp;
	outputPanel.<span style="color: #006600;">removeAllChildren</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
	outputPanel.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>sourceContainer<span style="color: #66cc66;">&#41;</span>;
	outputPanel.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>arrowContainer<span style="color: #66cc66;">&#41;</span>;
	outputPanel.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>outputContainer<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> drawArrow <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : Sprite <span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> targetSprite:Sprite = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	targetSprite.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">beginFill</span><span style="color: #66cc66;">&#40;</span>0x000000<span style="color: #66cc66;">&#41;</span>;
	targetSprite.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">lineTo</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">10</span>,<span style="color: #cc66cc;">20</span><span style="color: #66cc66;">&#41;</span>;
	targetSprite.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">lineTo</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">40</span><span style="color: #66cc66;">&#41;</span>;
	targetSprite.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">lineTo</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>;
	targetSprite.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">endFill</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;	
<span style="color: #b1b100;">return</span> targetSprite;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&gt;</span>
<span style="color: #66cc66;">&lt;/</span>mx:Script<span style="color: #66cc66;">&gt;</span>
<span style="color: #66cc66;">&lt;</span>mx:<span style="color: #0066CC;">Button</span> id=<span style="color: #ff0000;">&quot;browseButton&quot;</span> label=<span style="color: #ff0000;">&quot;Browse for an image&quot;</span> <span style="color: #0066CC;">right</span>=<span style="color: #ff0000;">&quot;10&quot;</span> top=<span style="color: #ff0000;">&quot;10&quot;</span> click=<span style="color: #ff0000;">&quot;handleBrowseClick();&quot;</span><span style="color: #66cc66;">/&gt;</span>
<span style="color: #66cc66;">&lt;</span>mx:TextInput id=<span style="color: #ff0000;">&quot;fileName&quot;</span> <span style="color: #0066CC;">right</span>=<span style="color: #ff0000;">&quot;166&quot;</span> top=<span style="color: #ff0000;">&quot;10&quot;</span><span style="color: #66cc66;">/&gt;</span>
<span style="color: #66cc66;">&lt;</span>mx:Label <span style="color: #0066CC;">text</span>=<span style="color: #ff0000;">&quot;Warholizer&quot;</span> fontWeight=<span style="color: #ff0000;">&quot;bold&quot;</span> fontSize=<span style="color: #ff0000;">&quot;17&quot;</span> <span style="color: #0066CC;">left</span>=<span style="color: #ff0000;">&quot;7&quot;</span> top=<span style="color: #ff0000;">&quot;6&quot;</span><span style="color: #66cc66;">/&gt;</span>
<span style="color: #66cc66;">&lt;</span>mx:Panel layout=<span style="color: #ff0000;">&quot;horizontal&quot;</span> bottom=<span style="color: #ff0000;">&quot;10&quot;</span> <span style="color: #0066CC;">right</span>=<span style="color: #ff0000;">&quot;10&quot;</span> <span style="color: #0066CC;">left</span>=<span style="color: #ff0000;">&quot;10&quot;</span> top=<span style="color: #ff0000;">&quot;41&quot;</span> id=<span style="color: #ff0000;">&quot;outputPanel&quot;</span> clipContent=<span style="color: #ff0000;">&quot;true&quot;</span> title=<span style="color: #ff0000;">&quot;Output&quot;</span> horizontalAlign=<span style="color: #ff0000;">&quot;center&quot;</span> verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span><span style="color: #66cc66;">&gt;</span>
<span style="color: #66cc66;">&lt;/</span>mx:Panel<span style="color: #66cc66;">&gt;</span>
<span style="color: #66cc66;">&lt;/</span>mx:Application<span style="color: #66cc66;">&gt;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://www.yswfblog.com/blog/2008/12/22/flash-10-experiments-the-warholizer-loading-and-processing-local-images/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
	</channel>
</rss>
