<?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: AS3 Flash Games for Beginners: Scores, HUDS, and User Interface</title>
	<atom:link href="http://asgamer.com/2009/as3-flash-games-for-beginners-scores-huds-and-user-interface/feed" rel="self" type="application/rss+xml" />
	<link>http://asgamer.com/2009/as3-flash-games-for-beginners-scores-huds-and-user-interface</link>
	<description>Learn to Make Flash Games, Applications, and Websites</description>
	<lastBuildDate>Fri, 16 Dec 2011 19:32:19 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Thomas</title>
		<link>http://asgamer.com/2009/as3-flash-games-for-beginners-scores-huds-and-user-interface/comment-page-2#comment-6278</link>
		<dc:creator>Thomas</dc:creator>
		<pubDate>Mon, 12 Dec 2011 08:01:47 +0000</pubDate>
		<guid isPermaLink="false">http://asgamer.com/?p=269#comment-6278</guid>
		<description>I added a new function called die() to my Ship class so that my ship can be removed when it dies. I made it just like all of the objects when they are removed from the stage...

public function die():void {
  if(stageRef.contains(this)) {
     removeEventListener(Event.ENTER_FRAME, loop);
     //
     stageRef.removeChild(this);
  }
}

....

and I added to the Engine class...

var lose:Boolean=false;


and I have an if statement in my Engine loop function...

if (hud.s_hits&gt;10 &amp;&amp; !lose) {
   ourShip.die();
   lose=true;
}
--------------------------------------------------------------
this removes the ourShip object from the screen, but...
  *the enemy ships can still find the ourShip object and fire a stinger bullet
  *all of the hitTests still work as if the ship is just standing still at the place that it died... 

___________________________________________
can anyone explain why this is happening?

basically...
even though I remove the ship... everything acts as if the ship were still there...


Thanks</description>
		<content:encoded><![CDATA[<p>I added a new function called die() to my Ship class so that my ship can be removed when it dies. I made it just like all of the objects when they are removed from the stage&#8230;</p>
<p>public function die():void {<br />
  if(stageRef.contains(this)) {<br />
     removeEventListener(Event.ENTER_FRAME, loop);<br />
     //<br />
     stageRef.removeChild(this);<br />
  }<br />
}</p>
<p>&#8230;.</p>
<p>and I added to the Engine class&#8230;</p>
<p>var lose:Boolean=false;</p>
<p>and I have an if statement in my Engine loop function&#8230;</p>
<p>if (hud.s_hits&gt;10 &amp;&amp; !lose) {<br />
   ourShip.die();<br />
   lose=true;<br />
}<br />
&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br />
this removes the ourShip object from the screen, but&#8230;<br />
  *the enemy ships can still find the ourShip object and fire a stinger bullet<br />
  *all of the hitTests still work as if the ship is just standing still at the place that it died&#8230; </p>
<p>___________________________________________<br />
can anyone explain why this is happening?</p>
<p>basically&#8230;<br />
even though I remove the ship&#8230; everything acts as if the ship were still there&#8230;</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Thomas</title>
		<link>http://asgamer.com/2009/as3-flash-games-for-beginners-scores-huds-and-user-interface/comment-page-2#comment-6277</link>
		<dc:creator>Thomas</dc:creator>
		<pubDate>Mon, 12 Dec 2011 07:39:29 +0000</pubDate>
		<guid isPermaLink="false">http://asgamer.com/?p=269#comment-6277</guid>
		<description>I added a new function called die() to my ourShip class... as shown,

public function die():void {
if(stageRef.contains(this)) {
				//
				removeEventListener(Event.ENTER_FRAME, loop);
				//
				var explosion:Explosion=new Explosion(stageRef,1,x,y);
				stageRef.addChild(explosion);
				stageRef.removeChild(this);
			}
		}</description>
		<content:encoded><![CDATA[<p>I added a new function called die() to my ourShip class&#8230; as shown,</p>
<p>public function die():void {<br />
if(stageRef.contains(this)) {<br />
				//<br />
				removeEventListener(Event.ENTER_FRAME, loop);<br />
				//<br />
				var explosion:Explosion=new Explosion(stageRef,1,x,y);<br />
				stageRef.addChild(explosion);<br />
				stageRef.removeChild(this);<br />
			}<br />
		}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sean Longmire</title>
		<link>http://asgamer.com/2009/as3-flash-games-for-beginners-scores-huds-and-user-interface/comment-page-2#comment-6175</link>
		<dc:creator>Sean Longmire</dc:creator>
		<pubDate>Thu, 10 Nov 2011 17:11:52 +0000</pubDate>
		<guid isPermaLink="false">http://asgamer.com/?p=269#comment-6175</guid>
		<description>Hi there, great tutorial! Any idea how i would alter the code to set a limit to the score, so for example when he got hit 20 times it would be &quot;Game Over&quot;?</description>
		<content:encoded><![CDATA[<p>Hi there, great tutorial! Any idea how i would alter the code to set a limit to the score, so for example when he got hit 20 times it would be &#8220;Game Over&#8221;?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: klutchego</title>
		<link>http://asgamer.com/2009/as3-flash-games-for-beginners-scores-huds-and-user-interface/comment-page-2#comment-6083</link>
		<dc:creator>klutchego</dc:creator>
		<pubDate>Wed, 12 Oct 2011 09:08:54 +0000</pubDate>
		<guid isPermaLink="false">http://asgamer.com/?p=269#comment-6083</guid>
		<description>Dude your tutorial is great!. What about making a tutorial like chess game. I really need to know how it looks like the code in flash as3..Help please!:D</description>
		<content:encoded><![CDATA[<p>Dude your tutorial is great!. What about making a tutorial like chess game. I really need to know how it looks like the code in flash as3..Help please!:D</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dennis</title>
		<link>http://asgamer.com/2009/as3-flash-games-for-beginners-scores-huds-and-user-interface/comment-page-2#comment-6032</link>
		<dc:creator>Dennis</dc:creator>
		<pubDate>Thu, 11 Aug 2011 07:19:26 +0000</pubDate>
		<guid isPermaLink="false">http://asgamer.com/?p=269#comment-6032</guid>
		<description>I am having a 1120 compile error saying 
public var s_hits		
public var s_kills

kills.text = &quot;0&quot;;
hits.text = &quot;0&quot;;
score.text = &quot;0&quot;;

are not defined, is s_ a cs3 thing? i am using cs5.5</description>
		<content:encoded><![CDATA[<p>I am having a 1120 compile error saying<br />
public var s_hits<br />
public var s_kills</p>
<p>kills.text = &#8220;0&#8243;;<br />
hits.text = &#8220;0&#8243;;<br />
score.text = &#8220;0&#8243;;</p>
<p>are not defined, is s_ a cs3 thing? i am using cs5.5</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rahil627</title>
		<link>http://asgamer.com/2009/as3-flash-games-for-beginners-scores-huds-and-user-interface/comment-page-2#comment-5990</link>
		<dc:creator>Rahil627</dc:creator>
		<pubDate>Fri, 17 Jun 2011 00:17:30 +0000</pubDate>
		<guid isPermaLink="false">http://asgamer.com/?p=269#comment-5990</guid>
		<description>Oh! I forgot to mention. The code portions on this article converts some of the characters to html code. For example: if (y - 15 &lt; target.y &amp;&amp; y + 15 &gt; target.y)</description>
		<content:encoded><![CDATA[<p>Oh! I forgot to mention. The code portions on this article converts some of the characters to html code. For example: if (y &#8211; 15 &lt; target.y &amp;&amp; y + 15 &gt; target.y)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rahil627</title>
		<link>http://asgamer.com/2009/as3-flash-games-for-beginners-scores-huds-and-user-interface/comment-page-2#comment-5989</link>
		<dc:creator>Rahil627</dc:creator>
		<pubDate>Fri, 17 Jun 2011 00:13:47 +0000</pubDate>
		<guid isPermaLink="false">http://asgamer.com/?p=269#comment-5989</guid>
		<description>I also wanted to thank you for this wonderful &#039;basics series&#039; tutorial Jonathan. I can only reverberate the praises you&#039;ve received from the other comments. Mainly, that your tutorial is well written, clear, and fun.

If I don&#039;t get too sidetracked by another project, I should have a cool example soon.</description>
		<content:encoded><![CDATA[<p>I also wanted to thank you for this wonderful &#8216;basics series&#8217; tutorial Jonathan. I can only reverberate the praises you&#8217;ve received from the other comments. Mainly, that your tutorial is well written, clear, and fun.</p>
<p>If I don&#8217;t get too sidetracked by another project, I should have a cool example soon.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Naushad</title>
		<link>http://asgamer.com/2009/as3-flash-games-for-beginners-scores-huds-and-user-interface/comment-page-2#comment-5950</link>
		<dc:creator>Naushad</dc:creator>
		<pubDate>Thu, 12 May 2011 05:52:51 +0000</pubDate>
		<guid isPermaLink="false">http://asgamer.com/?p=269#comment-5950</guid>
		<description>How to add more interface(new game,pause,stop)</description>
		<content:encoded><![CDATA[<p>How to add more interface(new game,pause,stop)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joe</title>
		<link>http://asgamer.com/2009/as3-flash-games-for-beginners-scores-huds-and-user-interface/comment-page-1#comment-5946</link>
		<dc:creator>Joe</dc:creator>
		<pubDate>Mon, 09 May 2011 14:00:08 +0000</pubDate>
		<guid isPermaLink="false">http://asgamer.com/?p=269#comment-5946</guid>
		<description>Glad to see you can no longer infinitely kill a given enemy, even if the functionality *was* added in a bit late.</description>
		<content:encoded><![CDATA[<p>Glad to see you can no longer infinitely kill a given enemy, even if the functionality *was* added in a bit late.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ladman</title>
		<link>http://asgamer.com/2009/as3-flash-games-for-beginners-scores-huds-and-user-interface/comment-page-1#comment-5942</link>
		<dc:creator>Ladman</dc:creator>
		<pubDate>Wed, 04 May 2011 02:56:01 +0000</pubDate>
		<guid isPermaLink="false">http://asgamer.com/?p=269#comment-5942</guid>
		<description>figured it all out, it would help if i made my HUD a MC!!!!</description>
		<content:encoded><![CDATA[<p>figured it all out, it would help if i made my HUD a MC!!!!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

