<?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: Detecting when the source changes on an Image control in Flex</title>
	<atom:link href="http://blog.flexexamples.com/2008/06/27/detecting-when-the-source-changes-on-an-image-control-in-flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2008/06/27/detecting-when-the-source-changes-on-an-image-control-in-flex/</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: maverick</title>
		<link>http://blog.flexexamples.com/2008/06/27/detecting-when-the-source-changes-on-an-image-control-in-flex/comment-page-1/#comment-8586</link>
		<dc:creator>maverick</dc:creator>
		<pubDate>Thu, 02 Dec 2010 10:11:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/06/27/detecting-when-the-source-changes-on-an-image-control-in-flex/#comment-8586</guid>
		<description>does not seem to work on flex 3.5 and flash player 9??</description>
		<content:encoded><![CDATA[<p>does not seem to work on flex 3.5 and flash player 9??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tahir Alvi</title>
		<link>http://blog.flexexamples.com/2008/06/27/detecting-when-the-source-changes-on-an-image-control-in-flex/comment-page-1/#comment-8478</link>
		<dc:creator>Tahir Alvi</dc:creator>
		<pubDate>Mon, 25 Oct 2010 13:02:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/06/27/detecting-when-the-source-changes-on-an-image-control-in-flex/#comment-8478</guid>
		<description>thanks,

how we get item numbers when we drag and drop item in a list based control.

Tahir Alvi</description>
		<content:encoded><![CDATA[<p>thanks,</p>
<p>how we get item numbers when we drag and drop item in a list based control.</p>
<p>Tahir Alvi</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2008/06/27/detecting-when-the-source-changes-on-an-image-control-in-flex/comment-page-1/#comment-3413</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Sun, 14 Dec 2008 18:40:20 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/06/27/detecting-when-the-source-changes-on-an-image-control-in-flex/#comment-3413</guid>
		<description>Matt,

I just look through the source code. The Image class (\frameworks\projects\framework\src\mx\controls\Image.as) isn&#039;t very exciting. It only has the &lt;code&gt;dataChange&lt;/code&gt; event metadata and there is only one instance of the &lt;code&gt;dispatchEvent()&lt;/code&gt; method being called (from the &lt;code&gt;data&lt;/code&gt; property setter function). The next trick is to browse the superclass (in this case SWFLoader.as) and see what &lt;em&gt;it&lt;/em&gt; has.
Quickly searching for &quot;dispatchEvent(&quot;, we can see the following undocumented events (probably since you&#039;d probably never need them in your applications):
-- &quot;autoLoadChanged&quot; event (dispatched from &lt;code&gt;autoLoad&lt;/code&gt; setter)
-- &quot;loadForCompatibilityChanged&quot; event (dispatched from &lt;code&gt;loadForCompatibility&lt;/code&gt; setter)
-- &quot;loaderContextChanged&quot; event (dispatched from &lt;code&gt;loaderContext&lt;/code&gt; setter)
-- &quot;maintainAspectRatioChanged&quot; event (dispatched from &lt;code&gt;maintainAspectRatio&lt;/code&gt; setter)
-- &quot;scaleContentChanged&quot; event (dispatched from &lt;code&gt;scaleContent&lt;/code&gt; setter)
-- &quot;sourceChanged&quot; event (dispatched from &lt;code&gt;source&lt;/code&gt; setter)
-- &quot;trustContentChanged&quot; event (dispatched from &lt;code&gt;trustContent&lt;/code&gt; setter)

Or, another approach is to search the source code for the following string:
&lt;blockquote&gt;
new Event(&quot;
&lt;/blockquote&gt;

Using TextPad, I searched the entire \frameworks\projects\framework\src\ folder for all .AS files and it found 245 occurrence(s) in 51 file(s).
Here&#039;s the results for the SWFLoader class (odd, I&#039;m not sure why &quot;loadForCompatibilityChanged&quot; event didn&#039;t appear in this list):
&lt;blockquote&gt;
mx\controls\SWFLoader.as(445): dispatchEvent(new Event(&quot;autoLoadChanged&quot;));
mx\controls\SWFLoader.as(706): dispatchEvent(new Event(&quot;loaderContextChanged&quot;));
mx\controls\SWFLoader.as(742): dispatchEvent(new Event(&quot;maintainAspectRatioChanged&quot;));
mx\controls\SWFLoader.as(808): dispatchEvent(new Event(&quot;scaleContentChanged&quot;));
mx\controls\SWFLoader.as(929): dispatchEvent(new Event(&quot;sourceChanged&quot;));
mx\controls\SWFLoader.as(993): dispatchEvent(new Event(&quot;trustContentChanged&quot;));
&lt;/blockquote&gt;

The entire list is too long (and boring) to post here though.

Happy Flexing!
Peter</description>
		<content:encoded><![CDATA[<p>Matt,</p>
<p>I just look through the source code. The Image class (\frameworks\projects\framework\src\mx\controls\Image.as) isn&#8217;t very exciting. It only has the <code>dataChange</code> event metadata and there is only one instance of the <code>dispatchEvent()</code> method being called (from the <code>data</code> property setter function). The next trick is to browse the superclass (in this case SWFLoader.as) and see what <em>it</em> has.<br />
Quickly searching for &#8220;dispatchEvent(&#8220;, we can see the following undocumented events (probably since you&#8217;d probably never need them in your applications):<br />
&#8211; &#8220;autoLoadChanged&#8221; event (dispatched from <code>autoLoad</code> setter)<br />
&#8211; &#8220;loadForCompatibilityChanged&#8221; event (dispatched from <code>loadForCompatibility</code> setter)<br />
&#8211; &#8220;loaderContextChanged&#8221; event (dispatched from <code>loaderContext</code> setter)<br />
&#8211; &#8220;maintainAspectRatioChanged&#8221; event (dispatched from <code>maintainAspectRatio</code> setter)<br />
&#8211; &#8220;scaleContentChanged&#8221; event (dispatched from <code>scaleContent</code> setter)<br />
&#8211; &#8220;sourceChanged&#8221; event (dispatched from <code>source</code> setter)<br />
&#8211; &#8220;trustContentChanged&#8221; event (dispatched from <code>trustContent</code> setter)</p>
<p>Or, another approach is to search the source code for the following string:</p>
<blockquote><p>
new Event(&quot;
</p></blockquote>
<p>Using TextPad, I searched the entire \frameworks\projects\framework\src\ folder for all .AS files and it found 245 occurrence(s) in 51 file(s).<br />
Here&#8217;s the results for the SWFLoader class (odd, I&#8217;m not sure why &#8220;loadForCompatibilityChanged&#8221; event didn&#8217;t appear in this list):</p>
<blockquote><p>
mx\controls\SWFLoader.as(445): dispatchEvent(new Event(&#8220;autoLoadChanged&#8221;));<br />
mx\controls\SWFLoader.as(706): dispatchEvent(new Event(&#8220;loaderContextChanged&#8221;));<br />
mx\controls\SWFLoader.as(742): dispatchEvent(new Event(&#8220;maintainAspectRatioChanged&#8221;));<br />
mx\controls\SWFLoader.as(808): dispatchEvent(new Event(&#8220;scaleContentChanged&#8221;));<br />
mx\controls\SWFLoader.as(929): dispatchEvent(new Event(&#8220;sourceChanged&#8221;));<br />
mx\controls\SWFLoader.as(993): dispatchEvent(new Event(&#8220;trustContentChanged&#8221;));
</p></blockquote>
<p>The entire list is too long (and boring) to post here though.</p>
<p>Happy Flexing!<br />
Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Matt</title>
		<link>http://blog.flexexamples.com/2008/06/27/detecting-when-the-source-changes-on-an-image-control-in-flex/comment-page-1/#comment-3416</link>
		<dc:creator>Matt</dc:creator>
		<pubDate>Sun, 14 Dec 2008 18:25:54 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/06/27/detecting-when-the-source-changes-on-an-image-control-in-flex/#comment-3416</guid>
		<description>Thanks for this, I&#039;ve spent a lot of time trying to look how to do this without having to override the load method and the source property. I&#039;m a bit miffed they decided not to publish this particular event! Is there a source of information you would recommend that would reveal these &quot;hidden&quot; features?

Thanks for the tip - very helpful!!</description>
		<content:encoded><![CDATA[<p>Thanks for this, I&#8217;ve spent a lot of time trying to look how to do this without having to override the load method and the source property. I&#8217;m a bit miffed they decided not to publish this particular event! Is there a source of information you would recommend that would reveal these &#8220;hidden&#8221; features?</p>
<p>Thanks for the tip &#8211; very helpful!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2008/06/27/detecting-when-the-source-changes-on-an-image-control-in-flex/comment-page-1/#comment-3417</link>
		<dc:creator>peterd</dc:creator>
		<pubDate>Fri, 22 Aug 2008 02:17:03 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/06/27/detecting-when-the-source-changes-on-an-image-control-in-flex/#comment-3417</guid>
		<description>Barry,

I&#039;m not sure, but does calling &lt;code&gt;img.validateNow();&lt;/code&gt; help?

Peter</description>
		<content:encoded><![CDATA[<p>Barry,</p>
<p>I&#8217;m not sure, but does calling <code>img.validateNow();</code> help?</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Barry</title>
		<link>http://blog.flexexamples.com/2008/06/27/detecting-when-the-source-changes-on-an-image-control-in-flex/comment-page-1/#comment-3418</link>
		<dc:creator>Barry</dc:creator>
		<pubDate>Fri, 22 Aug 2008 00:25:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/06/27/detecting-when-the-source-changes-on-an-image-control-in-flex/#comment-3418</guid>
		<description>Do you know if there is a way to force the image to redraw?  I&#039;m very new to flex, but it looks as though the image is redrawn any time source is set, except in the case where I need it to.

Any help is appreciated.  Thanks in advance.

Barry</description>
		<content:encoded><![CDATA[<p>Do you know if there is a way to force the image to redraw?  I&#8217;m very new to flex, but it looks as though the image is redrawn any time source is set, except in the case where I need it to.</p>
<p>Any help is appreciated.  Thanks in advance.</p>
<p>Barry</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2008/06/27/detecting-when-the-source-changes-on-an-image-control-in-flex/comment-page-1/#comment-3415</link>
		<dc:creator>peterd</dc:creator>
		<pubDate>Tue, 08 Jul 2008 21:43:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/06/27/detecting-when-the-source-changes-on-an-image-control-in-flex/#comment-3415</guid>
		<description>Brendan,

There are several &quot;undocumented&quot; events in the Flex API. These events weren&#039;t really meant for public use, but they can be useful in certain circumstances.

Peter</description>
		<content:encoded><![CDATA[<p>Brendan,</p>
<p>There are several &#8220;undocumented&#8221; events in the Flex API. These events weren&#8217;t really meant for public use, but they can be useful in certain circumstances.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brendan</title>
		<link>http://blog.flexexamples.com/2008/06/27/detecting-when-the-source-changes-on-an-image-control-in-flex/comment-page-1/#comment-3414</link>
		<dc:creator>Brendan</dc:creator>
		<pubDate>Tue, 08 Jul 2008 21:29:58 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/06/27/detecting-when-the-source-changes-on-an-image-control-in-flex/#comment-3414</guid>
		<description>Thanks for the tip. I could not find any documentation on the &quot;sourceChanged&quot; Event in the Flex help and there doesn&#039;t seem to be any popup hints for this event when coding the  component in Flex. Any ideas?</description>
		<content:encoded><![CDATA[<p>Thanks for the tip. I could not find any documentation on the &#8220;sourceChanged&#8221; Event in the Flex help and there doesn&#8217;t seem to be any popup hints for this event when coding the  component in Flex. Any ideas?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

