<?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: Level Mechanics and Animated Backgrounds</title>
	<atom:link href="http://asgamer.com/2009/as3-flash-games-for-beginners-level-mechanics-and-animated-backgrounds/feed" rel="self" type="application/rss+xml" />
	<link>http://asgamer.com/2009/as3-flash-games-for-beginners-level-mechanics-and-animated-backgrounds</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: Tristan</title>
		<link>http://asgamer.com/2009/as3-flash-games-for-beginners-level-mechanics-and-animated-backgrounds/comment-page-1#comment-6064</link>
		<dc:creator>Tristan</dc:creator>
		<pubDate>Wed, 14 Sep 2011 18:09:59 +0000</pubDate>
		<guid isPermaLink="false">http://asgamer.com/?p=105#comment-6064</guid>
		<description>Hello,

This is a great tutorial into knowing the basics.
I have been following this up to now.
I added the background with the help of actionscript like you mentioned at the first lesson. However, I can&#039;t see the animated stars now because the background is overlapping it. I tried to fix it, but eventually I removed the actionscript for the background, and just placed the movieclip in the stage manually. 

question 1 : I would like to know how to get the background &#039;with&#039; actionscript, and how to properly layer it.

question 2 : I tried to make the stars move according to my ship speed. I did what you told to get that, but it still doesn&#039;t work. it gives this error : 
1178: Attempted access of inaccessible property vy through a reference with static type com.asgamer.basics.Schip1

could someone help me with these two questions ?
Thanks in advance,
Tristan.</description>
		<content:encoded><![CDATA[<p>Hello,</p>
<p>This is a great tutorial into knowing the basics.<br />
I have been following this up to now.<br />
I added the background with the help of actionscript like you mentioned at the first lesson. However, I can&#8217;t see the animated stars now because the background is overlapping it. I tried to fix it, but eventually I removed the actionscript for the background, and just placed the movieclip in the stage manually. </p>
<p>question 1 : I would like to know how to get the background &#8216;with&#8217; actionscript, and how to properly layer it.</p>
<p>question 2 : I tried to make the stars move according to my ship speed. I did what you told to get that, but it still doesn&#8217;t work. it gives this error :<br />
1178: Attempted access of inaccessible property vy through a reference with static type com.asgamer.basics.Schip1</p>
<p>could someone help me with these two questions ?<br />
Thanks in advance,<br />
Tristan.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tanner</title>
		<link>http://asgamer.com/2009/as3-flash-games-for-beginners-level-mechanics-and-animated-backgrounds/comment-page-1#comment-6019</link>
		<dc:creator>Tanner</dc:creator>
		<pubDate>Wed, 27 Jul 2011 23:21:01 +0000</pubDate>
		<guid isPermaLink="false">http://asgamer.com/?p=105#comment-6019</guid>
		<description>Mine is working, but alil-bit off how it&#039;s supposed to be. Finally I got it to work, but once the game starts 1 star is created, it falls down until out of view. Once it leaves the view all the rest of 79 stars are created and it works normally? 

I think its because i dont have &quot;setupStar()&quot; in my &quot;Star()&quot; function, but every time i add it and try to run it i get: TypeError: Error #1009: Cannot access a property or method of a null object reference.
	at Star/setupStar()
	at Star()
	at Engine()

any suggestions?</description>
		<content:encoded><![CDATA[<p>Mine is working, but alil-bit off how it&#8217;s supposed to be. Finally I got it to work, but once the game starts 1 star is created, it falls down until out of view. Once it leaves the view all the rest of 79 stars are created and it works normally? </p>
<p>I think its because i dont have &#8220;setupStar()&#8221; in my &#8220;Star()&#8221; function, but every time i add it and try to run it i get: TypeError: Error #1009: Cannot access a property or method of a null object reference.<br />
	at Star/setupStar()<br />
	at Star()<br />
	at Engine()</p>
<p>any suggestions?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: nevena</title>
		<link>http://asgamer.com/2009/as3-flash-games-for-beginners-level-mechanics-and-animated-backgrounds/comment-page-1#comment-6012</link>
		<dc:creator>nevena</dc:creator>
		<pubDate>Thu, 07 Jul 2011 08:06:21 +0000</pubDate>
		<guid isPermaLink="false">http://asgamer.com/?p=105#comment-6012</guid>
		<description>Hi!:)
Thank you so much for this tutorial, it&#039;s really great. Rarely there is anything similar, which explains everything so well.
In this line of thought... I have two questions, I couldn&#039;t find a solution to (what I tried didn&#039;t work).
1. How can I randomise the colour, hue or saturation of the stars?
2. I made a background where the ship is within a boundary which is weirdly shaped (one side is flat, the other curved). I was wondering how can I create a frame where the ship moves inside only?
Thank you again!
n</description>
		<content:encoded><![CDATA[<p>Hi!:)<br />
Thank you so much for this tutorial, it&#8217;s really great. Rarely there is anything similar, which explains everything so well.<br />
In this line of thought&#8230; I have two questions, I couldn&#8217;t find a solution to (what I tried didn&#8217;t work).<br />
1. How can I randomise the colour, hue or saturation of the stars?<br />
2. I made a background where the ship is within a boundary which is weirdly shaped (one side is flat, the other curved). I was wondering how can I create a frame where the ship moves inside only?<br />
Thank you again!<br />
n</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Robbert Bruggeman</title>
		<link>http://asgamer.com/2009/as3-flash-games-for-beginners-level-mechanics-and-animated-backgrounds/comment-page-1#comment-5923</link>
		<dc:creator>Robbert Bruggeman</dc:creator>
		<pubDate>Fri, 15 Apr 2011 19:58:46 +0000</pubDate>
		<guid isPermaLink="false">http://asgamer.com/?p=105#comment-5923</guid>
		<description>It&#039;s a pretty good tutorial, for sure.

However, about the bouncing-on-the-edges-of-the-screen part, I&#039;ve used this instead:

And found that it works a bit better. Now the values here are dependant on the stage size, but with the code from the tutorial, half of the ship goes out of the screen before it bounces.

//STAY IN THE SCREEN
if ( x &gt; 480 )
{
	vx = -vx;
}
			
else if ( x  370 )
{
	vy = -vy;
}
			
else if ( y &lt; 30 )
{
	vy = -vy;
}</description>
		<content:encoded><![CDATA[<p>It&#8217;s a pretty good tutorial, for sure.</p>
<p>However, about the bouncing-on-the-edges-of-the-screen part, I&#8217;ve used this instead:</p>
<p>And found that it works a bit better. Now the values here are dependant on the stage size, but with the code from the tutorial, half of the ship goes out of the screen before it bounces.</p>
<p>//STAY IN THE SCREEN<br />
if ( x &gt; 480 )<br />
{<br />
	vx = -vx;<br />
}</p>
<p>else if ( x  370 )<br />
{<br />
	vy = -vy;<br />
}</p>
<p>else if ( y &lt; 30 )<br />
{<br />
	vy = -vy;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: JestaBlunt</title>
		<link>http://asgamer.com/2009/as3-flash-games-for-beginners-level-mechanics-and-animated-backgrounds/comment-page-1#comment-5281</link>
		<dc:creator>JestaBlunt</dc:creator>
		<pubDate>Thu, 04 Nov 2010 21:52:29 +0000</pubDate>
		<guid isPermaLink="false">http://asgamer.com/?p=105#comment-5281</guid>
		<description>and another one finished, thx 4 the wisdom ^^ and thx for aceofspadez619, i added the background while running, so i had to change the addChildAt-level for adding stars to 2 and all was fine...

peace
jesta (turns the page)</description>
		<content:encoded><![CDATA[<p>and another one finished, thx 4 the wisdom ^^ and thx for aceofspadez619, i added the background while running, so i had to change the addChildAt-level for adding stars to 2 and all was fine&#8230;</p>
<p>peace<br />
jesta (turns the page)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gary</title>
		<link>http://asgamer.com/2009/as3-flash-games-for-beginners-level-mechanics-and-animated-backgrounds/comment-page-1#comment-4787</link>
		<dc:creator>Gary</dc:creator>
		<pubDate>Tue, 09 Mar 2010 00:34:55 +0000</pubDate>
		<guid isPermaLink="false">http://asgamer.com/?p=105#comment-4787</guid>
		<description>Hi,

This is a great tutorial.  I was wondering if the code for the Starfield background can be modified to look like a 1st person point of view?  In otherwords, we are traveling towards the stars and the stars are zooming past us?

This is terrific.  Thanks very much.

Best,
Gary</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>This is a great tutorial.  I was wondering if the code for the Starfield background can be modified to look like a 1st person point of view?  In otherwords, we are traveling towards the stars and the stars are zooming past us?</p>
<p>This is terrific.  Thanks very much.</p>
<p>Best,<br />
Gary</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Daniël</title>
		<link>http://asgamer.com/2009/as3-flash-games-for-beginners-level-mechanics-and-animated-backgrounds/comment-page-1#comment-4726</link>
		<dc:creator>Daniël</dc:creator>
		<pubDate>Thu, 28 Jan 2010 10:47:57 +0000</pubDate>
		<guid isPermaLink="false">http://asgamer.com/?p=105#comment-4726</guid>
		<description>Here, Daniël here.
I have the same problem as mikehart, getting an 1136 error..
Even after I compared all the codes written by me with the final .zip of this tut, I cant find it.

The only thing I have &quot;customized&quot;, is the player code to get a smaller boundary for the ship to fly in.
Its really weird and frustrating to still get the message
&quot;1136: Incorrect number of arguments.  Expected 0.&quot;

Can anybody help me?</description>
		<content:encoded><![CDATA[<p>Here, Daniël here.<br />
I have the same problem as mikehart, getting an 1136 error..<br />
Even after I compared all the codes written by me with the final .zip of this tut, I cant find it.</p>
<p>The only thing I have &#8220;customized&#8221;, is the player code to get a smaller boundary for the ship to fly in.<br />
Its really weird and frustrating to still get the message<br />
&#8220;1136: Incorrect number of arguments.  Expected 0.&#8221;</p>
<p>Can anybody help me?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cnicoletti</title>
		<link>http://asgamer.com/2009/as3-flash-games-for-beginners-level-mechanics-and-animated-backgrounds/comment-page-1#comment-4723</link>
		<dc:creator>cnicoletti</dc:creator>
		<pubDate>Wed, 27 Jan 2010 20:55:38 +0000</pubDate>
		<guid isPermaLink="false">http://asgamer.com/?p=105#comment-4723</guid>
		<description>First let me start off by saying how cool this is!

Anyway, I have setup the stars and they are flowing rather well.

My question is, how do you get them to stop?

removeChild? If so, How does that work with multiple stars on stage at once?</description>
		<content:encoded><![CDATA[<p>First let me start off by saying how cool this is!</p>
<p>Anyway, I have setup the stars and they are flowing rather well.</p>
<p>My question is, how do you get them to stop?</p>
<p>removeChild? If so, How does that work with multiple stars on stage at once?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Unsafe Creations</title>
		<link>http://asgamer.com/2009/as3-flash-games-for-beginners-level-mechanics-and-animated-backgrounds/comment-page-1#comment-4719</link>
		<dc:creator>Unsafe Creations</dc:creator>
		<pubDate>Sun, 24 Jan 2010 04:57:24 +0000</pubDate>
		<guid isPermaLink="false">http://asgamer.com/?p=105#comment-4719</guid>
		<description>In case anyone was having touble with johno&#039;s problem...(Just posting this because it took me like 30 minutes to figure out...I might just be dumb, though)

If you want the Stars to go from left to right, use MrKrackham&#039;s example above. If you want them to go from right to left, and your stars aren&#039;t respawning, and if you&#039;re an AS noob like me, here&#039;s the problems.

public function setupLine(randomizeX:Boolean = false) : void
{
//inline conditional, looks complicated but it&#039;s not.
x = randomizeX ? Math.random()*stageRef.stageWidth : 750; **has to be 750, this is where they respawn**
y = Math.random()*stageRef.stageHeight;
alpha = Math.random();
scaleX = Math.random();
scaleY = Math.random();
 
speed = 2 + Math.random()*2;
}
 
public function loop(e:Event) : void
{
x -= speed; ****has to be a minus sign, so they go left****
 
if (x &lt; 0) ****this is where it got. don&#039;t know why. it just did.****
setupLine();
 
}
 
}
}</description>
		<content:encoded><![CDATA[<p>In case anyone was having touble with johno&#8217;s problem&#8230;(Just posting this because it took me like 30 minutes to figure out&#8230;I might just be dumb, though)</p>
<p>If you want the Stars to go from left to right, use MrKrackham&#8217;s example above. If you want them to go from right to left, and your stars aren&#8217;t respawning, and if you&#8217;re an AS noob like me, here&#8217;s the problems.</p>
<p>public function setupLine(randomizeX:Boolean = false) : void<br />
{<br />
//inline conditional, looks complicated but it&#8217;s not.<br />
x = randomizeX ? Math.random()*stageRef.stageWidth : 750; **has to be 750, this is where they respawn**<br />
y = Math.random()*stageRef.stageHeight;<br />
alpha = Math.random();<br />
scaleX = Math.random();<br />
scaleY = Math.random();</p>
<p>speed = 2 + Math.random()*2;<br />
}</p>
<p>public function loop(e:Event) : void<br />
{<br />
x -= speed; ****has to be a minus sign, so they go left****</p>
<p>if (x &lt; 0) ****this is where it got. don&#8217;t know why. it just did.****<br />
setupLine();</p>
<p>}</p>
<p>}<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mikehart</title>
		<link>http://asgamer.com/2009/as3-flash-games-for-beginners-level-mechanics-and-animated-backgrounds/comment-page-1#comment-4696</link>
		<dc:creator>mikehart</dc:creator>
		<pubDate>Mon, 28 Dec 2009 02:06:56 +0000</pubDate>
		<guid isPermaLink="false">http://asgamer.com/?p=105#comment-4696</guid>
		<description>I&#039;m getting a strange error when I try to compile. its on the line in the for loop

1136:Incorrect number of arguments.  Expected 0.</description>
		<content:encoded><![CDATA[<p>I&#8217;m getting a strange error when I try to compile. its on the line in the for loop</p>
<p>1136:Incorrect number of arguments.  Expected 0.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

