<?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: Adding a Sprite to the display list in Flex 4</title>
	<atom:link href="http://blog.flexexamples.com/2009/11/20/adding-a-sprite-to-the-display-list-in-flex-4/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2009/11/20/adding-a-sprite-to-the-display-list-in-flex-4/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Sun, 12 Feb 2012 14:19:03 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: codemaniac</title>
		<link>http://blog.flexexamples.com/2009/11/20/adding-a-sprite-to-the-display-list-in-flex-4/comment-page-1/#comment-9193</link>
		<dc:creator>codemaniac</dc:creator>
		<pubDate>Wed, 04 May 2011 08:53:31 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2222#comment-9193</guid>
		<description>&lt;code&gt;


	
	
		
	
	
	
	

&lt;/code&gt;</description>
		<content:encoded><![CDATA[<p><code></p>
<p></code></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: codemaniac</title>
		<link>http://blog.flexexamples.com/2009/11/20/adding-a-sprite-to-the-display-list-in-flex-4/comment-page-1/#comment-9192</link>
		<dc:creator>codemaniac</dc:creator>
		<pubDate>Wed, 04 May 2011 08:52:35 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2222#comment-9192</guid>
		<description>oh... forgot to give mxml:



	
	
		
	
	
	
	
</description>
		<content:encoded><![CDATA[<p>oh&#8230; forgot to give mxml:</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: codemaniac</title>
		<link>http://blog.flexexamples.com/2009/11/20/adding-a-sprite-to-the-display-list-in-flex-4/comment-page-1/#comment-9191</link>
		<dc:creator>codemaniac</dc:creator>
		<pubDate>Wed, 04 May 2011 08:28:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2222#comment-9191</guid>
		<description>I have the following ActionScript 3.0 class:

public class ShopRaider extends Sprite {
public function ShopRaider () {
    // some code
}

}

I have the applications .mxml file as such:




    






when i run the application, i get:

TypeError: Error #1009: Cannot access a property or method of a null object reference. at spark.components.supportClasses::SkinnableComponent/commitProperties()[E:\dev\4.­0.0\frameworks\projects\spark\src\spark\components\supportClasses\SkinnableCompon­ent.as:427] at spark.components::Application/commitProperties()[E:\dev\4.0.0\frameworks\project­s\spark\src\spark\components\Application.as:931] at mx.core::UIComponent/validateProperties()[E:\dev\4.0.0\frameworks\projects\frame­work\src\mx\core\UIComponent.as:7772] ...

Can someone pls tell me where i&#039;m going wrong???</description>
		<content:encoded><![CDATA[<p>I have the following ActionScript 3.0 class:</p>
<p>public class ShopRaider extends Sprite {<br />
public function ShopRaider () {<br />
    // some code<br />
}</p>
<p>}</p>
<p>I have the applications .mxml file as such:</p>
<p>when i run the application, i get:</p>
<p>TypeError: Error #1009: Cannot access a property or method of a null object reference. at spark.components.supportClasses::SkinnableComponent/commitProperties()[E:\dev\4.­0.0\frameworks\projects\spark\src\spark\components\supportClasses\SkinnableCompon­ent.as:427] at spark.components::Application/commitProperties()[E:\dev\4.0.0\frameworks\project­s\spark\src\spark\components\Application.as:931] at mx.core::UIComponent/validateProperties()[E:\dev\4.0.0\frameworks\projects\frame­work\src\mx\core\UIComponent.as:7772] &#8230;</p>
<p>Can someone pls tell me where i&#8217;m going wrong???</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: hrpatidar</title>
		<link>http://blog.flexexamples.com/2009/11/20/adding-a-sprite-to-the-display-list-in-flex-4/comment-page-1/#comment-8927</link>
		<dc:creator>hrpatidar</dc:creator>
		<pubDate>Thu, 27 Jan 2011 19:38:43 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2222#comment-8927</guid>
		<description>Nice example....</description>
		<content:encoded><![CDATA[<p>Nice example&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mothman</title>
		<link>http://blog.flexexamples.com/2009/11/20/adding-a-sprite-to-the-display-list-in-flex-4/comment-page-1/#comment-8688</link>
		<dc:creator>Mothman</dc:creator>
		<pubDate>Tue, 14 Dec 2010 16:20:16 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2222#comment-8688</guid>
		<description>Hey,
is it possible to animate a sprite when it is in an SpriteVisualElement ?
For example i want to reduce an Sprite Rectangle that is 300 px long every second 10 px ?
Thank you,
Mothman</description>
		<content:encoded><![CDATA[<p>Hey,<br />
is it possible to animate a sprite when it is in an SpriteVisualElement ?<br />
For example i want to reduce an Sprite Rectangle that is 300 px long every second 10 px ?<br />
Thank you,<br />
Mothman</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: daka</title>
		<link>http://blog.flexexamples.com/2009/11/20/adding-a-sprite-to-the-display-list-in-flex-4/comment-page-1/#comment-7586</link>
		<dc:creator>daka</dc:creator>
		<pubDate>Mon, 26 Apr 2010 07:00:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2222#comment-7586</guid>
		<description>I did it like this, but the old broadcast, doesn&#039;t stay it is replaced with the ew one!
	public function broadCastMeNow(event:Event):void
		{
			camId = comments.selectedItem[&quot;o_id&quot;];

				broadCastMe = new broadcastNow(camId);
				connn.addChild(broadCastMe);
				connn.x += 100;
		}
s:SpriteVisualElement x=&quot;100&quot; id=&quot;connn&quot;</description>
		<content:encoded><![CDATA[<p>I did it like this, but the old broadcast, doesn&#8217;t stay it is replaced with the ew one!<br />
	public function broadCastMeNow(event:Event):void<br />
		{<br />
			camId = comments.selectedItem["o_id"];</p>
<p>				broadCastMe = new broadcastNow(camId);<br />
				connn.addChild(broadCastMe);<br />
				connn.x += 100;<br />
		}<br />
s:SpriteVisualElement x=&#8221;100&#8243; id=&#8221;connn&#8221;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: daka</title>
		<link>http://blog.flexexamples.com/2009/11/20/adding-a-sprite-to-the-display-list-in-flex-4/comment-page-1/#comment-7576</link>
		<dc:creator>daka</dc:creator>
		<pubDate>Sat, 24 Apr 2010 09:51:19 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2222#comment-7576</guid>
		<description>hello,
I  have next codes:
&lt;pre lang=&quot;actionscript3&quot;&gt;
	public function broadCastMeNow(event:Event):void
		{
			camId = comments.selectedItem[&quot;o_id&quot;];
			
			//for (var i:int = 0; i &lt; camId.length; i++)
			//{
				broadCastMe[camId] = new broadcastNow(camId);
				connn.addChild(broadCastMe[camId]);
connn[camId].x=+100;
			//}
		}
&lt;/pre&gt;

my mxml
&lt;pre lang=&quot;mxml&quot;&gt;
&lt;s:Panel includeIn=&quot;indexObjectState&quot; id=&quot;camPanel&quot; width=&quot;100%&quot; height=&quot;150&quot; title=&quot;Live Webcams&quot;
    &lt;s:layout&gt;
        &lt;s:HorizontalLayout paddingLeft=&quot;1&quot; paddingRight=&quot;1&quot; paddingTop=&quot;1&quot; paddingBottom=&quot;1&quot; gap=&quot;1&quot; /&gt;
    &lt;/s:layout&gt;
    &lt;s:Group width=&quot;290&quot;&gt;
        &lt;s:SpriteVisualElement x=&quot;100&quot; id=&quot;connn&quot; /&gt;
    &lt;/s:Group&gt;
&lt;/s:Panel&gt;
&lt;/pre&gt;



So I want that every new broadcastme be add ext to each other at 100px. How can I do it?</description>
		<content:encoded><![CDATA[<p>hello,<br />
I  have next codes:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;">	<span style="color: #0033ff; font-weight: bold;">public</span> <span style="color: #339966; font-weight: bold;">function</span> broadCastMeNow<span style="color: #000000;">&#40;</span>event<span style="color: #000066; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span>
		<span style="color: #000000;">&#123;</span>
			camId = <span style="color: #004993;">comments</span><span style="color: #000066; font-weight: bold;">.</span>selectedItem<span style="color: #000000;">&#91;</span><span style="color: #990000;">&quot;o_id&quot;</span><span style="color: #000000;">&#93;</span><span style="color: #000066; font-weight: bold;">;</span>
&nbsp;
			<span style="color: #009900; font-style: italic;">//for (var i:int = 0; i &amp;lt; camId.length; i++)</span>
			<span style="color: #009900; font-style: italic;">//{</span>
				broadCastMe<span style="color: #000000;">&#91;</span>camId<span style="color: #000000;">&#93;</span> = <span style="color: #0033ff; font-weight: bold;">new</span> broadcastNow<span style="color: #000000;">&#40;</span>camId<span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
				connn<span style="color: #000066; font-weight: bold;">.</span><span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>broadCastMe<span style="color: #000000;">&#91;</span>camId<span style="color: #000000;">&#93;</span><span style="color: #000000;">&#41;</span><span style="color: #000066; font-weight: bold;">;</span>
connn<span style="color: #000000;">&#91;</span>camId<span style="color: #000000;">&#93;</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: #000000; font-weight:bold;">100</span><span style="color: #000066; font-weight: bold;">;</span>
			<span style="color: #009900; font-style: italic;">//}</span>
		<span style="color: #000000;">&#125;</span></pre></div></div>

<p>my mxml</p>

<div class="wp_syntax"><div class="code"><pre class="mxml" style="font-family:monospace;"><span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Panel</span> includeIn=<span style="color: #ff0000;">&quot;indexObjectState&quot;</span> id=<span style="color: #ff0000;">&quot;camPanel&quot;</span> width=<span style="color: #ff0000;">&quot;100%&quot;</span> height=<span style="color: #ff0000;">&quot;150&quot;</span> title=<span style="color: #ff0000;">&quot;Live Webcams&quot;</span></span>
<span style="color: #000000;">    <span style="color: #7400FF;">&lt;s:layout</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:HorizontalLayout</span> paddingLeft=<span style="color: #ff0000;">&quot;1&quot;</span> paddingRight=<span style="color: #ff0000;">&quot;1&quot;</span> paddingTop=<span style="color: #ff0000;">&quot;1&quot;</span> paddingBottom=<span style="color: #ff0000;">&quot;1&quot;</span> gap=<span style="color: #ff0000;">&quot;1&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:layout</span><span style="color: #7400FF;">&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:Group</span> width=<span style="color: #ff0000;">&quot;290&quot;</span><span style="color: #7400FF;">&gt;</span></span>
        <span style="color: #000000;"><span style="color: #7400FF;">&lt;s:SpriteVisualElement</span> x=<span style="color: #ff0000;">&quot;100&quot;</span> id=<span style="color: #ff0000;">&quot;connn&quot;</span> <span style="color: #7400FF;">/&gt;</span></span>
    <span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Group</span><span style="color: #7400FF;">&gt;</span></span>
<span style="color: #000000;"><span style="color: #7400FF;">&lt;/s:Panel</span><span style="color: #7400FF;">&gt;</span></span></pre></div></div>

<p>So I want that every new broadcastme be add ext to each other at 100px. How can I do it?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Peter deHaan</title>
		<link>http://blog.flexexamples.com/2009/11/20/adding-a-sprite-to-the-display-list-in-flex-4/comment-page-1/#comment-7488</link>
		<dc:creator>Peter deHaan</dc:creator>
		<pubDate>Mon, 12 Apr 2010 18:02:26 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2222#comment-7488</guid>
		<description>@jcarlos,

You could try setting the Sprite&#039;s width and height to the s:Panel container&#039;s &lt;code&gt;contentGroup&lt;/code&gt; skin part&#039;s &lt;code&gt;width&lt;/code&gt; and &lt;code&gt;height&lt;/code&gt; properties. For an example, see &lt;a href=&quot;http://blog.flexexamples.com/2010/04/12/determining-the-inner-content-dimensions-in-a-spark-panel-container-in-flex-4/&quot; rel=&quot;nofollow&quot;&gt;&quot;Determining the inner content dimensions in a Spark Panel container in Flex 4&quot;&lt;/a&gt;.

Peter</description>
		<content:encoded><![CDATA[<p>@jcarlos,</p>
<p>You could try setting the Sprite&#8217;s width and height to the s:Panel container&#8217;s <code>contentGroup</code> skin part&#8217;s <code>width</code> and <code>height</code> properties. For an example, see <a href="http://blog.flexexamples.com/2010/04/12/determining-the-inner-content-dimensions-in-a-spark-panel-container-in-flex-4/" rel="nofollow">&#8220;Determining the inner content dimensions in a Spark Panel container in Flex 4&#8243;</a>.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: jcarlos</title>
		<link>http://blog.flexexamples.com/2009/11/20/adding-a-sprite-to-the-display-list-in-flex-4/comment-page-1/#comment-7479</link>
		<dc:creator>jcarlos</dc:creator>
		<pubDate>Sun, 11 Apr 2010 14:42:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2222#comment-7479</guid>
		<description>Hi Peter, 

thanks to your post I could add an sprite to a panel :)  but how know in FB4 is possible to scale the sprite to the container dimensions?

thanks in advanced.</description>
		<content:encoded><![CDATA[<p>Hi Peter, </p>
<p>thanks to your post I could add an sprite to a panel :)  but how know in FB4 is possible to scale the sprite to the container dimensions?</p>
<p>thanks in advanced.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: lee probert</title>
		<link>http://blog.flexexamples.com/2009/11/20/adding-a-sprite-to-the-display-list-in-flex-4/comment-page-1/#comment-7348</link>
		<dc:creator>lee probert</dc:creator>
		<pubDate>Wed, 24 Mar 2010 17:10:05 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/?p=2222#comment-7348</guid>
		<description>@Peter. I&#039;ve tried subclassing SpriteVisualElement and then dropping in some FXG but it complains. Also, when you add other Sprites to a SpriteVisualElement object it doesn&#039;t give the SpriteVisualElement the width and height of the new object.</description>
		<content:encoded><![CDATA[<p>@Peter. I&#8217;ve tried subclassing SpriteVisualElement and then dropping in some FXG but it complains. Also, when you add other Sprites to a SpriteVisualElement object it doesn&#8217;t give the SpriteVisualElement the width and height of the new object.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

