<?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/"
	>

<channel>
	<title>pixology &#187; tutorial</title>
	<atom:link href="http://www.pixologyinteractive.com/tag/tutorial/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.pixologyinteractive.com</link>
	<description>//creativity from the ground up</description>
	<lastBuildDate>Wed, 23 Sep 2009 16:56:04 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>ActionScript Basics: Terms Defined</title>
		<link>http://www.pixologyinteractive.com/2009/02/actionscript-basics-terms-defined/</link>
		<comments>http://www.pixologyinteractive.com/2009/02/actionscript-basics-terms-defined/#comments</comments>
		<pubDate>Tue, 10 Feb 2009 16:26:47 +0000</pubDate>
		<dc:creator>Erin Pierce</dc:creator>
				<category><![CDATA[develop]]></category>
		<category><![CDATA[teaching]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[actionscript 3.0]]></category>
		<category><![CDATA[adobe flash]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[simple actionscript 3.0 tutorial]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.erinpierce.com/?p=101</guid>
		<description><![CDATA[Terms, defined
There are some terms, some of which we have covered, that will be useful to have a general and basic understanding of.

Instances &#38; Instance Names
When we create symbols, existing in the Library and drag them onto the stage, we create an instance of that symbol. If we will be referencing an instance in our [...]]]></description>
			<content:encoded><![CDATA[<h3>Terms, defined</h3>
<p>There are some terms, some of which we have covered, that will be useful to have a general and basic understanding of.</p>
<ol>
<li><strong>Instances &amp; Instance Names</strong><br />
When we create symbols, existing in the Library and drag them onto the stage, we create an <em>instance</em> of that symbol. If we will be referencing an instance in our ActionScript, we must name that instance. You name your instances in the Properties Panel.<br />
<img class="alignnone size-full wp-image-35" title="picture-1" src="http://www.erinpierce.com/teaching/4210/wp-content/uploads/2009/02/picture-1.png" alt="picture-1" width="489" height="499" /></li>
<li><strong>Statements</strong><br />
A statement is like a sentence only rather than the expression ending with a period it ends with a semi-colon (&quot;;&quot;). Example:<br />
<code>var theDog;</code></li>
<li><strong>Variables &amp; Data Types</strong><br />
Variables are containers; they are vessels used to store various bits of information. There are many types of data. Here are a few:</p>
<p><strong>Number</strong><br />
These can be positive, negative, integer or decimal (floating point) numbers.</p>
<p><code>var myAge:Number = 52;</code></p>
<p><code>//comments are indicated by using two slashes ... these are good to use. they will help you remember what a line of code means</code></p>
<p><code>/*<br />
if you will be writing extra, you<br />
can use a slash + a star and that will<br />
give you the ability to comment a longer<br />
description or block of code<br />
<br />*/</code></p>
<p><strong>Boolean (true/false)</strong><br />
<code>var myStatement:Boolean = false;</code></p>
<p><strong>String</strong><br />
<code>var myName:String = &quot;Bob Saget&quot;; // set value of the myName variable equal to Bob Saget</code></p>
<blockquote><p>NOTE: The way in which data is stored is very important. For example, these are not equal:</p>
<p><code><br />
var myAge:Number = 52;<br />
var myAge:String = &quot;52&quot;;<br />
</code></p></blockquote>
</li>
<li><strong>Functions</strong><br />
Functions allow for reusing a block of code.</p>
<p><code>function myFirstFunction() {</code><br />
<code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;trace(&quot;hello&quot;);</code><br />
<code>};</code><br />
<code>myFirstFunction();</code></p>
<p>Many functions are built into Flash. <code>trace();</code> <code>stop();</code> and <code>gotoAndPlay();</code> are three of the most common.</li>
<li><strong>If Statements</strong>
<p>An if statement is a conditional statement&#8230;if you&#8217;ve ever taken a logic class, these are similar type statements&#8230;<br />
First, write out what you&#8217;d like to check:</p>
<p><code>// if the x property of the dog movie clip is equal to 50, then trace &quot;x equals 50&quot;</p>
<p></code><br />
<code>if (dog_mc.x == 50) {</code><br />
<code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;trace(&quot;x equals 50&quot;);</code><br />
<code>}</code></p>
<p>You can also have it do something else if the condition is not true using if / else statement.</p>
<p><code>// if the x property of the dog movie clip is equal to 50, then trace &quot;x equals 50&quot;, otherwise, trace &quot;x does not equal 50&quot;</p>
<p></code><br />
<code>if (dog_mc.x == 50) {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;trace(&quot;x equals 50&quot;);<br />
} else {<br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;trace(&quot;x does not equal 50&quot;);<br />
}</code></li>
<li><b>Operators</b><br />
The double equal sign (==) in our if statement is called an Operator. Operators tell the statement how to compare the two variables. Here are some other operators and their descriptions:</p>
<table cellpadding=&quot;3&quot;>
<tr bgcolor=&quot;#EEEEEE&quot;>
<td width=&quot;114&quot;><strong>Operator</strong></td>
<td width=&quot;244&quot;><strong>Description</strong></td>
</tr>
<tr>
<td>==</td>
<td>equals</td>
</tr>
<tr bgcolor=&quot;#EEEEEE&quot;>
<td>!=</td>
<td>does not equal</td>
</tr>
<tr>
<td>></td>
<td>greater than</td>
</tr>
<tr bgcolor=&quot;#EEEEEE&quot;>
<td>>=</td>
<td>greater than or equal to</td>
</tr>
<tr>
<td>< </td>
</td>
<td>less than</td>
</tr>
<tr bgcolor=&quot;#EEEEEE&quot;>
<td>< =</td>
</td>
<td>less than or equal to</td>
</tr>
<tr>
<td>&amp;&amp;</td>
<td>and*</td>
</tr>
<tr bgcolor=&quot;#EEEEEE&quot;>
<td>||</td>
<td>or*</td>
</tr>
</table>
<p>*Here are examples of how you would use the &amp;&amp; and || operators:</p>
<p><strong>AND Operator: &amp;&amp;</strong><br />
<code>// if the x property of dog mc is equal to 50 AND the y property is equal to 50, trace &quot;x and y equal 50&quot;</code></p>
<p><code>if ( (dog_mc.x == 50) &#038;&#038; (dog_mc.y == 50) ) {</code><br />
<code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;trace(&quot;x and y equal 50&quot;);</code><br />
<code>}</code></p>
<p><strong>OR Operator: ||</strong><br />
<code>// if the x property of dog mc is equal to 50 OR the x property is equal to 100, trace &quot;x equals 50 or 100&quot;</code></p>
<p><code>if ( (dog_mc.x == 50) || (dog_mc.x == 100) ) {</code><br />
<code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;trace(&quot;x equals 50 or 100&quot;);</code><br />
<code>}</code>
</li>
<li><b>Loops</b><br />
Loops are used to execute a specific set of items a specific amount of times. There are several types of loops, the most common of which is the For loop. </p>
<p><code>for ( var i:Number = 1; i < = 10; i++ ) {</code><br />
</code><code>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;trace(i);</code><br />
<code>}</code></p>
<p>The first item in the for loop is establishing the counter. We have to declare the variable (<code>var i</code>), the variable type (<code>:Number</code>) and give it a value (<code> = 1;)</code>. This will be the beginning or starting value of the counter.</p>
<p>Next we need to establish the condition. How many times does the for loop need to run? So we state the the variable <code>i</code> is less than or equal to 10.</p>
<p>The final piece in the for loop is the action. This tells the loop whether to increase (<code>i++</code>) or decrease (<code>i--</code>). Most often you will only need to increase.</p>
<p>Try changing the initial counter number, the final number or the action&#8230;see what happens!
</li>
</ol>
<h3>Resources</h3>
<p><a href="http://www.flashperfection.com/tutorials/Variables-Data-Types-Classes-Properties-And-Methods-In-AS3-19996.html" target="_blank">Variables &amp; Data Types</a><br />
<a href="http://www.flashperfection.com/tutorials/Using-Functions-in-ActionScript-3.0-91749.html" target="_blank">Functions</a><br />
<a href="http://www.flashperfection.com/tutorials/Using-Loops-in-AS3-26532.html" target="_blank">For Loops</a><br />
<a href="http://www.gotoandlearn.com/" target="_blank">General tutorials</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.pixologyinteractive.com/2009/02/actionscript-basics-terms-defined/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
