<?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>ActionScript Archives - Pritam&#039;s Blog</title>
	<atom:link href="https://www.pritambaldota.com/category/actionscript/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.pritambaldota.com/category/actionscript/</link>
	<description>cloud technology, enterprise architecture</description>
	<lastBuildDate>Sat, 10 Oct 2009 09:36:18 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8</generator>
	<item>
		<title>ActionScript for Designers Part 1- Basics of ActionScript</title>
		<link>https://www.pritambaldota.com/actionscript-for-designers-part-1-basics-of-actionscript/</link>
					<comments>https://www.pritambaldota.com/actionscript-for-designers-part-1-basics-of-actionscript/#respond</comments>
		
		<dc:creator><![CDATA[Pritam Baldota]]></dc:creator>
		<pubDate>Sat, 10 Oct 2009 09:36:18 +0000</pubDate>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Articles]]></category>
		<category><![CDATA[Flash]]></category>
		<guid isPermaLink="false">http://www.pritambaldota.com/?p=23</guid>

					<description><![CDATA[<p>Hi Guys, Generally Flash comes with two meanings &#8211; 1) Flash for Designer &#38; 2) Flash for Developers (ActionScript). Designer alwaysÂ threaten about ActionScripting. It is&#8230;</p>
<p>The post <a href="https://www.pritambaldota.com/actionscript-for-designers-part-1-basics-of-actionscript/">ActionScript for Designers Part 1- Basics of ActionScript</a> appeared first on <a href="https://www.pritambaldota.com">Pritam&#039;s Blog</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>Hi Guys,</p>
<p>Generally Flash comes with two meanings &#8211; 1) Flash for Designer &amp; 2) Flash for Developers (ActionScript). Designer alwaysÂ threaten about ActionScripting. It is not that complicated at basic level where Designer can levarage the benefits of ActionScripting to their Creative Work without having Programming knowledge.</p>
<p>If you already know the Flash, using tools and creating animations, you may want to add some interactivity to your skills.</p>
<p>Actionscript is written as a series of statements within a Flash movie, and is placed either in a frame or in an external class file. In the Flash intro class, we also put actionscript on buttons and movieclips, but that was done for the sake of easier learning.</p>
<p>ActionScript, an object oriented programming (OOP) language builtÂ for Flash/Flex developement. There are versions of actionscript like Flash (7/8/ cs2 etc..), these are ActionScript 1.0, 1.1, 2.0, 3.0.Â  Based on the Flash version, adobe provides default scripting version which is located at <strong>Publish Settings</strong> in Flash IDE (Integrated Development Environment).</p>
<p><strong><span style="text-decoration: underline;"><span style="color: #000080;">Â 1. TRACE</span></span></strong></p>
<p>Trace function allows you to print information to your output window in Flash. This is not visible to those who view the SWF on the web. Trace is especially useful for debugging, if something goes wrong and you want to figure out why. You can trace simple text or the contents of variables.</p>
<p><strong>trace(â€Text or variables can go hereâ€);</strong></p>
<p><strong><span style="color: #000080;"><span style="text-decoration: underline;">2. FUNCTIONS</span></span></strong></p>
<p>Functions are basically reusable chunks of code that you donâ€<img src="https://s.w.org/images/core/emoji/15.1.0/72x72/2122.png" alt="™" class="wp-smiley" style="height: 1em; max-height: 1em;" />t want to rewrite over and over again.Â  It saves your coding time and add scalability layer to your code.</p>
<p><span style="color: #0000ff;">function</span> myFuncationName(inputValue)<br />
{<br />
Â trace(inputValue);<br />
}</p>
<p><strong><span style="color: #000080;"><span style="text-decoration: underline;">3. TIMELINES</span></span></strong></p>
<p>Flash Timeline refers to the sequence of frames and keyframes in either a movieclip or on the Stage or main movie. The stage&#8217;s timeline can be treated in actionscript as an instance of a movieclip. It is represented either as <strong>_root</strong> (from any timeline in the movie which is deeply nested to N-level), or as <strong>_parent</strong> from a movieclip placedÂ onÂ main timeline frames. It is often referred to as the main timeline.</p>
<p><span style="text-decoration: underline;"><span style="color: #000080;"><strong>Â </strong></span></span></p>
<p><span style="text-decoration: underline;"><span style="color: #000080;"><strong>5. PLAYHEAD CONTROL</strong></span></span></p>
<p>Using simple playhead control, you can take control of your timeline. A lot of animations you can place on timeline which can be easily played using playhead functions. These include:</p>
<div><span style="color: #0000ff;">gotoAndStop<span style="color: #000000;">(frameVariable);</span></span></div>
<div><span style="color: #0000ff;">gotoAndPlay</span>Â <span style="color: #0000ff;"><span style="color: #000000;">(frameVariable);</span></span></div>
<div><span style="color: #0000ff;"><span style="color: #0000ff;">stop();</span></span></div>
<div><span style="color: #000000;">Â </span></div>
<div><span style="color: #000000;">Â </span></div>
<div><span style="color: #000000;">Â </span><strong><span style="text-decoration: underline;"><span style="color: #000080;">6. ASSIGNING ATTRIBUTES</span></span></strong></div>
<p><strong>Â </strong><strong>Â </strong></p>
<p>Assigning attributes allows you to dynamically store or update items in your variables(Container) using Actionscript. This includes visibily, scale, alpha, position etc&#8230; Some examples:</p>
<p>myMovieClip_mc<span style="color: #0000ff;">._visible</span>=false;<br />
myMovieClip_mc.<span style="color: #0000ff;"> _alpha</span>=35;<br />
myMovieClip_mc<span style="color: #0000ff;">._x</span>=50;<br />
myMovieClip_mc.<span style="color: #0000ff;">_y</span>=50;</p>
<p><strong><span style="text-decoration: underline;"><span style="color: #003366;">7. IF STATEMENTS</span></span></strong></p>
<p><strong>Â </strong><br />
<span style="color: #0000ff;">if</span> statements are used to take decisions inside code. It is straightforward.<br />
<span style="color: #0000ff;">if</span> (myVariable==myOtherVariable)<br />
{<br />
trace(myVariable);<br />
}<br />
<strong>for e.g.</strong><br />
<span style="color: #0000ff;">if</span>(mc_MyMovieCliep<span style="color: #0000ff;">._alpha</span>==50)<br />
{<br />
Â Â  <span style="color: #0000ff;">trace</span>(&#8220;Alpha is 50&#8221;);<br />
Â Â  //do something<br />
}<br />
else<br />
{<br />
Â //do alternative<br />
}</p>
<p><strong><span style="text-decoration: underline;"><span style="color: #000080;">8. FOR LOOP &amp; WHILE LOOP</span></span></strong></p>
<p><strong><span style="text-decoration: underline;"></span></strong><br />
Loops are used to perform specific tasks to certain number of times or until a condition satifies. There are two kind of loops &#8211; FOR loop, &amp; WHILE loop.<br />
for (var startCounter=0; startCounter&lt;5; startCounter++)<br />
{<br />
trace(startCounter);<br />
}</p>
<p>var startCounter=0;<br />
while (startCounter != 10)<br />
{<br />
trace(&#8220;Count &#8220;+ startCounter);<br />
startCounter++;<br />
}</p>
<p><strong><span style="text-decoration: underline;"><span style="color: #000080;">9. BUTTONS</span></span></strong></p>
<p>ButtonsÂ can be used to control movies.Â To accomplish this, you need to attach action to the button or movie clip with theÂ on() function. You could write actions in the Timeline using event handler functions with instance names of button or movie clips or you can write actions on button or movie clips, for this you need to select button or movie clip and Press F9 to open Action window.<br />
<span style="color: #0000ff;">on</span>(<span style="color: #000080;">release</span>)<br />
{<br />
Â mc_myMovieClip<span style="color: #0000ff;">._visible</span>=false;<br />
}</p>
<p>Â </p>
<p>Hope you like this tutorials. I am working on it to proceed further with more detailed one.</p>
<p>Happy Coding <img src="https://s.w.org/images/core/emoji/15.1.0/72x72/1f642.png" alt="🙂" class="wp-smiley" style="height: 1em; max-height: 1em;" /></p>
<p>The post <a href="https://www.pritambaldota.com/actionscript-for-designers-part-1-basics-of-actionscript/">ActionScript for Designers Part 1- Basics of ActionScript</a> appeared first on <a href="https://www.pritambaldota.com">Pritam&#039;s Blog</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.pritambaldota.com/actionscript-for-designers-part-1-basics-of-actionscript/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
