<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Flex Reflections Component and Actionscript Class</title>
	<atom:link href="http://www.sebastiaanholtrop.com/archives/17/feed" rel="self" type="application/rss+xml" />
	<link>http://www.sebastiaanholtrop.com/archives/17</link>
	<description>Creating stuff that works...</description>
	<lastBuildDate>Tue, 15 Jun 2010 21:57:31 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Robert</title>
		<link>http://www.sebastiaanholtrop.com/archives/17/comment-page-1#comment-4787</link>
		<dc:creator>Robert</dc:creator>
		<pubDate>Wed, 17 Mar 2010 16:24:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.sebastiaanholtrop.com/?p=17#comment-4787</guid>
		<description>Nice component.

Will work with video if you just plop a video object in a UIComponent wrapper but that&#039;s not practical for most apps.  Video components are usually wrapped in layout containers like Canvas.  I can&#039;t get it to reflect the contents of a Canvas so won&#039;t work for my video.  Shame.  Like the look.</description>
		<content:encoded><![CDATA[<p>Nice component.</p>
<p>Will work with video if you just plop a video object in a UIComponent wrapper but that&#8217;s not practical for most apps.  Video components are usually wrapped in layout containers like Canvas.  I can&#8217;t get it to reflect the contents of a Canvas so won&#8217;t work for my video.  Shame.  Like the look.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robert</title>
		<link>http://www.sebastiaanholtrop.com/archives/17/comment-page-1#comment-4585</link>
		<dc:creator>Robert</dc:creator>
		<pubDate>Thu, 25 Feb 2010 17:29:39 +0000</pubDate>
		<guid isPermaLink="false">http://www.sebastiaanholtrop.com/?p=17#comment-4585</guid>
		<description>Has anyone tried to use this with an ActionScript video object?  I have a Flex app with a custom player used for live streaming that is created in ActionScript (no mx:VideoDisplay object).  I wrap the video object in a UIComponent to display.  Tried targeting the UIComponent but get the &quot;Invalid BitmapData&quot; error on Reflect.as line 53.</description>
		<content:encoded><![CDATA[<p>Has anyone tried to use this with an ActionScript video object?  I have a Flex app with a custom player used for live streaming that is created in ActionScript (no mx:VideoDisplay object).  I wrap the video object in a UIComponent to display.  Tried targeting the UIComponent but get the &#8220;Invalid BitmapData&#8221; error on Reflect.as line 53.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: niamath</title>
		<link>http://www.sebastiaanholtrop.com/archives/17/comment-page-1#comment-3855</link>
		<dc:creator>niamath</dc:creator>
		<pubDate>Mon, 28 Dec 2009 11:24:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.sebastiaanholtrop.com/?p=17#comment-3855</guid>
		<description>Excellent component man, I need this exactly. thanks.</description>
		<content:encoded><![CDATA[<p>Excellent component man, I need this exactly. thanks.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andrew</title>
		<link>http://www.sebastiaanholtrop.com/archives/17/comment-page-1#comment-3842</link>
		<dc:creator>Andrew</dc:creator>
		<pubDate>Sat, 26 Dec 2009 15:17:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.sebastiaanholtrop.com/?p=17#comment-3842</guid>
		<description>It doesn&#039;t seem like you can reflect a Canvas. Or am I missing something? I get the error:

Type Coercion failed: cannot convert flash.display::Bitmap@160ddcb9 to mx.core.IUIComponent.

Any suggestions for a code modification to be able to allow any UIComponent as the source?</description>
		<content:encoded><![CDATA[<p>It doesn&#8217;t seem like you can reflect a Canvas. Or am I missing something? I get the error:</p>
<p>Type Coercion failed: cannot convert flash.display::Bitmap@160ddcb9 to mx.core.IUIComponent.</p>
<p>Any suggestions for a code modification to be able to allow any UIComponent as the source?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter Hastie</title>
		<link>http://www.sebastiaanholtrop.com/archives/17/comment-page-1#comment-3621</link>
		<dc:creator>Peter Hastie</dc:creator>
		<pubDate>Wed, 02 Dec 2009 21:49:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.sebastiaanholtrop.com/?p=17#comment-3621</guid>
		<description>Thanks for sharing your components with the world, Seb! Very nice stuff.

Replacing the body of the createGradientBitmapData function with the following code should stop the black squares showing around non square reflections.

&lt;code&gt;
var colors:Array = [0x00000000, 0x00000000];
		 	var alphas:Array = [this.alpha, 0];
		  	var ratios:Array = [0, this.ratio];
			var rotation:Number = 0.5;
			
			var gradientSprite:Sprite = new Sprite();
			
			// We only want the bitmap for the shape
			var image:Bitmap = new Bitmap(new BitmapData(_sourceBitmap.width, _sourceBitmap.height, true, 0x00000000));
			image.bitmapData.draw(_sourceBitmap);
			image.cacheAsBitmap = true;
			gradientSprite.addChild(image);
			
			// Lay the alpha gradient on top of the shape
			var gradientClip:Sprite = new Sprite();
			var matrix:Matrix = new Matrix();
			matrix.createGradientBox(image.width, image.height, rotation * Math.PI);
			gradientClip.graphics.beginGradientFill(GradientType.LINEAR, colors, alphas, ratios, matrix, SpreadMethod.PAD);
			gradientClip.graphics.drawRect(0,0,image.width,image.height);
			gradientClip.cacheAsBitmap = true;
			gradientSprite.addChild(gradientClip);
			
			// Mask the shape with the alpha gradient. Areas not covered by the shape will still have alpha = 0, even at the opaque 
			// end of the gradient
			image.mask = gradientClip;
			
			// Now write this as a bitmap
			_gradientBmd = new BitmapData(_sourceBitmap.width, _sourceBitmap.height, true, 0x00000000);
			_gradientBmd.draw(gradientSprite);
&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>Thanks for sharing your components with the world, Seb! Very nice stuff.</p>
<p>Replacing the body of the createGradientBitmapData function with the following code should stop the black squares showing around non square reflections.</p>
<p><code><br />
var colors:Array = [0x00000000, 0x00000000];<br />
		 	var alphas:Array = [this.alpha, 0];<br />
		  	var ratios:Array = [0, this.ratio];<br />
			var rotation:Number = 0.5;</p>
<p>			var gradientSprite:Sprite = new Sprite();</p>
<p>			// We only want the bitmap for the shape<br />
			var image:Bitmap = new Bitmap(new BitmapData(_sourceBitmap.width, _sourceBitmap.height, true, 0x00000000));<br />
			image.bitmapData.draw(_sourceBitmap);<br />
			image.cacheAsBitmap = true;<br />
			gradientSprite.addChild(image);</p>
<p>			// Lay the alpha gradient on top of the shape<br />
			var gradientClip:Sprite = new Sprite();<br />
			var matrix:Matrix = new Matrix();<br />
			matrix.createGradientBox(image.width, image.height, rotation * Math.PI);<br />
			gradientClip.graphics.beginGradientFill(GradientType.LINEAR, colors, alphas, ratios, matrix, SpreadMethod.PAD);<br />
			gradientClip.graphics.drawRect(0,0,image.width,image.height);<br />
			gradientClip.cacheAsBitmap = true;<br />
			gradientSprite.addChild(gradientClip);</p>
<p>			// Mask the shape with the alpha gradient. Areas not covered by the shape will still have alpha = 0, even at the opaque<br />
			// end of the gradient<br />
			image.mask = gradientClip;</p>
<p>			// Now write this as a bitmap<br />
			_gradientBmd = new BitmapData(_sourceBitmap.width, _sourceBitmap.height, true, 0x00000000);<br />
			_gradientBmd.draw(gradientSprite);<br />
</code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Paul</title>
		<link>http://www.sebastiaanholtrop.com/archives/17/comment-page-1#comment-3355</link>
		<dc:creator>Paul</dc:creator>
		<pubDate>Thu, 12 Nov 2009 15:15:12 +0000</pubDate>
		<guid isPermaLink="false">http://www.sebastiaanholtrop.com/?p=17#comment-3355</guid>
		<description>Hey, when I drop this reflection for an image, which has got a button under him, it makes that button unclickable, like it would be above him. Any ideas how to deal with it?</description>
		<content:encoded><![CDATA[<p>Hey, when I drop this reflection for an image, which has got a button under him, it makes that button unclickable, like it would be above him. Any ideas how to deal with it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Purni</title>
		<link>http://www.sebastiaanholtrop.com/archives/17/comment-page-1#comment-2539</link>
		<dc:creator>Purni</dc:creator>
		<pubDate>Tue, 18 Aug 2009 13:11:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.sebastiaanholtrop.com/?p=17#comment-2539</guid>
		<description>i am getting a black square for images while are in shapes other than square or rectangle... does anyone have solution for tat??</description>
		<content:encoded><![CDATA[<p>i am getting a black square for images while are in shapes other than square or rectangle&#8230; does anyone have solution for tat??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Elan</title>
		<link>http://www.sebastiaanholtrop.com/archives/17/comment-page-1#comment-2013</link>
		<dc:creator>Elan</dc:creator>
		<pubDate>Wed, 03 Jun 2009 11:58:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.sebastiaanholtrop.com/?p=17#comment-2013</guid>
		<description>Hi,

Its working great but when use circle [transparent]image the reflection will appear only with black background so its looks like square.How do i handle it.</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>Its working great but when use circle [transparent]image the reflection will appear only with black background so its looks like square.How do i handle it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mitesh panchal</title>
		<link>http://www.sebastiaanholtrop.com/archives/17/comment-page-1#comment-1982</link>
		<dc:creator>Mitesh panchal</dc:creator>
		<pubDate>Thu, 21 May 2009 13:26:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.sebastiaanholtrop.com/?p=17#comment-1982</guid>
		<description>Hi,I have an image and i want to remove white color from image.That removing color is same like its background color.If anybody have any idea of this problem please reply me on mitesh@clientdriveninnovation.com .And my application in Flex 3 so please send me action script code of this problem.Thank you</description>
		<content:encoded><![CDATA[<p>Hi,I have an image and i want to remove white color from image.That removing color is same like its background color.If anybody have any idea of this problem please reply me on <a href="mailto:mitesh@clientdriveninnovation.com">mitesh@clientdriveninnovation.com</a> .And my application in Flex 3 so please send me action script code of this problem.Thank you</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: admin</title>
		<link>http://www.sebastiaanholtrop.com/archives/17/comment-page-1#comment-1915</link>
		<dc:creator>admin</dc:creator>
		<pubDate>Sun, 10 May 2009 08:12:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.sebastiaanholtrop.com/?p=17#comment-1915</guid>
		<description>I think it should work with png&#039;s with transparency as well, give it a try and let me know :-)</description>
		<content:encoded><![CDATA[<p>I think it should work with png&#8217;s with transparency as well, give it a try and let me know <img src='http://www.sebastiaanholtrop.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
