<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>ActionScript Tutorials</title>
	<atom:link href="http://astutorials.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://astutorials.wordpress.com</link>
	<description>ActionScript Tutorials! Here to help you!</description>
	<lastBuildDate>Fri, 30 Jul 2010 17:07:57 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='astutorials.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>ActionScript Tutorials</title>
		<link>http://astutorials.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://astutorials.wordpress.com/osd.xml" title="ActionScript Tutorials" />
	<atom:link rel='hub' href='http://astutorials.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Introducing the Drawing API in AS2</title>
		<link>http://astutorials.wordpress.com/2010/07/30/introducing-the-drawing-api-in-as2/</link>
		<comments>http://astutorials.wordpress.com/2010/07/30/introducing-the-drawing-api-in-as2/#comments</comments>
		<pubDate>Fri, 30 Jul 2010 17:07:57 +0000</pubDate>
		<dc:creator>antoarts</dc:creator>
				<category><![CDATA[ActionScript 2.0]]></category>
		<category><![CDATA[Basic]]></category>
		<category><![CDATA[as2]]></category>
		<category><![CDATA[draw]]></category>
		<category><![CDATA[Drawing API]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[lines]]></category>

		<guid isPermaLink="false">http://astutorials.wordpress.com/?p=51</guid>
		<description><![CDATA[AS2 contains an API (Application Programming Interface) for drawing stuff on the screen. We will in this tutorial check out the basics of it (it has way more functionality than we will go trough in this post). All code in this tutorial goes on the frame. To use this API, we will need to first [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astutorials.wordpress.com&amp;blog=4403237&amp;post=51&amp;subd=astutorials&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>AS2 contains an API (Application Programming Interface) for drawing stuff on the screen. We will in this tutorial check out the basics of it (it has way more functionality than we will go trough in this post).</p>
<p><strong>All code in this tutorial goes on the frame.</strong></p>
<p>To use this API, we will need to first create an empty movieclip, we will do so using:<br />
<code>_root.createNewMovieClip("newMC",1);</code></p>
<p>There we have a new movie clip which is a child to _root (meaning root is its direct parent). The movie clip is called newMC (parameter 1) and has the depth 1 (parameter 2).</p>
<p>We can now draw inside this movie clip using the drawing API.</p>
<p>In this tutorial we will use the following features of the Drawing API</p>
<ul>
<li><strong>lineStyle</strong> to set the style of lines drawn using the API</li>
<li><strong>moveTo </strong>to move the position we will draw a line from</li>
<li><strong>lineTo </strong>to draw a line from the position defined using moveTo</li>
</ul>
<p>We will start by setting the line style, we want thickness 5 and color black (#000000)<br />
<code>newMC.lineStyle(5,0x000000);</code></p>
<p>The first parameter is thickness (5) and the second is the color (0&#215;000000, to change color to something different, change the zero&#8217;s after the &#8220;0x&#8221; part to the hexidecimal code for that color)</p>
<p>We will start drawing from the position 80,90 on the frame. (80 is the x position and 90 is the y position)</p>
<p>To set that as our position we use the moveTo function:<br />
<code>newMC.moveTo(80,90);</code></p>
<p>Now to start drawing use the lineTo function:</p>
<p><code>newMC.lineTo(122,10);</code></p>
<p>Voila! With four lines we have created a new movie clip, changed line style and drawn a line from the position 80,90 to 122,10. Feel free to play around with this. With this you could already create e.g. a simple system for drawing line charts in Flash.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/astutorials.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/astutorials.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/astutorials.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/astutorials.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/astutorials.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/astutorials.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/astutorials.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/astutorials.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/astutorials.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/astutorials.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/astutorials.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/astutorials.wordpress.com/51/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/astutorials.wordpress.com/51/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/astutorials.wordpress.com/51/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astutorials.wordpress.com&amp;blog=4403237&amp;post=51&amp;subd=astutorials&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://astutorials.wordpress.com/2010/07/30/introducing-the-drawing-api-in-as2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9e702ee94f8b449ed333f749513716ca?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">antoarts</media:title>
		</media:content>
	</item>
		<item>
		<title>Creating a run key with an energy bar &#8211; Part 1</title>
		<link>http://astutorials.wordpress.com/2008/08/17/creating-a-run-key-with-an-energy-bar-part-1/</link>
		<comments>http://astutorials.wordpress.com/2008/08/17/creating-a-run-key-with-an-energy-bar-part-1/#comments</comments>
		<pubDate>Sun, 17 Aug 2008 08:38:59 +0000</pubDate>
		<dc:creator>antoarts</dc:creator>
				<category><![CDATA[ActionScript 2.0]]></category>
		<category><![CDATA[Basic]]></category>
		<category><![CDATA[as2]]></category>
		<category><![CDATA[energy bar]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[run]]></category>
		<category><![CDATA[walk]]></category>

		<guid isPermaLink="false">http://astutorials.wordpress.com/?p=45</guid>
		<description><![CDATA[So, in some games, you would like to be able to run, not only walk. Many games allows you to do this. Some games have got an energy bar, some haven&#8217;t. I&#8217;ll teach you how to make a walking system, with a run key and an energy bar. It might sound kinda complicated, but it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astutorials.wordpress.com&amp;blog=4403237&amp;post=45&amp;subd=astutorials&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So, in some games, you would like to be able to run, not only walk. Many games allows you to do this. Some games have got an energy bar, some haven&#8217;t. I&#8217;ll teach you how to make a walking system, with a run key and an energy bar. It might sound kinda complicated, but it isn&#8217;t. In fact, it&#8217;s <strong>very</strong> easy.</p>
<p><strong>STEP 1:</strong></p>
<p>Let&#8217;s start with the most important part. The walking code, which here also implements the running. It&#8217;s not much to add, to add the running feature.</p>
<p><code>onClipEvent (load) { //When the MC have loaded<br />
power = 3; //The speed of the player<br />
}<br />
onClipEvent (enterFrame) { //When you enter the frame, this code will run itself on and on again<br />
if(Key.isDown(Key.SHIFT)){//When shift is down<br />
power=8; //Set what the speed should be while running.<br />
}else{//If it isn't down<br />
power=3; //Set power to it's original value. In this case 3.<br />
}<br />
if (Key.isDown(Key.LEFT)) { //When you hold down the left key<br />
_x -= power; //x position will go lower according to the “power” variable<br />
this._rotation = 270; //This will rotate the MC 270 degrees.<br />
play(); //Play the walking animation, if you have any<br />
}<br />
if (Key.isDown(Key.RIGHT)) { //When you hold down the right key<br />
_x += power; //x position will go higher according to the "power" variable<br />
this._rotation = 90; //This will rotate the MC 90 degrees.<br />
play(); //Play walking animation<br />
}<br />
if (Key.isDown(Key.UP)) { //When you hold down the up key<br />
_y -= power; //y position will go lower according to the "power" variable<br />
this._rotation = 0; //No rotation needed, will reset rotation if the MC was already rotated<br />
play(); //Play the walking animation<br />
}<br />
if (Key.isDown(Key.DOWN)) { //If you hold down the down key<br />
_y += power; //y position will go higher according to the "power" variable<br />
this._rotation = 180; //Rotate the MC 180 degrees.<br />
play(); //Play the walking animation<br />
}<br />
if (Key.isDown(Key.RIGHT) &amp;&amp; Key.isDown(Key.UP)) { //If you hold down both the right and up key<br />
_rotation = 45; //Rotate the MC 45 degrees.<br />
}<br />
if (Key.isDown(Key.LEFT) &amp;&amp; Key.isDown(Key.UP)) { //If you hold down both the left and up key<br />
_rotation = 315; //Rotate the MC 315 degrees.<br />
}<br />
if (Key.isDown(Key.RIGHT) &amp;&amp; Key.isDown(Key.DOWN)) { //If you hold down both the right and down key<br />
_rotation = 135; //Rotate the MC 135 degrees.<br />
}<br />
if (Key.isDown(Key.LEFT) &amp;&amp; Key.isDown(Key.DOWN)) { //If you hold down both the left and the down key<br />
_rotation = 225; //Rotate the MC 225 degrees</code>}<br />
}</p>
<p>This did implement the running. Too bad, we haven&#8217;t got an energy bar yet, or any energy value in that case. The code above haven&#8217;t even gotten support for it yet, but that&#8217;s only the reason why you should change:</p>
<p><code> if(Key.isDown(Key.SHIFT)){</code></p>
<p>to</p>
<p><code> if(Key.isDown(Key.SHIFT) &amp;&amp; _root.energy&gt;0){</code></p>
<p>This will check if you actually have enough of energy. But wait, there&#8217;s another change to do in the code, add the following:</p>
<p><code>_root.energy-=0.5//Energy will do down. Change the variable to how fast you wish it to go down.</code></p>
<p>under the line you just changed (the one with the if Shift down bla bla&#8230;.)</p>
<p>And yeah buddy, one last change, under the }else{, add the following code:</p>
<p><code>_root.energy+=0.3; //Energy have to go up too!</code></p>
<p>In case your lazy/didn&#8217;t understand, here&#8217;s the full code after modifications:</p>
<p><code>onClipEvent (load) { //When the MC have loaded<br />
power = 3; //The speed of the player<br />
}<br />
onClipEvent (enterFrame) { //When you enter the frame, this code will run itself on and on again<br />
if(Key.isDown(Key.SHIFT) &amp;&amp; _root.energy&gt;0){//When shift is down and you have enough of energy<br />
power=8; //Set what the speed should be while running.<br />
_root.energy-=0.5//Energy will do down. Change the variable to how fast you wish it to go down.<br />
}else{//If it isn't down<br />
power=3; //Set power to it's original value. In this case 3.<br />
_root.energy+=0.3; //Energy have to go up too!<br />
}<br />
if (Key.isDown(Key.LEFT)) { //When you hold down the left key<br />
_x -= power; //x position will go lower according to the “power” variable<br />
this._rotation = 270; //This will rotate the MC 270 degrees.<br />
play(); //Play the walking animation, if you have any<br />
}<br />
if (Key.isDown(Key.RIGHT)) { //When you hold down the right key<br />
_x += power; //x position will go higher according to the "power" variable<br />
this._rotation = 90; //This will rotate the MC 90 degrees.<br />
play(); //Play walking animation<br />
}<br />
if (Key.isDown(Key.UP)) { //When you hold down the up key<br />
_y -= power; //y position will go lower according to the "power" variable<br />
this._rotation = 0; //No rotation needed, will reset rotation if the MC was already rotated<br />
play(); //Play the walking animation<br />
}<br />
if (Key.isDown(Key.DOWN)) { //If you hold down the down key<br />
_y += power; //y position will go higher according to the "power" variable<br />
this._rotation = 180; //Rotate the MC 180 degrees.<br />
play(); //Play the walking animation<br />
}<br />
if (Key.isDown(Key.RIGHT) &amp;&amp; Key.isDown(Key.UP)) { //If you hold down both the right and up key<br />
_rotation = 45; //Rotate the MC 45 degrees.<br />
}<br />
if (Key.isDown(Key.LEFT) &amp;&amp; Key.isDown(Key.UP)) { //If you hold down both the left and up key<br />
_rotation = 315; //Rotate the MC 315 degrees.<br />
}<br />
if (Key.isDown(Key.RIGHT) &amp;&amp; Key.isDown(Key.DOWN)) { //If you hold down both the right and down key<br />
_rotation = 135; //Rotate the MC 135 degrees.<br />
}<br />
if (Key.isDown(Key.LEFT) &amp;&amp; Key.isDown(Key.DOWN)) { //If you hold down both the left and the down key<br />
_rotation = 225; //Rotate the MC 225 degrees<br />
}<br />
}</code></p>
<p>Okey, now you got the biggest part done, go ahead to the next step!</p>
<p><strong>STEP 2:</strong></p>
<p>You&#8217;ve probably detected that we have NO energy variable. Right? Well, we need one, so let&#8217;s add one! Add this code to the frame! You must also prevent the variable from going higher than wanted, here&#8217;s a code for that too!</p>
<p><code>energy=100;//Now, the energy is one hundred<br />
if(energy&gt;100){//If energy is more than default, in this case 100<br />
energy=100;//The application wont accept it and set it to 100<br />
}</code></p>
<p>Now, in the next part we&#8217;ll create the energy bar, stay tuned, it&#8217;s probably coming already tomorrow!</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/astutorials.wordpress.com/45/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/astutorials.wordpress.com/45/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/astutorials.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/astutorials.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/astutorials.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/astutorials.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/astutorials.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/astutorials.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/astutorials.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/astutorials.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/astutorials.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/astutorials.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/astutorials.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/astutorials.wordpress.com/45/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/astutorials.wordpress.com/45/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/astutorials.wordpress.com/45/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astutorials.wordpress.com&amp;blog=4403237&amp;post=45&amp;subd=astutorials&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://astutorials.wordpress.com/2008/08/17/creating-a-run-key-with-an-energy-bar-part-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9e702ee94f8b449ed333f749513716ca?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">antoarts</media:title>
		</media:content>
	</item>
		<item>
		<title>Understanding the if and }else{ statements, as well as the ! operator</title>
		<link>http://astutorials.wordpress.com/2008/08/13/understanding-the-if-and-else-statements-as-well-as-the-operator/</link>
		<comments>http://astutorials.wordpress.com/2008/08/13/understanding-the-if-and-else-statements-as-well-as-the-operator/#comments</comments>
		<pubDate>Wed, 13 Aug 2008 12:07:40 +0000</pubDate>
		<dc:creator>antoarts</dc:creator>
				<category><![CDATA[ActionScript 2.0]]></category>
		<category><![CDATA[Basic]]></category>
		<category><![CDATA[!]]></category>
		<category><![CDATA[as2]]></category>
		<category><![CDATA[equality]]></category>
		<category><![CDATA[false]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[if]]></category>
		<category><![CDATA[operator]]></category>
		<category><![CDATA[statement]]></category>
		<category><![CDATA[usages]]></category>
		<category><![CDATA[}else{]]></category>

		<guid isPermaLink="false">http://astutorials.wordpress.com/?p=43</guid>
		<description><![CDATA[It&#8217;s important that you do understand the two statements if and }else{ while coding in AS2.0. Those are actually some of the most used, and most useful statements in the language. I&#8217;m gonna learn you what they do, and what you can use them for! STEP 1: Let&#8217;s start with the statement if only. if [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astutorials.wordpress.com&amp;blog=4403237&amp;post=43&amp;subd=astutorials&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s important that you do understand the two statements <em>if</em> and <em>}else{</em> while coding in AS2.0. Those are actually some of the most used, and most useful statements in the language. I&#8217;m gonna learn you what they do, and what you can use them for!</p>
<p><strong>STEP 1:</strong></p>
<p>Let&#8217;s start with the statement <em>if</em> only. <em>if </em>is used to check if one thing is true, and then it will do the decided command. If you want to put this code on a movieclip, then remember to have it under an <em>onClipEvent(){</em> or under an <em>on(){</em> statement. But we will start by putting <em>if</em> on the frame.</p>
<p><code>if(1==1){ //If 1 is equal to 1<br />
trace("true");//Will type "true" in the debugging window<br />
}</code></p>
<p>So, I&#8217;m sure you know that 1 is equal to 1. We used <em>==</em> and not <em>=</em> because <em>=</em> is the assignment operator, and what it does is to change a to b, in this case, 1 would&#8217;ve been changed to 1, but if it would&#8217;ve been <em>1=2</em>, then 1 would&#8217;ve been changed to 2.</p>
<p><strong>STEP 2:</strong></p>
<p>Well, let&#8217;s check what happens if we change the first line to:</p>
<p><code>if(1==2){//1 isn't 2, so this is false</code></p>
<p>Well, no message. That&#8217;s because 1 is NOT 2. But you might want a false message anyway. This is where the }else{ statement will be used. Read the following code.</p>
<p><code>if(1==2){ //1 isn't 2, so this is false<br />
trace("true"); //The message if it's true<br />
}else{//Else in actionscript is the same thing as in English.<br />
trace("false");//The message if it's false<br />
}</code></p>
<p>So, now it says false. But you can change the expressions the if tag have got to something else. If you change it to <em>1==1</em>, it will be true, as well as if you change it to <em>3==3</em>, it will be true, but if you change it to <em>11==1</em>, for example, it will turn out as false. I think you get it now, right?</p>
<p><strong>USAGES:</strong></p>
<p>Well, basically anything, you use this for <em>hitTest</em> (checks if one object touches another), checking if a variable is what and doing something if it is that and so on&#8230;. Basically, think about what the word stands for in English.</p>
<p><strong>The ! (false):</strong></p>
<p>This operator stands for false. You can use it with the <em>if</em> statement. Here&#8217;s one example, doing pretty much the same as the previous code examples, but this time the other way!<br />
<code>if(!1==1){ //If 1 isn't 1<br />
trace("true"); //The message if that's true<br />
}else{//Well, if 1 actually is 1, then the following message will appear<br />
trace("false");//The message if that's false<br />
}</code></p>
<p>The <em>!</em> operator is basically useful, so I hope you will remember that part of the tutorial, as well as the other parts, because those parts was important things too! Thank you for your interest!</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/astutorials.wordpress.com/43/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/astutorials.wordpress.com/43/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/astutorials.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/astutorials.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/astutorials.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/astutorials.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/astutorials.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/astutorials.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/astutorials.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/astutorials.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/astutorials.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/astutorials.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/astutorials.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/astutorials.wordpress.com/43/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/astutorials.wordpress.com/43/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/astutorials.wordpress.com/43/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astutorials.wordpress.com&amp;blog=4403237&amp;post=43&amp;subd=astutorials&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://astutorials.wordpress.com/2008/08/13/understanding-the-if-and-else-statements-as-well-as-the-operator/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9e702ee94f8b449ed333f749513716ca?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">antoarts</media:title>
		</media:content>
	</item>
		<item>
		<title>Making a simple Motion Tween using script</title>
		<link>http://astutorials.wordpress.com/2008/08/08/making-a-simple-motion-tween-using-script/</link>
		<comments>http://astutorials.wordpress.com/2008/08/08/making-a-simple-motion-tween-using-script/#comments</comments>
		<pubDate>Fri, 08 Aug 2008 13:28:25 +0000</pubDate>
		<dc:creator>antoarts</dc:creator>
				<category><![CDATA[ActionScript 2.0]]></category>
		<category><![CDATA[Basic]]></category>
		<category><![CDATA[animate with script]]></category>
		<category><![CDATA[as2]]></category>
		<category><![CDATA[button]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[MC]]></category>
		<category><![CDATA[pause]]></category>
		<category><![CDATA[play]]></category>
		<category><![CDATA[tween]]></category>

		<guid isPermaLink="false">http://astutorials.wordpress.com/?p=40</guid>
		<description><![CDATA[Okey, this isn&#8217;t really a real motion tween, but it will basically do the same thing. It&#8217;s simple, as simple as it can get, almost&#8230;. So, I&#8217;m gonna teach you how to make a motion tween using script, and I will also learn you how to do a play and pause button for it. So, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astutorials.wordpress.com&amp;blog=4403237&amp;post=40&amp;subd=astutorials&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Okey, this isn&#8217;t really a real motion tween, but it will basically do the same thing. It&#8217;s simple, as simple as it can get, almost&#8230;.</p>
<p>So, I&#8217;m gonna teach you how to make a motion tween using script, and I will also learn you how to do a play and pause button for it. So, go on to step one, now!</p>
<p><strong>STEP 1:</strong></p>
<p>Well, let&#8217;s begin by looking at the first frame in the movie. It&#8217;s empty, for now. But soon, it won&#8217;t be. Begin with creating two buttons. They do not need any instance names. The first button should be a play button, the second one should be a pause button. Another thing you could do is to add a MC, no instance name this time either. Now, a last thing to do at this step, add the following code to the first frame!</p>
<p><code>playpause=2; //The tween is paused, change to 1 to have it play as default</code></p>
<p><strong>STEP 2:</strong></p>
<p>Now, you got two buttons. You need to add some code on them, of course. If there&#8217;s some new commands in the code, read it until you do understand the code, and don&#8217;t just copy/paste.</p>
<p>This one is for the play button:</p>
<p><code>on(release){ //When you release the button<br />
_root.playpause=1; //Set the variable to 1 (play)<br />
}</code></p>
<p>And here&#8217;s a code for the pause button:<br />
<code>on(release){ //When you release the button<br />
_root.playpause=1; //Set the variable to 2 (pause)<br />
}</code></p>
<p>Good, but there&#8217;s still the most important part missing. Take a look at step 3!</p>
<p><strong>STEP 3:</strong></p>
<p>Let&#8217;s finish it! You need to add some code to the MC, or it won&#8217;t work. The code you need is basically simple, and if you know how to use variables, you should have no problem to modify it. And anyway, there&#8217;s descriptions for every line with any commands.</p>
<p><code>onClipEvent(load){ //When MC have been loaded<br />
speed=5; //Set the speed of the motion tween<br />
startx=100; //Set the X starting position<br />
starty=100; //Set the Y starting position<br />
endx=220; //Set the X final position<br />
endy=300; //Set the Y final position<br />
}<br />
onClipEvent(enterFrame){//When you enter the frame, this code will run itself over and over again<br />
if(_root.playpause===1){//1 is play, pause is 2. It must be on play.<br />
if(this._x&lt; to &gt;)<br />
this._x+=speed;//The MC X axis will go higher<br />
}<br />
if(this._y&lt; to &gt;)<br />
this._y+=speed;//The MC Y axis will go higher<br />
}<br />
}<br />
}</code></p>
<p><strong>WORDPRESS DIDN&#8217;T LIKE SOME PARTS OF THE CODE (line 10 and 13), HERE&#8217;S A WORKING ONE!</strong></p>
<p><a href="http://astutorials.files.wordpress.com/2008/08/fixedcode.jpg"><img class="alignnone size-full wp-image-41" src="http://astutorials.files.wordpress.com/2008/08/fixedcode.jpg?w=361&#038;h=370" alt="" width="361" height="370" /></a></p>
<p>Only 17 lines! And it&#8217;s still working! In total, you used 24 lines(!), and the result is a tween using script, with a play and pause button too!</p>
<p>Oh yeah, maybe you can use this for something, I have no idea if you can find something to do with it, but if you use it, feel free to post links!</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/astutorials.wordpress.com/40/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/astutorials.wordpress.com/40/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/astutorials.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/astutorials.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/astutorials.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/astutorials.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/astutorials.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/astutorials.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/astutorials.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/astutorials.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/astutorials.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/astutorials.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/astutorials.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/astutorials.wordpress.com/40/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/astutorials.wordpress.com/40/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/astutorials.wordpress.com/40/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astutorials.wordpress.com&amp;blog=4403237&amp;post=40&amp;subd=astutorials&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://astutorials.wordpress.com/2008/08/08/making-a-simple-motion-tween-using-script/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9e702ee94f8b449ed333f749513716ca?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">antoarts</media:title>
		</media:content>

		<media:content url="http://astutorials.files.wordpress.com/2008/08/fixedcode.jpg" medium="image" />
	</item>
		<item>
		<title>The simple hitTest code, explained, and a lil&#8217; bit improved.</title>
		<link>http://astutorials.wordpress.com/2008/08/05/the-simple-hittest-code-explained-and-a-lil-bit-improved/</link>
		<comments>http://astutorials.wordpress.com/2008/08/05/the-simple-hittest-code-explained-and-a-lil-bit-improved/#comments</comments>
		<pubDate>Tue, 05 Aug 2008 16:00:28 +0000</pubDate>
		<dc:creator>antoarts</dc:creator>
				<category><![CDATA[ActionScript 2.0]]></category>
		<category><![CDATA[Basic]]></category>
		<category><![CDATA[as2]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[hitTest]]></category>
		<category><![CDATA[MC]]></category>

		<guid isPermaLink="false">http://astutorials.wordpress.com/?p=36</guid>
		<description><![CDATA[Hi, I&#8217;ve seen many questions by many beginners asking about hitTest. Their questions are usualy about some simple hitTest codes, and I&#8217;m gonna explain for you how everything works in this tutorial. WHAT IS HITTEST? hitTest is a command used in actionscript to check if one object touches another. This is a very well used [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astutorials.wordpress.com&amp;blog=4403237&amp;post=36&amp;subd=astutorials&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hi, I&#8217;ve seen many questions by many beginners asking about hitTest. Their questions are usualy about some simple hitTest codes, and I&#8217;m gonna explain for you how everything works in this tutorial.</p>
<p><strong>WHAT IS HITTEST?</strong></p>
<p>hitTest is a command used in actionscript to check if one object touches another. This is a very well used code, as it&#8217;s used in about every game. It can be used to create walls, powerups, traps or anything else that will do any command when the specified object touches it.</p>
<p><strong>SO, WHAT&#8217;S THE CODE?</strong></p>
<p>Um, no copy/paste, ok? This tutorial is meant for teaching you, if you copy/paste, you might get the code, but you will NOT understand it!</p>
<p>But the code is still here, and it&#8217;s explained too. It should be put on the enemy MC.</p>
<p><code>onClipEvent (enterFrame) { //When you enter the frame, code will run itself over and over again.<br />
if (this.hitTest(_root.player)) { //Checks if it touches the player MC, in case it does, the following command will be executed...<br />
_root.life -= 15;//You'll lose 15 health<br />
}<br />
}</code></p>
<p>Now, this isn&#8217;t the code I use normally, as it only checks the object rectangle, which means, if your MC is any other shape than a rectangle, the hitTest will be oversensitive. If you want to see the object rectangle, click on a MC with the selection tool. You will now understand, the player doesn&#8217;t have to touch the actual object, only that rectangle. This is why that code is a bad code&#8230;</p>
<p><strong>THE CODE I DO RECOMMEND:</strong></p>
<p>Well, let&#8217;s look at a better code. Put it on the player MC this time. And, no copy/paste!</p>
<p><code>onClipEvent (enterFrame) {//When you enter the frame, code is running itself over and over again<br />
if (_root.enemy.hitTest(_x, _y, true)) {//The better hitTest, it do actually check if it touches the actual shape! enemy is the instance of the enemy MC<br />
_root.life -= 15;//You'll lose 15 health<br />
}<br />
}</code></p>
<p>Well, this code does the same thing, but on a better way! It will check if it touches the actual shape, not the object rectangle. The first hitTest is really bad, and it&#8217;s not really easier either. Use this one, I would say it&#8217;s better!</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/astutorials.wordpress.com/36/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/astutorials.wordpress.com/36/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/astutorials.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/astutorials.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/astutorials.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/astutorials.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/astutorials.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/astutorials.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/astutorials.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/astutorials.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/astutorials.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/astutorials.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/astutorials.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/astutorials.wordpress.com/36/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/astutorials.wordpress.com/36/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/astutorials.wordpress.com/36/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astutorials.wordpress.com&amp;blog=4403237&amp;post=36&amp;subd=astutorials&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://astutorials.wordpress.com/2008/08/05/the-simple-hittest-code-explained-and-a-lil-bit-improved/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9e702ee94f8b449ed333f749513716ca?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">antoarts</media:title>
		</media:content>
	</item>
		<item>
		<title>More AS2 Basics: Programming a button and variables introduction</title>
		<link>http://astutorials.wordpress.com/2008/08/04/more-as2-basics-programming-a-button-and-variables-introduction/</link>
		<comments>http://astutorials.wordpress.com/2008/08/04/more-as2-basics-programming-a-button-and-variables-introduction/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 10:42:12 +0000</pubDate>
		<dc:creator>antoarts</dc:creator>
				<category><![CDATA[ActionScript 2.0]]></category>
		<category><![CDATA[Basic]]></category>
		<category><![CDATA[as2]]></category>
		<category><![CDATA[button]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[variables]]></category>

		<guid isPermaLink="false">http://astutorials.wordpress.com/?p=31</guid>
		<description><![CDATA[I want this blog to have tutorials in many dificulties, but I&#8217;m still trying to make it useful for those who are new to AS2. So I&#8217;ll learn you something as simple as programming a button. Enjoy! STEP 1: Create a new flash document. When you&#8217;ve done that, you should, as usual, have ONE keyframe, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astutorials.wordpress.com&amp;blog=4403237&amp;post=31&amp;subd=astutorials&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I want this blog to have tutorials in many dificulties, but I&#8217;m still trying to make it useful for those who are new to AS2. So I&#8217;ll learn you something as simple as programming a button. Enjoy!</p>
<p><strong>STEP 1:</strong></p>
<p>Create a new flash document. When you&#8217;ve done that, you should, as usual, have ONE keyframe, which is empty because you haven&#8217;t added anything there yet. Let&#8217;s begin with adding some script on that frame, click it and press F9 to open the actions panel. The code you should write is the easiest code there is in AS2:</p>
<p><code>stop(); //This will stop the movie from playing any further</code></p>
<p>That was step one!</p>
<p><strong>STEP 2:</strong></p>
<p>So, now you should add a blank keyframe after the current frame. Right click on the right side of the current frame and press &#8220;Insert Blank Keyframe&#8221;. Good, that&#8217;s it!</p>
<p><strong>STEP 3:</strong></p>
<p>Go back to the first button and create a new button. Draw something, select your drawing, and press F8. Set symbol instance to button. Then press OK.</p>
<p><a href="http://astutorials.files.wordpress.com/2008/08/help-picture.jpg"><img class="size-full wp-image-32 alignnone" src="http://astutorials.files.wordpress.com/2008/08/help-picture.jpg?w=445&#038;h=180" alt="" width="445" height="180" /></a></p>
<p><strong>STEP 4:</strong></p>
<p>Now comes some script, read it, and put it on the button.</p>
<p><code>on(release){//When you release the button....<br />
gotoAndStop(2);//Will go to the specified frame (2) and stop playing. Stop can be changed to Play in case you want it to play<br />
}</code></p>
<p>That&#8217;s the first example, but we&#8217;re going to show you some more. Basically, you change the <code>gotoAndStop(2);</code> part to what command you want. But we&#8217;ll begin with changing line 1:</p>
<p><code>//This code shouldn't be applied to the movie, it's instructions.<br />
//Edit the code inside the stars! on(*release*){<br />
press //When you click the button<br />
releaseOutside //When you release the button, cursor may not be above the button<br />
rollOver //When you move your mouse over the button<br />
rollOut //When you roll your mouse away from the button<br />
dragOver //Holding down the mouse button and dragging over the button<br />
dragOut //Holding down the mouse button and dragging away from the button<br />
keyPress"<!--/key-->" //When you press the specified key. There's also better codes for this.</code></p>
<p>Now, you can also modify line number two, here&#8217;s some simple things you can change it to:</p>
<p><code>//This code shouldn't be applied to the movie, it's instructions.<br />
gotoAndPlay(2); //Same as gotoAndStop(); but this plays the movie. 2 is the frame it will go to.<br />
nextFrame(); //Goes to the next frame in the movie, this stops<br />
prevFrame(); //Goes to the previous frame in the movie, just like nextFrame();, this stops<br />
number +=1; //Will make the number variable go up by one.<br />
number -=1; //Will make the number variable go down by one<br />
number =1; //Will set the number variable to one</code></p>
<p>That was it, and yeah, if you want that number variable to work, add the following code to the first frame in your movie:</p>
<p><code>number=1; //number is the name of the variable, 1 is what it will be by default.</code></p>
<p>And a very last thing, how to show the variable. Add a new text field, change the type to dynamic by clicking the little drop down menu and then in the var: text field, type the name of the variable. In this case, &#8220;number&#8221;.</p>
<p>So, now it&#8217;s over, for real.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/astutorials.wordpress.com/31/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/astutorials.wordpress.com/31/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/astutorials.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/astutorials.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/astutorials.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/astutorials.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/astutorials.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/astutorials.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/astutorials.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/astutorials.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/astutorials.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/astutorials.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/astutorials.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/astutorials.wordpress.com/31/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/astutorials.wordpress.com/31/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/astutorials.wordpress.com/31/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astutorials.wordpress.com&amp;blog=4403237&amp;post=31&amp;subd=astutorials&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://astutorials.wordpress.com/2008/08/04/more-as2-basics-programming-a-button-and-variables-introduction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9e702ee94f8b449ed333f749513716ca?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">antoarts</media:title>
		</media:content>

		<media:content url="http://astutorials.files.wordpress.com/2008/08/help-picture.jpg" medium="image" />
	</item>
		<item>
		<title>Designing Flash Games &#8211; Part 2</title>
		<link>http://astutorials.wordpress.com/2008/08/04/designing-flash-games-part-2/</link>
		<comments>http://astutorials.wordpress.com/2008/08/04/designing-flash-games-part-2/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 10:07:06 +0000</pubDate>
		<dc:creator>antoarts</dc:creator>
				<category><![CDATA[Game Design]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://astutorials.wordpress.com/?p=29</guid>
		<description><![CDATA[So, I&#8217;ll continue the list I started earlier. Read it first if you haven&#8217;t! Preloader. Yey, we get to stare at a blank screen, how funny! No, it&#8217;s not funny at all. Make a preloader, it&#8217;s completely worth it. Checkpoints in long levels. Well, isn&#8217;t it annoying when you lose, and have to start from [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astutorials.wordpress.com&amp;blog=4403237&amp;post=29&amp;subd=astutorials&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>So, I&#8217;ll continue <a href="http://astutorials.wordpress.com/2008/08/03/designing-flash-games-part-1/">the list I started earlier.</a> Read it first if you haven&#8217;t!</p>
<ol>
<li><strong>Preloader. </strong>Yey, we get to stare at a blank screen, how funny! No, it&#8217;s not funny at all. Make a preloader, it&#8217;s completely worth it.</li>
<li><strong>Checkpoints in long levels. </strong>Well, isn&#8217;t it annoying when you lose, and have to start from the beginning? Of course it is, even if it might make the game a little bit harder. If your game have got long levels, then I do recommend that you add checkpoints a little here and there during the game.</li>
<li><strong>Saving, and loading. </strong>This, is very important! If you haven&#8217;t got that feature yet in your game add it, or wait, some puzzle games (without levels), quizzes and that doesn&#8217;t need it, but if there&#8217;s any story, and achievements or anything the user would like to keep, then the feature to save and load the game would be nice. And yeah, maybe autosaving would be good too?</li>
<li><strong>If you remake a classic, make sure to have something new! </strong>Let&#8217;s say, you&#8217;re making a tetris remake. Oh yeah, there&#8217;s hundreds of tetris remakes already, why would we want another? Well, we might want another, but then it better have something new and creative. Remember the first point in <a href="http://astutorials.wordpress.com/2008/08/03/designing-flash-games-part-1/">part one!</a></li>
<li><strong>Don&#8217;t use hard to read fonts. </strong>Many hard to read fonts do LOOK nice, but it&#8217;s NOT FUN TO READ if it&#8217;s hard to. Don&#8217;t have too small fonts either, and don&#8217;t put too much effects on the text, it should both look good and be easy to read.</li>
<li><strong>Keep contrast at a level that doesn&#8217;t hurt in your eyes! </strong>Well, I don&#8217;t know how many people actually enjoy that it hurts in their eyes. I don&#8217;t think there&#8217;s many. Think about the contrast, and your game will be a lot more appreciated.</li>
<li><strong>Don&#8217;t have too weak contrast either! </strong>Then it can be hard to read and all that stuff, so basically, to say point 6 and point 7 in one sentence: Have a good contrast level!</li>
<li><strong>Free mode. </strong>So, your game have got a campaign mode, but no free mode? That&#8217;s not good, a free mode is plenty of fun and highly recommended. Think about adding one, and your game might suddenly get a whole lot better.</li>
<li><strong>Secrets, fun? </strong>Yes. You can add several ways to unlock secrets during the game. This gives the game more depth and it gets a lot more interesting, too!</li>
</ol>
<p>And that was the 9 points for today, thanks for reading, and hope you will remember this!</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/astutorials.wordpress.com/29/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/astutorials.wordpress.com/29/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/astutorials.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/astutorials.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/astutorials.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/astutorials.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/astutorials.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/astutorials.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/astutorials.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/astutorials.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/astutorials.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/astutorials.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/astutorials.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/astutorials.wordpress.com/29/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/astutorials.wordpress.com/29/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/astutorials.wordpress.com/29/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astutorials.wordpress.com&amp;blog=4403237&amp;post=29&amp;subd=astutorials&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://astutorials.wordpress.com/2008/08/04/designing-flash-games-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9e702ee94f8b449ed333f749513716ca?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">antoarts</media:title>
		</media:content>
	</item>
		<item>
		<title>Game Design, the sounds.</title>
		<link>http://astutorials.wordpress.com/2008/08/04/game-design-the-sounds/</link>
		<comments>http://astutorials.wordpress.com/2008/08/04/game-design-the-sounds/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 07:50:22 +0000</pubDate>
		<dc:creator>antoarts</dc:creator>
				<category><![CDATA[Game Design]]></category>
		<category><![CDATA[effects]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[music]]></category>
		<category><![CDATA[sounds]]></category>
		<category><![CDATA[tips]]></category>

		<guid isPermaLink="false">http://astutorials.wordpress.com/?p=26</guid>
		<description><![CDATA[Sounds are an important thing to think about in games. Well, some things to remember is (and yes, this will be a list too, like my other game design tutorial): BACKGROUND MUSIC: Well, what must the background music do? Well, it can&#8217;t be to uncompressed, &#8216;cuz people don&#8217;t like long waits. It shouldn&#8217;t be too [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astutorials.wordpress.com&amp;blog=4403237&amp;post=26&amp;subd=astutorials&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Sounds are an important thing to think about in games. Well, some things to remember is (and yes, this will be a list too, like my other game design tutorial):</p>
<ol>
<li><strong>BACKGROUND MUSIC: </strong>Well, what must the background music do? Well, it can&#8217;t be to uncompressed, &#8216;cuz people don&#8217;t like long waits. It shouldn&#8217;t be too compressed either, &#8216;cuz then it will sound dirty, and then none wants to listen to it, they will usually quit the game.</li>
<li><strong>MUTE BUTTON: </strong>Sometimes, people don&#8217;t want to listen to your background music. In those cases, a mute button would be good. Think about that!</li>
<li><strong>EFFECTS: </strong>Effects, they do give the game a feeling, or what would a shooting game be without gun sounds? But the effects shouldn&#8217;t be too loud, and what they SHOULD do is to be matching the thing that happens. And yes, for gun sounds, I&#8217;ve heard a lot of critic for a lot of peoples games were people have said they should use different gun sounds for different guns. Now, you can&#8217;t put the sound of a AK47 on a SPAS12, you must also use the correct, or something very close. <a href="http://flashkit.com">Flashkit</a> can be a good site to look for sound effects.</li>
<li><strong>BACKGROUND MUSIC CAN&#8217;T BE REPETITIVE: </strong>You know, while people are playing your game, they are gonna listen to the background music trough the whole game! It should absolutely not be repetitive, or you&#8217;ll get angry comments. Listen to a song in about 10 minutes, will it make you mad? Probably if it&#8217;s a 10 second loop&#8230;</li>
<li><strong>VOICES: </strong>Now, every game doesn&#8217;t need voices, but in some games it can be good, and I&#8217;m sure you agree with me that voices can be a lot more entertaining than some text. Don&#8217;t use the MS Sam voice, it DOES sound dirty, and that&#8217;s not what we want. We want real voices, so you need someone to do the voice acting. You can&#8217;t have the same voice on everyone either, and if you don&#8217;t get any voice actors, try to at least manipulate your voice to make it sound different on everyone. Do this on the computer, &#8216;cuz if you do it in the microphone, it will sound plain stupid. And yeah, you should have a quality microphone.</li>
</ol>
<p>That was the five steps for now. Use the comments section if something isn&#8217;t as you think it is or that I&#8217;ve missed something.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/astutorials.wordpress.com/26/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/astutorials.wordpress.com/26/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/astutorials.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/astutorials.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/astutorials.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/astutorials.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/astutorials.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/astutorials.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/astutorials.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/astutorials.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/astutorials.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/astutorials.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/astutorials.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/astutorials.wordpress.com/26/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/astutorials.wordpress.com/26/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/astutorials.wordpress.com/26/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astutorials.wordpress.com&amp;blog=4403237&amp;post=26&amp;subd=astutorials&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://astutorials.wordpress.com/2008/08/04/game-design-the-sounds/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9e702ee94f8b449ed333f749513716ca?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">antoarts</media:title>
		</media:content>
	</item>
		<item>
		<title>FUN: Playing around with variables</title>
		<link>http://astutorials.wordpress.com/2008/08/04/fun-playing-around-with-variables/</link>
		<comments>http://astutorials.wordpress.com/2008/08/04/fun-playing-around-with-variables/#comments</comments>
		<pubDate>Mon, 04 Aug 2008 07:32:00 +0000</pubDate>
		<dc:creator>antoarts</dc:creator>
				<category><![CDATA[ActionScript 2.0]]></category>
		<category><![CDATA[Basic]]></category>
		<category><![CDATA[as2]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[fun]]></category>
		<category><![CDATA[variables]]></category>

		<guid isPermaLink="false">http://astutorials.wordpress.com/?p=23</guid>
		<description><![CDATA[Now, I&#8217;ll show you some cool things you can do with variables. To start up, create a new DYNAMIC text box and give it the variable main. This will be the variable that will bounce around. STEP 1: So, let&#8217;s start this. read the explanations in the codes, so you&#8217;ll understand them! Yeah, by the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astutorials.wordpress.com&amp;blog=4403237&amp;post=23&amp;subd=astutorials&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Now, I&#8217;ll show you some cool things you can do with variables. To start up, create a new DYNAMIC text box and give it the variable main. This will be the variable that will bounce around.</p>
<p><strong>STEP 1:<br />
</strong></p>
<p>So, let&#8217;s start this. read the explanations in the codes, so you&#8217;ll understand them! Yeah, by the way, make a new MC and put it off stage! Well, now to the first code part, a whole line, yay!</p>
<p><code>main=1;//The main variable will be a 1</code></p>
<p>So, test your movie (CTRL+ENTER) and you&#8217;ll see the number one.</p>
<p><strong>STEP 2:</strong></p>
<p>It&#8217;s easy to make the variable bounce, and it&#8217;s easy to modify the code. But no copy/paste! Put the code on the MC which is off stage.</p>
<p><code>onClipEvent(enterFrame){//When you enter the frame, the code will run itself over and over again<br />
if(_root.main&lt;10){//If the variable main is less than 10<br />
_root.main+=1;//Variable will go higher<br />
}else{//If it's more than that<br />
_root.main=1;//Main will be reset.<br />
}<br />
}</code></p>
<p>So, if you want it to count to 100 before it will restart, change &#8220;10&#8243; to &#8220;100&#8243; and so on. If you want it to start from something else, change the ones to where you want it to start from. You can also put it to count backwards, I&#8217;m sure you&#8217;ll figure out how <img src='http://s1.wp.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>So, now you do probably know variables a bit better, and that&#8217;s good, because variables is very important when you go more advanced! It&#8217;s almost all about variables and math, lol&#8230;. It might sound complicated but it isn&#8217;t, it&#8217;s kinda fun too <img src='http://s0.wp.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/astutorials.wordpress.com/23/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/astutorials.wordpress.com/23/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/astutorials.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/astutorials.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/astutorials.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/astutorials.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/astutorials.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/astutorials.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/astutorials.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/astutorials.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/astutorials.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/astutorials.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/astutorials.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/astutorials.wordpress.com/23/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/astutorials.wordpress.com/23/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/astutorials.wordpress.com/23/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astutorials.wordpress.com&amp;blog=4403237&amp;post=23&amp;subd=astutorials&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://astutorials.wordpress.com/2008/08/04/fun-playing-around-with-variables/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9e702ee94f8b449ed333f749513716ca?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">antoarts</media:title>
		</media:content>
	</item>
		<item>
		<title>Click Counter and 1time&#8230;. 2times script</title>
		<link>http://astutorials.wordpress.com/2008/08/03/click-counter-and-1time-2times-script/</link>
		<comments>http://astutorials.wordpress.com/2008/08/03/click-counter-and-1time-2times-script/#comments</comments>
		<pubDate>Sun, 03 Aug 2008 16:53:53 +0000</pubDate>
		<dc:creator>antoarts</dc:creator>
				<category><![CDATA[ActionScript 2.0]]></category>
		<category><![CDATA[Basic]]></category>
		<category><![CDATA[as2]]></category>
		<category><![CDATA[counter]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[mouse]]></category>

		<guid isPermaLink="false">http://astutorials.wordpress.com/?p=19</guid>
		<description><![CDATA[Hello. In this tutorial, we will make something as simple as a click counter. Yes, what it does is to count how many times you&#8217;ve clicked the mouse. It will also check that there&#8217;s no grammatical errors such as 1 timeS. What we will be making STEP 1: Make a new MC and put it [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astutorials.wordpress.com&amp;blog=4403237&amp;post=19&amp;subd=astutorials&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Hello. In this tutorial, we will make something as simple as a click counter. Yes, what it does is to count how many times you&#8217;ve clicked the mouse. It will also check that there&#8217;s no grammatical errors such as 1 time<strong>S</strong>.</p>
<p><a href="http://img509.imageshack.us/img509/167/tutorialhj4.swf" target="_blank">What we will be making</a></p>
<p><strong>STEP 1:</strong></p>
<p>Make a new MC and put it off stage. You should also add a static text field (on the stage) with the text: &#8220;You&#8217;ve clicked the mouse:&#8221;. Then to finish this step, add two dynamic text fields, one should have the variable &#8220;clicks&#8221;. The other one should have the variable &#8220;textbox&#8221;. When you&#8217;re finished with that, go on to the next step.</p>
<p><strong>STEP 2:</strong></p>
<p>Now to some script, in this step, we&#8217;ll explain TWO WHOLE LINES OF CODE!! This code should be put on the frame:</p>
<p><code>clicks=0;//mouse clicks<br />
textbox="times";//This will fix grammatical errors like 1 timeS</code></p>
<p>So, study the code too, so you know what it is for!</p>
<p><strong>STEP 3:</strong></p>
<p>Now, this is the final step, where you should add code to the MC which should be off stage. The code is shown and explained below:</p>
<p><code>onClipEvent(mouseDown){//When you click<br />
_root.clicks++; //The number will go up<br />
//fix grammar errors<br />
if(_root.clicks===1){//If the amount of clicks is one<br />
_root.textbox="time"; //Then it should be time<br />
}else{ //But if not....<br />
_root.textbox="times"; //It should be times<br />
}<br />
}</code></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/astutorials.wordpress.com/19/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/astutorials.wordpress.com/19/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/astutorials.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/astutorials.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/astutorials.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/astutorials.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/astutorials.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/astutorials.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/astutorials.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/astutorials.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/astutorials.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/astutorials.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/astutorials.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/astutorials.wordpress.com/19/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/astutorials.wordpress.com/19/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/astutorials.wordpress.com/19/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=astutorials.wordpress.com&amp;blog=4403237&amp;post=19&amp;subd=astutorials&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://astutorials.wordpress.com/2008/08/03/click-counter-and-1time-2times-script/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/9e702ee94f8b449ed333f749513716ca?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">antoarts</media:title>
		</media:content>
	</item>
	</channel>
</rss>
