<?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: Rounding the corners of an Image control in Flex using a mask</title>
	<atom:link href="http://blog.flexexamples.com/2008/09/09/rounding-the-corners-of-an-image-control-in-flex-using-a-mask/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2008/09/09/rounding-the-corners-of-an-image-control-in-flex-using-a-mask/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sun, 12 Feb 2012 19:26:49 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Eugen</title>
		<link>http://blog.flexexamples.com/2008/09/09/rounding-the-corners-of-an-image-control-in-flex-using-a-mask/comment-page-1/#comment-10277</link>
		<dc:creator>Eugen</dc:creator>
		<pubDate>Tue, 27 Dec 2011 20:41:34 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/09/09/rounding-the-corners-of-an-image-control-in-flex-using-a-mask/#comment-10277</guid>
		<description>hi Peter,

it&#039;s possible use this example on dynamical created images?

For example:

&lt;code&gt;

&lt;!-- http://blog.flexexamples.com/2008/09/09/rounding-the-corners-of-an-image-control-in-flex-using-a-mask/ --&gt;

 
    
        
    
 
    
        
    
 

&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p>hi Peter,</p>
<p>it&#8217;s possible use this example on dynamical created images?</p>
<p>For example:</p>
<p><code></p>
<p><!-- <a href="http://blog.flexexamples.com/2008/09/09/rounding-the-corners-of-an-image-control-in-flex-using-a-mask/" rel="nofollow">http://blog.flexexamples.com/2008/09/09/rounding-the-corners-of-an-image-control-in-flex-using-a-mask/ --></p>
<p></code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jonnie</title>
		<link>http://blog.flexexamples.com/2008/09/09/rounding-the-corners-of-an-image-control-in-flex-using-a-mask/comment-page-1/#comment-10078</link>
		<dc:creator>jonnie</dc:creator>
		<pubDate>Fri, 21 Oct 2011 16:40:50 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/09/09/rounding-the-corners-of-an-image-control-in-flex-using-a-mask/#comment-10078</guid>
		<description>while testing i came up with this.
if the image has a width and a height set it will not work, but if no width or height are defined than it works!!
i would like to round the corners with an image with width and height fixed</description>
		<content:encoded><![CDATA[<p>while testing i came up with this.<br />
if the image has a width and a height set it will not work, but if no width or height are defined than it works!!<br />
i would like to round the corners with an image with width and height fixed</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jonnie</title>
		<link>http://blog.flexexamples.com/2008/09/09/rounding-the-corners-of-an-image-control-in-flex-using-a-mask/comment-page-1/#comment-10077</link>
		<dc:creator>jonnie</dc:creator>
		<pubDate>Fri, 21 Oct 2011 15:21:42 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/09/09/rounding-the-corners-of-an-image-control-in-flex-using-a-mask/#comment-10077</guid>
		<description>great example.
but i&#039;m having some dificulty when i&#039;m rounding the corners of some images, for instance if i have an image with 1024x768, it works like a charm, but if there&#039;s an image with 1024x1280 it will only round two corners and on the other two it will not work, it draws a straight line.
any ideas on how can i solve this?</description>
		<content:encoded><![CDATA[<p>great example.<br />
but i&#8217;m having some dificulty when i&#8217;m rounding the corners of some images, for instance if i have an image with 1024&#215;768, it works like a charm, but if there&#8217;s an image with 1024&#215;1280 it will only round two corners and on the other two it will not work, it draws a straight line.<br />
any ideas on how can i solve this?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: risdiyanto</title>
		<link>http://blog.flexexamples.com/2008/09/09/rounding-the-corners-of-an-image-control-in-flex-using-a-mask/comment-page-1/#comment-9306</link>
		<dc:creator>risdiyanto</dc:creator>
		<pubDate>Thu, 16 Jun 2011 08:44:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/09/09/rounding-the-corners-of-an-image-control-in-flex-using-a-mask/#comment-9306</guid>
		<description>is it support with old browser n css2?</description>
		<content:encoded><![CDATA[<p>is it support with old browser n css2?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Flex man</title>
		<link>http://blog.flexexamples.com/2008/09/09/rounding-the-corners-of-an-image-control-in-flex-using-a-mask/comment-page-1/#comment-9180</link>
		<dc:creator>Flex man</dc:creator>
		<pubDate>Sat, 30 Apr 2011 22:42:21 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/09/09/rounding-the-corners-of-an-image-control-in-flex-using-a-mask/#comment-9180</guid>
		<description>Hi 

Is there a way to do this as a preloader, masking an image?</description>
		<content:encoded><![CDATA[<p>Hi </p>
<p>Is there a way to do this as a preloader, masking an image?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tahir Alvi</title>
		<link>http://blog.flexexamples.com/2008/09/09/rounding-the-corners-of-an-image-control-in-flex-using-a-mask/comment-page-1/#comment-6481</link>
		<dc:creator>Tahir Alvi</dc:creator>
		<pubDate>Fri, 27 Nov 2009 10:43:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/09/09/rounding-the-corners-of-an-image-control-in-flex-using-a-mask/#comment-6481</guid>
		<description>Please help me.

i want to erase the drawing after some drawing,  drawing maybe line rectangle dot or anything.

Thnaks</description>
		<content:encoded><![CDATA[<p>Please help me.</p>
<p>i want to erase the drawing after some drawing,  drawing maybe line rectangle dot or anything.</p>
<p>Thnaks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brandon B</title>
		<link>http://blog.flexexamples.com/2008/09/09/rounding-the-corners-of-an-image-control-in-flex-using-a-mask/comment-page-1/#comment-6288</link>
		<dc:creator>Brandon B</dc:creator>
		<pubDate>Sat, 07 Nov 2009 10:15:13 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/09/09/rounding-the-corners-of-an-image-control-in-flex-using-a-mask/#comment-6288</guid>
		<description>How Would You get something like this to work on an Image,in The Array Collection,or The Repeater?
I tried,all types of different methods,and nothing seems to just work.
any advice would certainly be excellent.,</description>
		<content:encoded><![CDATA[<p>How Would You get something like this to work on an Image,in The Array Collection,or The Repeater?<br />
I tried,all types of different methods,and nothing seems to just work.<br />
any advice would certainly be excellent.,</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Usman Ajmal</title>
		<link>http://blog.flexexamples.com/2008/09/09/rounding-the-corners-of-an-image-control-in-flex-using-a-mask/comment-page-1/#comment-6135</link>
		<dc:creator>Usman Ajmal</dc:creator>
		<pubDate>Tue, 27 Oct 2009 06:59:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/09/09/rounding-the-corners-of-an-image-control-in-flex-using-a-mask/#comment-6135</guid>
		<description>&lt;blockquote&gt;Can this portion of the tag be used to create a FLEX based lightbox similar to java lightboxes that I have seen?&lt;/blockquote&gt;

Did you manage to find a way of creating a Flex based lightbox? I need the lightbox functionality in one of my Flex application.</description>
		<content:encoded><![CDATA[<blockquote><p>Can this portion of the tag be used to create a FLEX based lightbox similar to java lightboxes that I have seen?</p></blockquote>
<p>Did you manage to find a way of creating a Flex based lightbox? I need the lightbox functionality in one of my Flex application.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: guy</title>
		<link>http://blog.flexexamples.com/2008/09/09/rounding-the-corners-of-an-image-control-in-flex-using-a-mask/comment-page-1/#comment-6077</link>
		<dc:creator>guy</dc:creator>
		<pubDate>Wed, 21 Oct 2009 07:07:06 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/09/09/rounding-the-corners-of-an-image-control-in-flex-using-a-mask/#comment-6077</guid>
		<description>Thanks Peter, that did the job</description>
		<content:encoded><![CDATA[<p>Thanks Peter, that did the job</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2008/09/09/rounding-the-corners-of-an-image-control-in-flex-using-a-mask/comment-page-1/#comment-6075</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Tue, 20 Oct 2009 23:20:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/09/09/rounding-the-corners-of-an-image-control-in-flex-using-a-mask/#comment-6075</guid>
		<description>@guy,

Not sure the best way to add strokes/borders to an irregularly shaped object, but you can just use a GlowFilter, as shown in the following example:
&lt;pre lang=&quot;mxml&quot;&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;!-- http://blog.flexexamples.com/2008/09/09/rounding-the-corners-of-an-image-control-in-flex-using-a-mask/ --&gt;
&lt;mx:Application name=&quot;Image_mask_test&quot;
        xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot;
        layout=&quot;vertical&quot;
        verticalAlign=&quot;middle&quot;
        backgroundColor=&quot;white&quot;
        initialize=&quot;init();&quot;&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            import mx.events.ResizeEvent;

            private var roundedMask:Sprite;

            private function init():void {
                roundedMask = new Sprite();
                canvas.rawChildren.addChild(roundedMask);
            }

            private function image_resize(evt:ResizeEvent):void {
                var w:Number = evt.currentTarget.width;
                var h:Number = evt.currentTarget.height;
                var cornerRadius:uint = 60;

                roundedMask.graphics.clear();
                roundedMask.graphics.beginFill(0xFF0000);
                roundedMask.graphics.drawRoundRectComplex(0, 0,
                    w, h,
                    0, cornerRadius,
                    0, cornerRadius);
                roundedMask.graphics.endFill();
                image.mask = roundedMask;
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:Canvas id=&quot;canvas&quot;&gt;
        &lt;mx:filters&gt;
            &lt;mx:GlowFilter blurX=&quot;5&quot; blurY=&quot;5&quot; strength=&quot;6&quot; color=&quot;#FF0000&quot; inner=&quot;false&quot; /&gt;
        &lt;/mx:filters&gt;
        &lt;mx:Image id=&quot;image&quot;
                  source=&quot;http://www.helpexamples.com/flash/images/image1.jpg&quot;
                  resize=&quot;image_resize(event);&quot; /&gt;
    &lt;/mx:Canvas&gt;

&lt;/mx:Application&gt;
&lt;/pre&gt;

Peter</description>
		<content:encoded><![CDATA[<p>@guy,</p>
<p>Not sure the best way to add strokes/borders to an irregularly shaped object, but you can just use a GlowFilter, as shown in the following example:</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;">&lt;?xml version=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #808080; font-style: italic;">&lt;!-- http://blog.flexexamples.com/2008/09/09/rounding-the-corners-of-an-image-control-in-flex-using-a-mask/ --&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Application</span> name=<span style="color: #ff0000;">&quot;Image_mask_test&quot;</span></span>
<span style="color: #000000;">        xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span></span>
<span style="color: #000000;">        layout=<span style="color: #ff0000;">&quot;vertical&quot;</span></span>
<span style="color: #000000;">        verticalAlign=<span style="color: #ff0000;">&quot;middle&quot;</span></span>
<span style="color: #000000;">        backgroundColor=<span style="color: #ff0000;">&quot;white&quot;</span></span>
<span style="color: #000000;">        initialize=<span style="color: #ff0000;">&quot;init();&quot;</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
    <span style="color: #339933;">&lt;mx:Script&gt;</span>
<span style="color: #339933;">        &lt;![CDATA[</span>
<span style="color: #339933;">            import mx.events.ResizeEvent;</span>
&nbsp;
<span style="color: #339933;">            private var roundedMask:Sprite;</span>
&nbsp;
<span style="color: #339933;">            private function init():void {</span>
<span style="color: #339933;">                roundedMask = new Sprite();</span>
<span style="color: #339933;">                canvas.rawChildren.addChild(roundedMask);</span>
<span style="color: #339933;">            }</span>
&nbsp;
<span style="color: #339933;">            private function image_resize(evt:ResizeEvent):void {</span>
<span style="color: #339933;">                var w:Number = evt.currentTarget.width;</span>
<span style="color: #339933;">                var h:Number = evt.currentTarget.height;</span>
<span style="color: #339933;">                var cornerRadius:uint = 60;</span>
&nbsp;
<span style="color: #339933;">                roundedMask.graphics.clear();</span>
<span style="color: #339933;">                roundedMask.graphics.beginFill(0xFF0000);</span>
<span style="color: #339933;">                roundedMask.graphics.drawRoundRectComplex(0, 0,</span>
<span style="color: #339933;">                    w, h,</span>
<span style="color: #339933;">                    0, cornerRadius,</span>
<span style="color: #339933;">                    0, cornerRadius);</span>
<span style="color: #339933;">                roundedMask.graphics.endFill();</span>
<span style="color: #339933;">                image.mask = roundedMask;</span>
<span style="color: #339933;">            }</span>
<span style="color: #339933;">        ]]&gt;</span>
<span style="color: #339933;">    &lt;/mx:Script&gt;</span>
&nbsp;
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Canvas</span> id=<span style="color: #ff0000;">&quot;canvas&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:filters</span><span style="color: #7400FF;">&gt;</span></span>
            <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:GlowFilter</span> blurX=<span style="color: #ff0000;">&quot;5&quot;</span> blurY=<span style="color: #ff0000;">&quot;5&quot;</span> strength=<span style="color: #ff0000;">&quot;6&quot;</span> color=<span style="color: #ff0000;">&quot;#FF0000&quot;</span> inner=<span style="color: #ff0000;">&quot;false&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:filters</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;mx:Image</span> id=<span style="color: #ff0000;">&quot;image&quot;</span></span>
<span style="color: #000000;">                  source=<span style="color: #ff0000;">&quot;http://www.helpexamples.com/flash/images/image1.jpg&quot;</span></span>
<span style="color: #000000;">                  resize=<span style="color: #ff0000;">&quot;image_resize(event);&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Canvas</span><span style="color: #7400FF;">&gt;</span></span>
&nbsp;
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/mx:Application</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>Peter</p>
]]></content:encoded>
	</item>
</channel>
</rss>

