<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<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/"
	>

<channel>
	<title>as3 &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://wordpress.com/tag/as3/</link>
	<description>Feed of posts on WordPress.com tagged "as3"</description>
	<pubDate>Wed, 09 Jul 2008 06:05:42 +0000</pubDate>

	<generator>http://wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[AS3 Cannon Game, pt.1]]></title>
<link>http://gwynmakesgames.wordpress.com/?p=9</link>
<pubDate>Wed, 09 Jul 2008 00:00:41 +0000</pubDate>
<dc:creator>gwyn</dc:creator>
<guid>http://gwynmakesgames.wordpress.com/?p=9</guid>
<description><![CDATA[As I mentioned in an earlier post, this is as much a learning exercise for me as it is a teaching on]]></description>
<content:encoded><![CDATA[<p>As I mentioned in an earlier post, this is as much a learning exercise for me as it is a teaching one. I'm currently working on a complete game that I will then turn into a series of tutorials, but in the mean time my mind occasionally wanders and I end up experimenting with some little ideas that pop into my head, usually in the shower or while I'm commuting to and from my workplace. One of these ideas is a simple static shooting game, with a rotating cannon that you use to defend yourself against hordes of enemies,  on which I'm going to base this small series of tutorials.</p>
<p><!--more--></p>
<p>There's nothing spectacular or ground-breaking about this game concept, but it's pretty good for teaching some of the techniques needed for games, such as motion based on angle of rotation (using trigonometry) and managing multiple game objects (enemies, bullets, etc.). Also, the idea in my head has a little twist to it that makes things a little more interesting, but I'll get on to that in a future article.</p>
<p>For now, I'll just show you how to get the cannon rotating using the arrow keys. I always find it best to start with something simple so that you can build up some momentum. Let's start by creating some graphics and turning them into movieclip symbols- a base and a barrel for the cannon. Put the registration point of the barrel on the point that you want it to rotate around, then combine the two of them together into a 'cannon' movieclip.</p>
[wp_caption id="attachment_10" align="aligncenter" width="300" caption="The movieclips used to make the cannon"]<a href="http://gwynmakesgames.files.wordpress.com/2008/07/cannon_library.png"><img src="http://gwynmakesgames.wordpress.com/files/2008/07/cannon_library.png?w=300" alt="The movieclips used to make the cannon" width="300" height="235" class="size-medium wp-image-10" /></a>[/wp_caption]
<p>Inside the cannon movieclip, give the base and barrel instance names - 'base' and 'barrel'. We want the instances in the cannon movieclip to be centred on the registration point, so make sure to enter 0 for both the x and y properties of the instances.</p>
[wp_caption id="attachment_11" align="aligncenter" width="300" caption="Instance name and position of barrel"]<a href="http://gwynmakesgames.files.wordpress.com/2008/07/barrel_instance.png"><img src="http://gwynmakesgames.wordpress.com/files/2008/07/barrel_instance.png?w=300" alt="Instance name and position of barrel" width="300" height="134" class="size-medium wp-image-11" /></a>[/wp_caption]
<p>Drag an instance of the cannon movieclip onto the stage and give it the instance name 'cannon'. Put it wherever you like, maybe in the centre of the stage. You could also add a tint to it like mine (see below).</p>
[wp_caption id="attachment_12" align="aligncenter" width="300" caption="Cannon object with tinting"]<a href="http://gwynmakesgames.files.wordpress.com/2008/07/cannon_tint.png"><img src="http://gwynmakesgames.wordpress.com/files/2008/07/cannon_tint.png?w=300" alt="Cannon object with tinting" width="300" height="96" class="size-medium wp-image-12" /></a>[/wp_caption]
<p>That concludes the graphics side of things, next we need to get our hands dirty with the code. Select the first frame of the main timeline and bring up the Actions panel (F9). Here is the code that we will use to get started, just copy and paste it in and I'll explain what's happening:</p>
<p>[sourcecode language='csharp']<br />
var turningCW:Boolean = false;<br />
var turningCCW:Boolean = false;<br />
var turningSpeed:uint = 1;</p>
<p>stage.addEventListener(KeyboardEvent.KEY_DOWN, keyIsDown);<br />
stage.addEventListener(KeyboardEvent.KEY_UP, keyIsUp);<br />
stage.addEventListener(Event.ENTER_FRAME, runGame);</p>
<p>function keyIsDown(event:KeyboardEvent):void<br />
{<br />
	if(event.keyCode == Keyboard.LEFT){ turningCCW = true; }<br />
	if(event.keyCode == Keyboard.RIGHT){ turningCW = true; }<br />
	if(event.keyCode == Keyboard.UP){ turningSpeed = 4; }<br />
}</p>
<p>function keyIsUp(event:KeyboardEvent):void<br />
{<br />
	if(event.keyCode == Keyboard.LEFT){ turningCCW = false; }<br />
	if(event.keyCode == Keyboard.RIGHT){ turningCW = false; }<br />
	if(event.keyCode == Keyboard.UP){ turningSpeed = 1; }<br />
}</p>
<p>function runGame (event:Event):void<br />
{<br />
	if(turningCCW) { cannon.barrel.rotation -= turningSpeed; }<br />
	if(turningCW) { cannon.barrel.rotation += turningSpeed; }<br />
}<br />
[/sourcecode]</p>
<p>The code is pretty self explanatory. First, we initialise some variables, booleans for applying the rotation clockwise or anti-clockwise and a speed variable to control the rate of the turn. Next we setup our event listeners, to keep track of the keyboard and to update the cannon's rotation every frame.</p>
<p>In the keyIsDown function, called when a key is held down, we change the variables depending on what key is pressed. Effectively, we are activating a set of switches that the main game loop will use to decide how to rotate the cannon barrel. The keyIsUp function basically undoes whatever changes were made to those variables when the keys are released.</p>
<p>Finally, the runGame function gets called every frame and updates the rotation of the cannon barrel. If you are pressing left, it subtracts the speed from the rotation. If you are pressing right, it adds the speed to the rotation. If you are pressing both at the same time they will cancel each other out. Also, the up arrow can be used as a modifier to increase the turning speed.</p>
<p>The code really isn't that complicated, but it achieves the effect we are looking for. You can see my finished example <a href="http://www.swfpages.com/view/109267.htm">here</a>. Coming up next we'll try some slightly more complex approaches, like applying acceleration and friction to the rotation or rotating based on the mouse position. After that, we'll have a go at firing some bullets and blowing up some enemies.</p>
<p>I hope you've enjoyed this little tutorial and found it useful in some way. Remember, I'm a learner as much as I am a teacher. If you see anything in my tutorials that could be done better, please leave a comment to help me and anyone else reading this.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Tutorials | Adobe Flash Tutorials Roundup]]></title>
<link>http://flashenabled.wordpress.com/?p=1782</link>
<pubDate>Tue, 08 Jul 2008 17:44:11 +0000</pubDate>
<dc:creator>Carlos Pinho</dc:creator>
<guid>http://flashenabled.wordpress.com/?p=1782</guid>
<description><![CDATA[Flash still to be the best platform to deliver multimedia content in the WEB. With the new Actionscr]]></description>
<content:encoded><![CDATA[<p>Flash still to be the best platform to deliver multimedia content in the WEB. With the new Actionscript 3.0 many things have changed from the syntax to the new available classes, or the new support native 3D in Flash Player 10. This article show us some tutorials covering these new changes.</p>
[wp_caption id="attachment_1783" align="alignnone" width="385" caption="Create a AS3 MP3 Player with papervision3d spectrum display"]<a href="http://www.thetechlabs.com/3d/create-a-as3-mp3-player-with-papervision3d-spectrum-display/"><img class="size-full wp-image-1783" src="http://flashenabled.wordpress.com/files/2008/07/pv3d-sound-spectrum.jpg" alt="Create a AS3 MP3 Player with papervision3d spectrum display" width="385" height="156" /></a>[/wp_caption]
<p><!--more--></p>
[wp_caption id="attachment_1789" align="alignnone" width="385" caption="Creating a Slideshow with AS3"]<a href="http://blog.richnetapps.com/index.php/tutorial-as3-slideshow"><img class="size-full wp-image-1789" src="http://flashenabled.wordpress.com/files/2008/07/creating-a-slideshow-with-as3.jpg" alt="Creating a Slideshow with AS3" width="385" height="162" /></a>[/wp_caption]
[wp_caption id="attachment_1784" align="alignnone" width="385" caption="Card Flip Effect Flash Player 10"]<a href="http://www.thetechlabs.com/flash/create-a-card-flip-effect-for-flash-player-10-using-actionscript-3/"><img class="size-full wp-image-1784" src="http://flashenabled.wordpress.com/files/2008/07/card-flip-effect-flash-player-10.jpg" alt="Card Flip Effect Flash Player 10" width="385" height="159" /></a>[/wp_caption]
[wp_caption id="attachment_1785" align="alignnone" width="385" caption="Creating ActionScript 3 components in Flash"]<a href="http://www.adobe.com/devnet/flash/articles/creating_as3_components.html"><img class="size-full wp-image-1785" src="http://flashenabled.wordpress.com/files/2008/07/creating-actionscript-3-components-in-flash.jpg" alt="Creating ActionScript 3 components in Flash" width="385" height="166" /></a>[/wp_caption]
[wp_caption id="attachment_1787" align="alignnone" width="385" caption="Build A Basic Site Using AS3 in Flash"]<a href="http://library.creativecow.net/articles/ross_tony/AS3_colors_site/video-tutorial.php"><img class="size-full wp-image-1787" src="http://flashenabled.wordpress.com/files/2008/07/build-a-basic-site-using-as3-in-flash.jpg" alt="Build A Basic Site Using AS3 in Flash" width="385" height="153" /></a>[/wp_caption]
[wp_caption id="attachment_1788" align="alignnone" width="385" caption="ActionScript 3 XML Basics"]<a href="http://gotoandlearn.com/player.php?id=64"><img class="size-full wp-image-1788" src="http://flashenabled.wordpress.com/files/2008/07/actionscript-3-xml-basics.jpg" alt="ActionScript 3 XML Basics" width="385" height="152" /></a>[/wp_caption]
]]></content:encoded>
</item>
<item>
<title><![CDATA[CS3 and Web 2.0 Icon Generator on Adobe AIR]]></title>
<link>http://saravananrk.wordpress.com/?p=77</link>
<pubDate>Tue, 08 Jul 2008 02:56:28 +0000</pubDate>
<dc:creator>Saran</dc:creator>
<guid>http://saravananrk.wordpress.com/?p=77</guid>
<description><![CDATA[I came across this cool little application built on AIR that lets you generate a CS3 or Web 2.0 styl]]></description>
<content:encoded><![CDATA[<p>I came across <a href="http://clockmaker.jp/labs/air_icon/" target="_blank">this cool little application</a> built on AIR that lets you generate a CS3 or Web 2.0 style icon. They seem to have gotten the fonts correct so you can pick your color, type in a couple of characters, and have your very own icon. And of course when you save it the application uses the file APIs to write 4 different sizes of the icon for you. Perfect for an application.xml file.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Efectos de Animación - Tutorial para sistemas de partículas en ActionScript3 (AS3)]]></title>
<link>http://shiftf12.wordpress.com/?p=147</link>
<pubDate>Mon, 07 Jul 2008 17:53:07 +0000</pubDate>
<dc:creator>elhector</dc:creator>
<guid>http://shiftf12.wordpress.com/?p=147</guid>
<description><![CDATA[Hace tiempo escribí un post que menciona los sistemas de partículas de Seb Lee-Delisle y que los t]]></description>
<content:encoded><![CDATA[<p>Hace tiempo escribí un <a href="http://shiftf12.net/2008/06/05/recursos-efectos-de-particulas-en-actionscript-3/">post </a>que menciona los sistemas de partículas de Seb Lee-Delisle y que los teníamos a nuestra disposición (así es, <a href="http://www.sebleedelisle.com/?p=126">el autor los está compartiendo gratis!</a>).</p>
<p>Este fin de semana me tope con algo aún mejor!... Esa librería de sistema de partículas fue utilizada durante una plática en un congreso en la que Seb Lee-Delisle explicaba desde lo básico hasta lo complejo de cómo hacer partículas en ActionScript3...<strong> <a href="http://movielibrary.lynda.com/html/modPage.asp?ID=557">Y aquí encontré los videos de esa plática!!!... </a></strong></p>
<p>Y para rematar:<a href="http://www.computerarts.co.uk/tutorials/new_media/cool_particle_effects_in_flash"> <strong>Un tutorial</strong></a> (con código fuente incluido) POCA MADRE del mismo autor estrito para la revista <strong><a href="http://www.computerarts.co.uk/">Computer Arts. </a></strong></p>
<p><a href="http://www.computerarts.co.uk/tutorials/new_media/cool_particle_effects_in_flash"><img class="aligncenter size-medium wp-image-149" src="http://shiftf12.wordpress.com/files/2008/07/seblee_tut.jpg?w=300" alt="" width="324" height="216" /></a></p>
<p>Así que... ¿Qué mas quieres?... Tienes, del mismo autor, <a href="http://www.sebleedelisle.com/?p=126">la librería</a> de sistemas de partículas, el <a href="http://movielibrary.lynda.com/html/modPage.asp?ID=557">video que explica</a> cómo hacer partículas, y el <a href="http://www.computerarts.co.uk/tutorials/new_media/cool_particle_effects_in_flash">pdf que refuerza y documenta</a> la explicación. :-)</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Loading assets in AS3 and Flash]]></title>
<link>http://michaelangela.wordpress.com/2008/07/05/loading-assets-in-as3-and-flash/</link>
<pubDate>Sat, 05 Jul 2008 20:39:34 +0000</pubDate>
<dc:creator>michaelangela</dc:creator>
<guid>http://michaelangela.wordpress.com/2008/07/05/loading-assets-in-as3-and-flash/</guid>
<description><![CDATA[Loading up assets can be a pain to track so this set of code aims to simplify that. Need to check it]]></description>
<content:encoded><![CDATA[<p>Loading up assets can be a pain to track so this set of code aims to simplify that. Need to check it out later though.</p>
<p><a href="http://www.ayanray.com/blog/series/flash_world/asset_loader_class">AYAN RAY &#124; AS3 / Flash: Introducing the AssetLoader Class</a><br />
<blockquote>In Actionscript 3, there are many different ways to load external assets from the Internet. Unfortunately, this can become tiresome to find different ways to load each one in it's own individual way. With this problem in mind, I have created the AssetLoader class.</p></blockquote>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Animated Skins in Flex]]></title>
<link>http://michaelangela.wordpress.com/2008/07/05/animated-skins-in-flex/</link>
<pubDate>Sat, 05 Jul 2008 20:38:28 +0000</pubDate>
<dc:creator>michaelangela</dc:creator>
<guid>http://michaelangela.wordpress.com/2008/07/05/animated-skins-in-flex/</guid>
<description><![CDATA[Very neat. Very cool. You have to check it out if only to see dancing Gingerbread men in Flex&#8230;]]></description>
<content:encoded><![CDATA[<p>Very neat. Very cool. You have to check it out if only to see dancing Gingerbread men in Flex... :-P</p>
<p><a href="http://www.tink.ws/blog/seemless-animated-skins-in-flex/">Tink » Blog Archive » Seamless Animated Skins in Flex</a><br />
<blockquote>
<p>In <a href="http://www.person13.com/wordpress/">Joey Lotts</a> session on styling Flex at <a href="http://www.flashonthebeach.com/">FOTB</a> (where he did a great job), one of the attendees asked about animated skins.</p>
<p>There’s<br />
obviously many ways to approach this but I thought I’d do an example of<br />
how you can have seamless transitions between these states using frame<br />
labels inside the symbol in Flash, and by adding code using<br />
addFrameScript().</p>
</blockquote>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Flash CS3 Open Source "Liquid Components" by Byte Array]]></title>
<link>http://michaelangela.wordpress.com/2008/07/05/flash-cs3-open-source-liquid-components-by-byte-array/</link>
<pubDate>Sat, 05 Jul 2008 20:37:10 +0000</pubDate>
<dc:creator>michaelangela</dc:creator>
<guid>http://michaelangela.wordpress.com/2008/07/05/flash-cs3-open-source-liquid-components-by-byte-array/</guid>
<description><![CDATA[I am just about to wrap up a project using Flash CS3 and&#8230; I wish I saw this earlier&#8230;  
L]]></description>
<content:encoded><![CDATA[<p>I am just about to wrap up a project using Flash CS3 and... I wish I saw this earlier... :-)</p>
<p><a href="http://www.bytearray.org/?p=109">Liquid Components for Flash CS3 <font size="1">[ by Didier Brun ]</font> &#60; ByteArray.org</a><br />
<blockquote>The “Liquid Components” have been created for the Flash people, freelance coders and designers who wish to integrate fully skinnable components in their website, games or little RIA applications.</p></blockquote>
]]></content:encoded>
</item>
<item>
<title><![CDATA[AS3 URL class]]></title>
<link>http://michaelangela.wordpress.com/2008/07/05/as3-url-class/</link>
<pubDate>Sat, 05 Jul 2008 20:35:37 +0000</pubDate>
<dc:creator>michaelangela</dc:creator>
<guid>http://michaelangela.wordpress.com/2008/07/05/as3-url-class/</guid>
<description><![CDATA[Not having access to the mx URL utils with Flash (though I haven&#8217;t looked at the possibility j]]></description>
<content:encoded><![CDATA[<p>Not having access to the mx URL utils with Flash (though I haven't looked at the possibility just yet) I found this. Could be quite helpful!</p>
<p><a href="http://manfred.dschini.org/2008/05/12/as3-url-class/">AS3 - URL Class &#124; Manfred Weber`s Weblog</a><br />
<blockquote>I could not find it in the net so I hacked something together quickly. A simple URL class that parses an url string.</p></blockquote>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Problems using navigateToURL]]></title>
<link>http://michaelangela.wordpress.com/2008/07/05/problems-using-navigatetourl/</link>
<pubDate>Sat, 05 Jul 2008 20:34:03 +0000</pubDate>
<dc:creator>michaelangela</dc:creator>
<guid>http://michaelangela.wordpress.com/2008/07/05/problems-using-navigatetourl/</guid>
<description><![CDATA[Was just dealing with this&#8230; must check out!
Problems using navigateToURL - aron / philipp deve]]></description>
<content:encoded><![CDATA[<p>Was just dealing with this... must check out!</p>
<p><a href="http://apdevblog.com/problems-using-navigatetourl/">Problems using navigateToURL - aron / philipp development blog</a><br />
<blockquote>
<p>Hi there... we've been busy these past couple of days so there<br />
wasn't much time for new posts - sorry. But here is a little update.<br />
While developing a flash website (AS3 &#38; <a title="SWFObject" href="http://code.google.com/p/swfobject/" target="_blank">SWFObject2.0</a>)<br />
that heavily depended on opening URLs in a new browser window we came<br />
across the popup blocker problem that the use of navigateToURL causes.<br />
When trying to open a new window firefox'/IE's popup blocker will block<br />
the window and display its warning. After googling for some time we<br />
came across some neat workarounds:</p>
<p>1) <a title="Prevent popups" href="http://skovalyov.blogspot.com/2007/01/how-to-prevent-pop-up-blocking-in.html" target="_blank">How to prevent pop-up blocking in Firefox by Sergey Kovalyov</a></p>
<p>2) <a title="nightmare _blank" href="http://thesaj.wordpress.com/2008/02/12/the-nightmare-that-is-_blank-part-ii-help/" target="_blank">The Nightmare that is "_blank": Part II (resolved???) by The Saj</a></p>
<p>putting these two approaches into one AS3 util-class, this is what we came up with:</p>
</blockquote>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Actionscript 3 Excel library]]></title>
<link>http://michaelangela.wordpress.com/2008/07/05/actionscript-3-excel-library/</link>
<pubDate>Sat, 05 Jul 2008 20:31:17 +0000</pubDate>
<dc:creator>michaelangela</dc:creator>
<guid>http://michaelangela.wordpress.com/2008/07/05/actionscript-3-excel-library/</guid>
<description><![CDATA[Adobe - Flex Extension
An Actionscript 3 library for reading and writing Excel files. Currently read]]></description>
<content:encoded><![CDATA[<p><a href="http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&#38;extid=1375018">Adobe - Flex Extension</a><br />
<blockquote>An Actionscript 3 library for reading and writing Excel files. Currently reading numbers, text, and formulas from Excel version 2.0-2003 and writing numbers, text, and dates to Excel 2.0 is supported. No server-side help is needed.</p></blockquote>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Howto: Add Basic Authentication Header to HTTPService]]></title>
<link>http://geekzguru.wordpress.com/?p=51</link>
<pubDate>Fri, 04 Jul 2008 11:14:28 +0000</pubDate>
<dc:creator>Mayank</dc:creator>
<guid>http://geekzguru.wordpress.com/?p=51</guid>
<description><![CDATA[HTTPService in flex supports addition of headers as required. Follow the steps below to add authetic]]></description>
<content:encoded><![CDATA[<p>HTTPService in flex supports addition of headers as required. Follow the steps below to add authetication headers to your HTTPService when accessing a service protected by basic authentication.</p>
<pre>
&#60;mx:Script&#62;
    &#60;![CDATA[
        import mx.utils.Base64Encoder;
        import mx.controls.Alert;

        private var baseUrl:String = "http://phprestsql.sourceforge.net/tutorial/user";
        private var auth:String = "p126371rw:demo";

        private function init():void{
            var encoder : Base64Encoder = new Base64Encoder();
            encoder.encode(auth);
            userService.headers["Authorization"] = "Basic " + encoder.toString();
            deleteUser();
        }
    ]]&#62;
&#60;/mx:Script&#62;
</pre>
<p>Enjoyyy!!!</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Source | Bitmap / Vector into firefly particles AS3.0]]></title>
<link>http://flashenabled.wordpress.com/?p=1726</link>
<pubDate>Thu, 03 Jul 2008 19:43:16 +0000</pubDate>
<dc:creator>Carlos Pinho</dc:creator>
<guid>http://flashenabled.wordpress.com/?p=1726</guid>
<description><![CDATA[A cool experiment with source to a AS3 class that breaks up vectors/bitmaps into particles and then ]]></description>
<content:encoded><![CDATA[<p>A cool experiment with source to a AS3 class that breaks up vectors/bitmaps into particles and then moves them around in a semi-random firefly pattern.</p>
[wp_caption id="attachment_1727" align="alignnone" width="400" caption="Vector into FireFly Particles AS3.0"]<a href="http://www.erikhallander.com/blog/2008/bitmapvector-into-firefly-particles-as30.html"><img class="size-full wp-image-1727" src="http://flashenabled.wordpress.com/files/2008/07/vector-into-firefly-particles-as3.jpg" alt="Vector into FireFly Particles AS3.0" width="400" height="160" /></a>[/wp_caption]
]]></content:encoded>
</item>
<item>
<title><![CDATA[Source | 3D Bend and Twist modifier for PaperVision3D]]></title>
<link>http://flashenabled.wordpress.com/?p=1721</link>
<pubDate>Thu, 03 Jul 2008 19:15:37 +0000</pubDate>
<dc:creator>Carlos Pinho</dc:creator>
<guid>http://flashenabled.wordpress.com/?p=1721</guid>
<description><![CDATA[Two great examples with source files of Twist and Bend modifiers for the PaperVision3D 2.0



Bend M]]></description>
<content:encoded><![CDATA[<p>Two great examples with source files of Twist and Bend modifiers for the PaperVision3D 2.0</p>
<div class="mceTemp">
<dl>
<dt><a href="http://www.everydayflash.com/blog/index.php/2008/06/11/bending-modifier-papervision3d/"><img class="size-full wp-image-1722 null null" src="http://flashenabled.wordpress.com/files/2008/07/bending-modifier-for-papervision3d.jpg" alt="Bend Modifier for PV3D" width="399" height="170" /></a></dt>
<dd>Bend Modifier for PV3D - Part 1 </dd>
</dl>
</div>
[wp_caption id="attachment_1725" align="alignnone" width="400" caption="Bend Modifier for PV3D - Part 2"]<a href="http://www.everydayflash.com/blog/index.php/2008/06/16/bend-modifier-papervision3d-2/"><img class="size-full wp-image-1725" src="http://flashenabled.wordpress.com/files/2008/07/bending-modifier-for-papervision3d-2.jpg" alt="Bend Modifier for PV3D - Part 2" width="400" height="145" /></a>[/wp_caption]
<div class="mceTemp">
<dl>
<dt><a href="http://blog.zupko.info/?p=140"><img class="size-full wp-image-1723 null null" src="http://flashenabled.wordpress.com/files/2008/07/twist-modifier-for-pv3d.jpg" alt="Twist Modifier for PV3D" width="400" height="153" /></a></dt>
<dd>Twist Modifier for PV3D</dd>
</dl>
</div>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Tutorials | Export from Blender and 3D Max to Flash CS3]]></title>
<link>http://flashenabled.wordpress.com/?p=1709</link>
<pubDate>Wed, 02 Jul 2008 20:50:54 +0000</pubDate>
<dc:creator>Carlos Pinho</dc:creator>
<guid>http://flashenabled.wordpress.com/?p=1709</guid>
<description><![CDATA[
Today i bring you two tutorials showing how to export either from Blender or 3D Max Studio, as also]]></description>
<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-863" src="http://flashenabled.wordpress.com/files/2008/03/papervision-logo.png" alt="" width="425" height="121" /></p>
<p>Today i bring you two tutorials showing how to export either from Blender or 3D Max Studio, as also a cool place for getting free 3D models which you can use to test your PV3D skills.</p>
<p><strong>Exporting from 3D Max Studio</strong></p>
<p><img class="alignnone size-full wp-image-1711" src="http://flashenabled.wordpress.com/files/2008/07/exporting-from-3d-max-studio-1.jpg" alt="" width="425" height="160" /><!--more--></p>
<p><a title="Read Tutorial" href="http://www.rozengain.com/?postid=28" target="_blank">Read Tutorial</a></p>
<p><strong>Exporting from Blender 3D</strong></p>
<p><img class="alignnone size-full wp-image-1710" src="http://flashenabled.wordpress.com/files/2008/07/exporting-from-3d-max-studio.jpg" alt="" width="425" height="170" /><a title="Read Tutorial" href="http://www.rozengain.com/?postid=28" target="_blank"></a></p>
<p><a title="Read Tutorial" href="http://rozengain.com/?postid=54" target="_blank">Read Tutorial</a></p>
<p>Free 3D Models - 3ds, lwo, lightwave, br4, bryce, pz3, poser, md2</p>
<p><img class="alignnone size-full wp-image-1712" src="http://flashenabled.wordpress.com/files/2008/07/free-3d-models.jpg" alt="Free 3D Models" width="425" height="246" /></p>
<p><a title="Download" href="http://telias.free.fr/Models_menu.html" target="_blank">Download</a></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Flash Content Now Searchable by Google and Yahoo Search]]></title>
<link>http://drawk.wordpress.com/?p=218</link>
<pubDate>Wed, 02 Jul 2008 17:37:54 +0000</pubDate>
<dc:creator>drawk</dc:creator>
<guid>http://drawk.wordpress.com/?p=218</guid>
<description><![CDATA[It was announced that Flash content and SWF files are now searchable by Google and Yahoo searching c]]></description>
<content:encoded><![CDATA[<p>It was <a href="http://googleblog.blogspot.com/2008/06/google-learns-to-crawl-flash.html" target="_blank">announced that Flash content and SWF files are now searchable by Google</a> and Yahoo searching crawlers.  This has yet to be really tested but it is good news that flash sites with textual content will be able to be searched like normal websites.  This knocks down a bit the "black box" approach to content when it is in flash rather than a HTML/XHTML based website.</p>
<blockquote><p>Google has been developing a new algorithm for indexing textual content in Flash files of all kinds, from Flash menus, buttons and banners, to self-contained Flash websites. Recently, we've improved the performance of this Flash indexing algorithm by integrating <a href="http://www.adobe.com/aboutadobe/pressroom/pressreleases/200806/070108AdobeRichMediaSearch.html">Adobe's Flash Player technology</a>.</p>
<p>In the past, web designers faced challenges if they chose to develop a site in Flash because the content they included was not indexable by search engines. They needed to make extra effort to ensure that their content was also presented in another way that search engines could find.</p>
<p>Now that we've launched our Flash indexing algorithm, web designers can expect improved visibility of their published Flash content, and you can expect to see better search results and snippets. There's more info on the <a href="http://googlewebmastercentral.blogspot.com/2008/06/improved-flash-indexing.html">Webmaster Central blog</a> about the Searchable SWF integration.</p></blockquote>
<p>I imagine that it is still more difficult to index flash content and this opens questions as to what is searched and how as content can be loaded in dynamically and some content might be overly verbose that should not be indexed such as code.  Also, the placement of text matters on a regular website so I imagine that it also matters according to what content is in a flash SWF file.</p>
<p>It will be interesting to hear how this evolves but as of right now it is good news that content in flash is searchable.  The format is now open and this is probably why the capability is now possible as there aren't any fees to using the format.  So expect more accessibiliy from flash as time goes on like this.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Tutorials | Using the Yahoo! AS3 Components and API]]></title>
<link>http://flashenabled.wordpress.com/?p=1699</link>
<pubDate>Tue, 01 Jul 2008 22:32:41 +0000</pubDate>
<dc:creator>Carlos Pinho</dc:creator>
<guid>http://flashenabled.wordpress.com/?p=1699</guid>
<description><![CDATA[Yahoo! Astra Flash / Flex Components are a very cool extra for the available sets of Flash and Flex ]]></description>
<content:encoded><![CDATA[<p>Yahoo! Astra Flash / Flex Components are a very cool extra for the available sets of Flash and Flex components. They are easy to skin and lot's of documentation is available too, so any developer can be able to extend the features of the ASTRA Components. So if you want to learn how to work with these cool resources take a look for the following tutorials:</p>
<p><strong>Developing Widgets with Flash</strong></p>
<p><img class="alignnone size-full wp-image-1701" src="http://flashenabled.wordpress.com/files/2008/07/developing-widgets-with-flash.jpg" alt="Developing Widgets with Flash" width="425" height="160" /></p>
<p><!--more--></p>
<p><a title="Rea" href="http://developer.yahoo.com/flash/articles/flash-widgets.html" target="_blank">Read Tutorial</a></p>
<p><strong>Yahoo! Maps AS3 Component Flash and Flex Examples</strong></p>
<p><img class="alignnone size-full wp-image-1702" src="http://flashenabled.wordpress.com/files/2008/07/yahoo-maps-as3-component.jpg" alt="Yahoo! Maps AS3 Component" width="425" height="170" /></p>
<p><a href="http://developer.yahoo.com/flash/maps/examples.html" target="_blank">View Examples and source</a></p>
<p><strong>Skinning in Flex: Beauty is Only Skin Deep</strong></p>
<p><img class="alignnone size-full wp-image-1703" src="http://flashenabled.wordpress.com/files/2008/07/skinning-in-flex-beauty-is-only-skin-deep.jpg" alt="Skinning in Flex Beauty is Only Skin Deep" width="425" height="160" /></p>
<p><a title="Read Tutorial" href="http://developer.yahoo.com/flash/articles/flex-skinning.html" target="_self">Read Tutorial</a></p>
<p><strong>Developing with the Display List in ActionScript 3</strong></p>
<p><img class="alignnone size-full wp-image-1704" src="http://flashenabled.wordpress.com/files/2008/07/developing-with-the-display-list-in-actionscript-3.jpg" alt="Developing with the Display List in ActionScript 3" width="425" height="316" /></p>
<p><a title="Read tutorial" href="http://developer.yahoo.com/flash/articles/display-list.html" target="_blank">Read Tutorial</a></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Preloading issue in AS3]]></title>
<link>http://thienhaflash.wordpress.com/?p=18</link>
<pubDate>Mon, 30 Jun 2008 05:45:05 +0000</pubDate>
<dc:creator>thienhaflash</dc:creator>
<guid>http://thienhaflash.wordpress.com/?p=18</guid>
<description><![CDATA[At first, i think that&#8217;s my fault cause it&#8217;s just a very little problem trying to optimi]]></description>
<content:encoded><![CDATA[<p>At first, i think that's my fault cause it's just a very little problem trying to optimize the loading proccess. I experienced with the loading proccess in AS2 and i really can make the loader works for almost nothing had been loaded (&#60;1kb)... but when i tried to apply all of my AS2 tricks into AS3 it just doesn't work any more... </p>
<p>I tried to search everywhere, google, adobe's forum, actionscripts.org, kirupa.com, ... and no solution had been found... just the same old answers : "...it's simple, you uncheck export in first frame for all the linkage items, don't put any stuff on the first keyframe, choose another frame to export class files, and apply these code...". I wanted to shout at them : "It won't work ! I tried, tried a thousand times ! And it doesn't work ! ". I also found a trick from Keith Peter about optimize loading process, using [Frame(factoryClass=.....)], but just for Flex... nothing has ever worked for flash...</p>
<p>And i got to have a conlusion that there're no way to have a preloader in AS3 in the same fla file. Maybe using another .swf file to load the main movie in is the only workaround....</p>
<p>Sadly, most of my work was code-based, so export in first frame for library items wouldn't help much. All my external classes was all exported into first frame even though i tried to export it in frame 2, 3... or any other frame. I even tried to make a different scene (which is not recommended), and changed the loading order top down/bottom up... and nothing works too...</p>
<p>So, what's next? (sight...)</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[ActionScript 2.0 - introduction video]]></title>
<link>http://pwano.wordpress.com/?p=333</link>
<pubDate>Sun, 29 Jun 2008 03:30:15 +0000</pubDate>
<dc:creator>pwano</dc:creator>
<guid>http://pwano.wordpress.com/?p=333</guid>
<description><![CDATA[
This is an introduction on ActionScript 2.0:


]]></description>
<content:encoded><![CDATA[<div class="post">
<div class="text-container"><span style="color:#78d3d4;">T</span><span style="color:#73cecf;">h</span><span style="color:#6ecacb;">i</span><span style="color:#6ac5c6;">s</span><span style="color:#65c1c2;"> </span><span style="color:#61bdbd;">i</span><span style="color:#5cb8b9;">s</span><span style="color:#58b4b4;"> </span><span style="color:#53afb0;">a</span><span style="color:#4fabab;">n</span><span style="color:#4aa7a7;"> </span><span style="color:#46a2a2;">i</span><span style="color:#419e9e;">n</span><span style="color:#3d9a99;">t</span><span style="color:#389595;">r</span><span style="color:#349190;">o</span><span style="color:#2f8c8c;">d</span><span style="color:#2b8887;">u</span><span style="color:#268483;">c</span><span style="color:#227f7e;">t</span><span style="color:#1d7b7a;">i</span><span style="color:#197776;">on</span><span style="color:#187473;"> </span><span style="color:#177271;">o</span><span style="color:#176f6e;">n</span><span style="color:#166d6c;"> </span><span style="color:#166a69;">A</span><span style="color:#156867;">c</span><span style="color:#156665;">t</span><span style="color:#146362;">i</span><span style="color:#146160;">o</span><span style="color:#135e5d;">n</span><span style="color:#135c5b;">S</span><span style="color:#125958;">c</span><span style="color:#125756;">r</span><span style="color:#115554;">i</span><span style="color:#115251;">p</span><span style="color:#10504f;">t</span><span style="color:#104d4c;"> </span><span style="color:#0f4b4a;">2</span><span style="color:#0f4847;">.</span><span style="color:#0e4645;">0</span><span style="color:#0e4443;">:</span></div>
<div class="text-container"><span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/h8TbU6oaHOA'></param><param name='wmode' value='transparent'></param><embed src='http://www.youtube.com/v/h8TbU6oaHOA&rel=0' type='application/x-shockwave-flash' wmode='transparent' width='425' height='350'></embed></object></span></div>
</div>
]]></content:encoded>
</item>
<item>
<title><![CDATA[ActionScript 3.0 - introduction video]]></title>
<link>http://pwano.wordpress.com/?p=331</link>
<pubDate>Sun, 29 Jun 2008 03:16:58 +0000</pubDate>
<dc:creator>pwano</dc:creator>
<guid>http://pwano.wordpress.com/?p=331</guid>
<description><![CDATA[
This is an introduction on ActionScript 3.0:


]]></description>
<content:encoded><![CDATA[<div class="post">
<div class="text-container"><span style="color:#78d3d4;">T</span><span style="color:#73cecf;">h</span><span style="color:#6ecacb;">i</span><span style="color:#6ac5c6;">s</span><span style="color:#65c1c2;"> </span><span style="color:#61bdbd;">i</span><span style="color:#5cb8b9;">s</span><span style="color:#58b4b4;"> </span><span style="color:#53afb0;">a</span><span style="color:#4fabab;">n</span><span style="color:#4aa7a7;"> </span><span style="color:#46a2a2;">i</span><span style="color:#419e9e;">n</span><span style="color:#3d9a99;">t</span><span style="color:#389595;">r</span><span style="color:#349190;">o</span><span style="color:#2f8c8c;">d</span><span style="color:#2b8887;">u</span><span style="color:#268483;">c</span><span style="color:#227f7e;">t</span><span style="color:#1d7b7a;">i</span><span style="color:#197776;">on</span><span style="color:#187473;"> </span><span style="color:#177271;">o</span><span style="color:#176f6e;">n</span><span style="color:#166d6c;"> </span><span style="color:#166a69;">A</span><span style="color:#156867;">c</span><span style="color:#156665;">t</span><span style="color:#146362;">i</span><span style="color:#146160;">o</span><span style="color:#135e5d;">n</span><span style="color:#135c5b;">S</span><span style="color:#125958;">c</span><span style="color:#125756;">r</span><span style="color:#115554;">i</span><span style="color:#115251;">p</span><span style="color:#10504f;">t</span><span style="color:#104d4c;"> </span><span style="color:#0f4b4a;">3</span><span style="color:#0f4847;">.</span><span style="color:#0e4645;">0</span><span style="color:#0e4443;">:</span></div>
<div class="text-container"><span style='text-align:center; display: block;'><object width='425' height='350'><param name='movie' value='http://www.youtube.com/v/UwyHJtjXmWU'></param><param name='wmode' value='transparent'></param><embed src='http://www.youtube.com/v/UwyHJtjXmWU&rel=0' type='application/x-shockwave-flash' wmode='transparent' width='425' height='350'></embed></object></span></div>
</div>
]]></content:encoded>
</item>
<item>
<title><![CDATA[ActionScript 2.0 - 1]]></title>
<link>http://pwano.wordpress.com/?p=312</link>
<pubDate>Sun, 29 Jun 2008 02:36:15 +0000</pubDate>
<dc:creator>pwano</dc:creator>
<guid>http://pwano.wordpress.com/?p=312</guid>
<description><![CDATA[Syntax:
ActionScript has its own rules of grammar and punctuation that determine which characters an]]></description>
<content:encoded><![CDATA[<p><span style="color:#74d2d8;">S</span><span style="color:#5bd0ca;">y</span><span style="color:#42cebc;">n</span><span style="color:#2accaf;">ta</span><span style="color:#1c8b77;">x</span><span style="color:#0f4b40;">:</span></p>
<p><span style="color:#1d868d;">A</span><span style="color:#1c858c;">ctionScript has</span><span style="color:#1c858b;"> </span><span style="color:#1c848b;">its own rules o</span><span style="color:#1c848a;">f </span><span style="color:#1c838a;">grammar and pu</span><span style="color:#1c8389;">nct</span><span style="color:#1c8289;">uation that d</span><span style="color:#1c8288;">eter</span><span style="color:#1c8188;">mine which</span><span style="color:#1b8188;"> c</span><span style="color:#1b8187;">harac</span><span style="color:#1b8087;">ters and wo</span><span style="color:#1b8086;">rds ar</span><span style="color:#1b7f86;">e used to </span><span style="color:#1b7f85;">create </span><span style="color:#1b7e85;">meaning a</span><span style="color:#1b7e84;">nd in wh</span><span style="color:#1b7d84;">ich ord</span><span style="color:#1b7d83;">er they c</span><span style="color:#1b7c83;">an </span><span style="color:#1a7c83;">be w</span><span style="color:#1a7c82;">ritten. Fo</span><span style="color:#1a7b82;">r exam</span><span style="color:#1a7b81;">ple, in Eng</span><span style="color:#1a7a81;">lish,</span><span style="color:#1a7a80;"> a period en</span><span style="color:#1a7980;">ds a</span><span style="color:#1a797f;"> sentence; in</span><span style="color:#1a787f;"> Ac</span><span style="color:#1a787e;">tionScrip</span><span style="color:#19787e;">t, a </span><span style="color:#19777e;">se</span><span style="color:#19777d;">micolon ends a </span><span style="color:#19767d;">s</span><span style="color:#19767c;">tatement.</span></p>
<p>v<span style="color:#19757b;">ar name:String </span><span style="color:#19757a;">=</span><span style="color:#19747a;"> "Jhon";</span></p>
<p>The <span style="color:#197479;">ab</span><span style="color:#197379;">ove s</span><span style="color:#187379;">tatement </span><span style="color:#187378;">is </span><span style="color:#187278;">a variable de</span><span style="color:#187277;">clar</span><span style="color:#187177;">ation of str</span><span style="color:#187176;">ing d</span><span style="color:#187076;">ata type.</span></p>
<p><span style="color:#187075;">Action</span><span style="color:#186f75;">Script has</span><span style="color:#186f74;"> syn</span><span style="color:#176f74;">tax</span><span style="color:#176e74;"> rules th</span><span style="color:#176e73;">at you m</span><span style="color:#176d73;">ust fol</span><span style="color:#176d72;">low to cr</span><span style="color:#176c72;">eate sc</span><span style="color:#176c71;">ripts that</span><span style="color:#176b71;"> can c</span><span style="color:#176b70;">ompile and </span><span style="color:#176a70;">run c</span><span style="color:#176a6f;">or</span><span style="color:#166a6f;">rectly.</span></p>
<p>A<span style="color:#16696f;">ctio</span><span style="color:#16696e;">nScript 2.0 i</span><span style="color:#16686e;">s c</span><span style="color:#16686d;">ase sensitive,</span><span style="color:#16676d;"> s</span><span style="color:#16676c;">o the variables</span><span style="color:#16666c;"> </span><span style="color:#16666b;">"name" and "Name</span><span style="color:#15656a;">" are different</span><span style="color:#156569;">.</span></p>
<p>In ActionScri<span style="color:#156468;">pt</span><span style="color:#156368;">, dot syntax i</span><span style="color:#156367;">s u</span><span style="color:#156267;">sed ( .) to a</span><span style="color:#156266;">cces</span><span style="color:#156166;">s properti</span><span style="color:#146166;">es</span><span style="color:#146165;"> or m</span><span style="color:#146065;">ethods belo</span><span style="color:#146064;">nging </span><span style="color:#145f64;">to an obje</span><span style="color:#145f63;">ct or m</span><span style="color:#145e63;">ovie clip</span><span style="color:#145e62;">. It is </span><span style="color:#145d62;">also us</span><span style="color:#145d61;">ed to ide</span><span style="color:#145c61;">nti</span><span style="color:#135c61;">fy t</span><span style="color:#135c60;">he target </span><span style="color:#135b60;">path t</span><span style="color:#135b5f;">o a movie c</span><span style="color:#135a5f;">lip, </span><span style="color:#135a5e;">variable, fu</span><span style="color:#13595e;">ncti</span><span style="color:#13595d;">on, or object</span><span style="color:#13585d;">.</span></p>
<p><span style="color:#13585c;"> trace</span><span style="color:#12585c;">( rec</span><span style="color:#12575c;">ta</span><span style="color:#12575b;">ngle_mc._width)</span><span style="color:#12565b;">;</span></p>
<p>The above sta<span style="color:#125559;">tement traces t</span><span style="color:#125558;">h</span><span style="color:#125458;">e width of the </span><span style="color:#125457;">mo</span><span style="color:#125357;">viecl</span><span style="color:#115357;">ip "recta</span><span style="color:#115356;">ngl</span><span style="color:#115256;">e_mc" where "</span><span style="color:#115255;">rect</span><span style="color:#115155;">angle_mc" is</span><span style="color:#115154;"> the </span><span style="color:#115054;">instance na</span><span style="color:#115053;">me of </span><span style="color:#114f53;">the Moviec</span><span style="color:#114f52;">lip.</span></p>
<p>N<span style="color:#104e52;">ote: trac</span><span style="color:#104e51;">e statem</span><span style="color:#104d51;">ent is </span><span style="color:#104d50;">used to o</span><span style="color:#104c50;">utput d</span><span style="color:#104c4f;">ata in the</span><span style="color:#104b4f;"> outpu</span><span style="color:#104b4e;">t panel, ma</span><span style="color:#104a4e;">inly </span><span style="color:#104a4d;">us</span><span style="color:#0f4a4d;">ed for deb</span><span style="color:#0f494d;">uggi</span><span style="color:#0f494c;">ng purposes a</span><span style="color:#0f484c;">nd </span><span style="color:#0f484b;">these statemen</span><span style="color:#0f474b;">ts</span><span style="color:#0f474a;"> only execute d</span><span style="color:#0f464a;">u</span><span style="color:#0f4649;">ring authoring. </span></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[ActionScript 2.0 - 2]]></title>
<link>http://pwano.wordpress.com/?p=310</link>
<pubDate>Sun, 29 Jun 2008 02:33:31 +0000</pubDate>
<dc:creator>pwano</dc:creator>
<guid>http://pwano.wordpress.com/?p=310</guid>
<description><![CDATA[Curly Braces
ActionScript event handlers, class definitions, and functions are grouped together into]]></description>
<content:encoded><![CDATA[<p><span style="color:#74d2d8;">C</span><span style="color:#67d1d1;">u</span><span style="color:#5bd0ca;">r</span><span style="color:#4fcfc3;">l</span><span style="color:#42cebc;">y</span><span style="color:#36cdb5;"> </span><span style="color:#2accaf;">Br</span><span style="color:#24b298;">a</span><span style="color:#1f9882;">c</span><span style="color:#197e6c;">e</span><span style="color:#146456;">s</span></p>
<p><span style="color:#1d868d;">A</span><span style="color:#1c858c;">ctionScript ev</span><span style="color:#1c858b;">e</span><span style="color:#1c848b;">nt handlers, c</span><span style="color:#1c848a;">la</span><span style="color:#1c838a;">ss definitio</span><span style="color:#1c8389;">ns,</span><span style="color:#1c8289;"> and functio</span><span style="color:#1c8288;">ns a</span><span style="color:#1c8188;">re groupe</span><span style="color:#1b8188;">d </span><span style="color:#1b8187;">toge</span><span style="color:#1b8087;">ther into </span><span style="color:#1b8086;">blocks</span><span style="color:#1b7f86;"> with cur</span><span style="color:#1b7f85;">ly bra</span><span style="color:#1b7e85;">ces ( {}</span><span style="color:#1b7e84;">).</span></p>
<p><span style="color:#1b7d84;">Ex: // </span><span style="color:#1b7d83;">Class Fo</span><span style="color:#1b7c83;">rm.</span><span style="color:#1a7c83;">as</span></p>
<p><span style="color:#1a7c82;"> class</span><span style="color:#1a7b82;"> Form</span><span style="color:#1a7b81;">() {</span></p>
<p><span style="color:#1a7a81;">}</span></p>
<p><span style="color:#1a7a80;"> // onRele</span><span style="color:#1a7980;">ase </span><span style="color:#1a797f;">Event handl</span><span style="color:#1a787f;">er </span><span style="color:#1a787e;">for butto</span><span style="color:#19787e;">n</span></p>
<p><span style="color:#19777e;"> </span><span style="color:#19777d;"> go_btn.onRel</span><span style="color:#19767d;">e</span><span style="color:#19767c;">ase = function(</span><span style="color:#19757b;">) {</span></p>
<p>};</p>
<p><span style="color:#19757a;"> </span><span style="color:#19747a;"> // Functio</span><span style="color:#197479;">n<br />
</span><span style="color:#197379;"><br />
</span><span style="color:#187379;">function</span><span style="color:#187378;"> ge</span><span style="color:#187278;">tData(name:</span><span style="color:#187277;">Stri</span><span style="color:#187177;">ng):Void {<br />
</span><span style="color:#187176;"><br />
</span><span style="color:#187076;">}</span></p>
<p>Com<span style="color:#187075;">ments</span><span style="color:#186f75;">:</span></p>
<p>Th<span style="color:#186f74;">ere a</span><span style="color:#176f74;">re</span><span style="color:#176e74;"> two way</span><span style="color:#176e73;">s you c</span><span style="color:#176d73;">an write</span><span style="color:#176d72;"> comment</span><span style="color:#176c72;">s in A</span><span style="color:#176c71;">ctionScri</span><span style="color:#176b71;">pt,<br />
</span><span style="color:#176b70;"> single </span><span style="color:#176a70;">line</span><span style="color:#176a6f;"> an</span><span style="color:#166a6f;">d multi-</span><span style="color:#16696f;">line</span><span style="color:#16696e;"> comments.</span></p>
<p><span style="color:#16686e;"> </span><span style="color:#16686d;"> Ex:</span></p>
<p>//<span style="color:#16676d;"> T</span><span style="color:#16676c;">his is a singl</span><span style="color:#16666c;">e</span><span style="color:#16666b;"> line comment</span></p>
<p><span style="color:#15656a;"> /*</span></p>
<p>Th<span style="color:#156569;">i</span><span style="color:#156469;">s is a multi-l</span><span style="color:#156468;">in</span><span style="color:#156368;">e comment wi</span><span style="color:#156367;">th </span><span style="color:#156267;">two lines...</span></p>
<p><span style="color:#156166;"> second </span><span style="color:#146166;">li</span><span style="color:#146165;">ne g</span><span style="color:#146065;">oes here..</span><span style="color:#146064;">.</span></p>
<p><span style="color:#145f64;"> */</span></p>
<p><span style="color:#145f63;">Consta</span><span style="color:#145e63;">nts:</span></p>
<p>Ac<span style="color:#145e62;">tionScri</span><span style="color:#145d62;">pt cont</span><span style="color:#145d61;">ains pre</span><span style="color:#145c61;">def</span><span style="color:#135c61;">ined</span><span style="color:#135c60;"> constant</span><span style="color:#135b60;">s.</span></p>
<p>F<span style="color:#135b5f;">or example</span><span style="color:#135a5f;">, the</span><span style="color:#135a5e;"> constants </span><span style="color:#13595e;">ENTE</span><span style="color:#13595d;">R, BACKSPAC</span><span style="color:#13585d;">E,S</span><span style="color:#13585c;">PACE, and</span><span style="color:#12585c;"> TAB</span><span style="color:#12575c;"> a</span><span style="color:#12575b;">re properties</span><span style="color:#12565b;"> </span><span style="color:#12565a;">of the Key obje</span><span style="color:#125559;">ct and refer to</span><span style="color:#125558;"> </span><span style="color:#125458;">keyboard keys</span><span style="color:#125457;">. </span><span style="color:#125357;">To te</span><span style="color:#115357;">st wheth</span><span style="color:#115356;">er </span><span style="color:#115256;">the user is</span><span style="color:#115255;"> pre</span><span style="color:#115155;">ssing the E</span><span style="color:#115154;">nter </span><span style="color:#115054;">key, you c</span><span style="color:#115053;">ould </span><span style="color:#114f53;">use the f</span><span style="color:#114f52;">ollow</span><span style="color:#104f52;">in</span><span style="color:#104e52;">g statem</span><span style="color:#104e51;">ent:</span></p>
<p><span style="color:#104d51;"> if(Ke</span><span style="color:#104d50;">y.getCod</span><span style="color:#104c50;">e() ==</span><span style="color:#104c4f;"> Key.ENTE</span><span style="color:#104b4f;">R) {<br />
</span><span style="color:#104b4e;"><br />
}</span></p>
<p>Fl<span style="color:#104a4e;">ash </span><span style="color:#104a4d;">doe</span><span style="color:#0f4a4d;">s not en</span><span style="color:#0f494d;">forc</span><span style="color:#0f494c;">e constants;</span><span style="color:#0f484c;"> th</span><span style="color:#0f484b;">at is, you c</span><span style="color:#0f474b;">an</span><span style="color:#0f474a;">'t define your</span><span style="color:#0f464a;"> </span><span style="color:#0f4649;">own constants.</span><span style="color:#0e4548;"> </span></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[ActionScript 2.0 - 3]]></title>
<link>http://pwano.wordpress.com/?p=308</link>
<pubDate>Sun, 29 Jun 2008 02:30:34 +0000</pubDate>
<dc:creator>pwano</dc:creator>
<guid>http://pwano.wordpress.com/?p=308</guid>
<description><![CDATA[Data Types
ActionScript has the following basic data types that you use frequently in your programs:]]></description>
<content:encoded><![CDATA[<p><span style="color:#74d2d8;">D</span><span style="color:#61d0cd;">a</span><span style="color:#4fcfc3;">t</span><span style="color:#3ccdb9;">a</span><span style="color:#2accaf;"> T</span><span style="color:#23ab93;">y</span><span style="color:#1c8b77;">p</span><span style="color:#156b5b;">e</span><span style="color:#0f4b40;">s</span></p>
<p><span style="color:#1d868d;">A</span><span style="color:#1c858c;">ctionScript has the following basic dat</span><span style="color:#1c858b;">a </span><span style="color:#1c848b;">types that you use frequently in your</span><span style="color:#1c848a;"> pro</span><span style="color:#1c838a;">grams:</p>
<p>String: A string is a seque</span><span style="color:#1c8389;">nce of </span><span style="color:#1c8289;">characters such as letters, numb</span><span style="color:#1c8288;">ers, and </span><span style="color:#1c8188;">punctuation marks. You e</span><span style="color:#1b8188;">nter s</span><span style="color:#1b8187;">trings in an</span><span style="color:#1b8087;"> ActionScript statement by </span><span style="color:#1b8086;">enclosing them</span><span style="color:#1b7f86;"> in single (') or double </span><span style="color:#1b7f85;">(") quotation mar</span><span style="color:#1b7e85;">ks.</p>
<p>Ex: var name:</span><span style="color:#1b7e84;">String = "Steve";</p>
<p></span><span style="color:#1b7d84;">Number: The number d</span><span style="color:#1b7d83;">ata type is a double-p</span><span style="color:#1b7c83;">recisi</span><span style="color:#1a7c83;">on floating</span><span style="color:#1a7c82;">-point number. The minim</span><span style="color:#1a7b82;">um value of a n</span><span style="color:#1a7b81;">umber object is approximate</span><span style="color:#1a7a81;">ly 5e-324. T</span><span style="color:#1a7a80;">he maximum is approximately 1</span><span style="color:#1a7980;">.79E+308.<br />
</span><span style="color:#1a797f;"><br />
Ex: var age:Number = 24;</p>
<p>B</span><span style="color:#1a787f;">oolean:</span><span style="color:#1a787e;"> A Boolean value is on</span><span style="color:#19787e;">e that is ei</span><span style="color:#19777e;">ther </span><span style="color:#19777d;">true or false. ActionScript also conv</span><span style="color:#19767d;">er</span><span style="color:#19767c;">ts the values true and false to 1 and 0</span><span style="color:#19757b;"> when appropriate. Boolean values are m</span><span style="color:#19757a;">ost</span><span style="color:#19747a;"> often used with logical operators i</span><span style="color:#197479;">n Act</span><span style="color:#197379;">ionScript st</span><span style="color:#187379;">atements that make com</span><span style="color:#187378;">parisons</span><span style="color:#187278;"> to control the flow of a scrip</span><span style="color:#187277;">t.</p>
<p>Ex</span><span style="color:#187177;">: var smoking:Boolean = false</span><span style="color:#187176;">;</p>
<p>Object: A</span><span style="color:#187076;">n object is a collection of</span><span style="color:#187075;"> properties. E</span><span style="color:#186f75;">ach property has a name a</span><span style="color:#186f74;">nd a value.</span><span style="color:#176f74;"> The v</span><span style="color:#176e74;">alue of a property can</span><span style="color:#176e73;"> be any Flash data </span><span style="color:#176d73;">type - even the obje</span><span style="color:#176d72;">ct data type. This let</span><span style="color:#176c72;">s you arrange obj</span><span style="color:#176c71;">ects inside each other, </span><span style="color:#176b71;">or nest them. T</span><span style="color:#176b70;">o specify objects and their</span><span style="color:#176a70;"> properties,</span><span style="color:#176a6f;"> you </span><span style="color:#166a6f;">use the dot ( .) operato</span><span style="color:#16696f;">r.</p>
<p>Ex:</p>
<p></span><span style="color:#16696e;"> var user:Object = new Object(</span><span style="color:#16686e;">);</p>
<p></span><span style="color:#16686d;"> user.name = "Steve";</p>
<p>user.ag</span><span style="color:#16676d;">e = 2</span><span style="color:#16676c;">4;</p>
<p>user.sex = "male"</p>
<p>MovieClip:</span><span style="color:#16666c;"> M</span><span style="color:#16666b;">ovie clips are symbols that can play an</span><span style="color:#15656a;">imation in a Flash application. They ar</span><span style="color:#156569;">e </span><span style="color:#156469;">the only data type that refers to a g</span><span style="color:#156468;">raphi</span><span style="color:#156368;">c element. The MovieClip data type</span><span style="color:#156367;"> lets y</span><span style="color:#156267;">ou control movie clip symbols us</span><span style="color:#156266;">ing the me</span><span style="color:#156166;">thods of the MovieClip c</span><span style="color:#146166;">lass.</span><span style="color:#146165;"></p>
<p>You do not</span><span style="color:#146065;"> use a constructor to call </span><span style="color:#146064;">the methods of </span><span style="color:#145f64;">the MovieClip class. You</span><span style="color:#145f63;"> can create a mov</span><span style="color:#145e63;">ie clip instance on th</span><span style="color:#145e62;">e Stage or create an</span><span style="color:#145d62;"> instance dynamical</span><span style="color:#145d61;">ly. Then you simply ca</span><span style="color:#145c61;">ll the</span><span style="color:#135c61;"> methods of</span><span style="color:#135c60;"> the MovieClip class usin</span><span style="color:#135b60;">g the dot ( .)</span><span style="color:#135b5f;"> operator.</p>
<p>Null: The null </span><span style="color:#135a5f;">data type has</span><span style="color:#135a5e;"> only one value, null. This v</span><span style="color:#13595e;">alue means</span><span style="color:#13595d;"> no value - that is, a lack of </span><span style="color:#13585d;">data. Yo</span><span style="color:#13585c;">u can assign the null </span><span style="color:#12585c;">value in a v</span><span style="color:#12575c;">ariet</span><span style="color:#12575b;">y of situations to indicate that a p</span><span style="color:#12565b;">rop</span><span style="color:#12565a;">erty or variable does not yet have a va</span><span style="color:#125559;">lue assigned to it.</p>
<p>Undefined: The und</span><span style="color:#125558;">ef</span><span style="color:#125458;">ined data type has one value, undefin</span><span style="color:#125457;">ed, a</span><span style="color:#125357;">nd is automa</span><span style="color:#115357;">tically assigned to a </span><span style="color:#115356;">variabl</span><span style="color:#115256;">e to which a value hasn't been a</span><span style="color:#115255;">ssigned, e</span><span style="color:#115155;">ither by your code or user in</span><span style="color:#115154;">teraction.</p>
<p></span><span style="color:#115054;">The value undefined is auto</span><span style="color:#115053;">matically assig</span><span style="color:#114f53;">ned; unlike null, you do</span><span style="color:#114f52;">n't assign </span><span style="color:#104f52;">undefi</span><span style="color:#104e52;">ned to a variable or p</span><span style="color:#104e51;">roperty. You use the</span><span style="color:#104d51;"> undefined data typ</span><span style="color:#104d50;">e to check if a variab</span><span style="color:#104c50;">le is set or defi</span><span style="color:#104c4f;">ned.</p>
<p>Void : The void dat</span><span style="color:#104b4f;">a type has one</span><span style="color:#104b4e;"> value, void, and is used i</span><span style="color:#104a4e;">n a function</span><span style="color:#104a4d;"> defin</span><span style="color:#0f4a4d;">ition to indicate that t</span><span style="color:#0f494d;">he functi</span><span style="color:#0f494c;">on does not return a value, as s</span><span style="color:#0f484c;">hown in</span><span style="color:#0f484b;"> the following example:</p>
<p>Ex:</p>
<p>/</span><span style="color:#0f474b;">/Fun</span><span style="color:#0f474a;">ction with a return type Void</p>
<p>fu</span><span style="color:#0f464a;">nc</span><span style="color:#0f4649;">tion setItem(url:String):Void {</p>
<p>}</span></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[ActionScript 2.0 - 4]]></title>
<link>http://pwano.wordpress.com/?p=305</link>
<pubDate>Sun, 29 Jun 2008 02:27:43 +0000</pubDate>
<dc:creator>pwano</dc:creator>
<guid>http://pwano.wordpress.com/?p=305</guid>
<description><![CDATA[Variables
A variable is a container that holds information. The container itself is always the same,]]></description>
<content:encoded><![CDATA[<p><span style="color:#74d2d8;">V</span><span style="color:#61d0cd;">a</span><span style="color:#4fcfc3;">r</span><span style="color:#3ccdb9;">i</span><span style="color:#2accaf;">ab</span><span style="color:#21a18a;">l</span><span style="color:#187665;">e</span><span style="color:#0f4b40;">s</span></p>
<p><span style="color:#1d868d;">A</span><span style="color:#1c858c;"> variable is a container that holds information</span><span style="color:#1c858b;">. T</span><span style="color:#1c848b;">he container itself is always the same, but </span><span style="color:#1c848a;">the co</span><span style="color:#1c838a;">ntents can change. By changing the value </span><span style="color:#1c8389;">of a vari</span><span style="color:#1c8289;">able as the SWF file plays, you can re</span><span style="color:#1c8288;">cord and sav</span><span style="color:#1c8188;">e information about what the </span><span style="color:#1b8188;">user ha</span><span style="color:#1b8187;">s done, record</span><span style="color:#1b8087;"> values that change as the SWF fi</span><span style="color:#1b8086;">le plays, or evalu</span><span style="color:#1b7f86;">ate whether a condition is tr</span><span style="color:#1b7f85;">ue or false.</span></p>
<p>New fea<span style="color:#1b7e85;">tures and changes in Actio</span><span style="color:#1b7e84;">nScript language element</span><span style="color:#1b7d84;">s</span></p>
<p>There are many change<span style="color:#1b7d83;">s and new elements were ad</span><span style="color:#1b7c83;">ded in </span><span style="color:#1a7c83;">ActionScript 2</span><span style="color:#1a7c82;">.0. If you intend to use any </span><span style="color:#1a7b82;">of the following e</span><span style="color:#1a7b81;">lements you need to target your a</span><span style="color:#1a7a81;">pplications to</span><span style="color:#1a7a80;"> flash player 7 and later.</span></p>
<p>MovieCli<span style="color:#1a7980;">pLoader clas</span><span style="color:#1a797f;">s: Very useful class which lets you mo</span><span style="color:#1a787f;">nitor the</span><span style="color:#1a787e;"> progress of files (SWF or </span><span style="color:#19787e;">JPEG) as they </span><span style="color:#19777e;">are lo</span><span style="color:#19777d;">aded into movie clips. The methods and prope</span><span style="color:#19767d;">rti</span><span style="color:#19767c;">es available with this class let you monitor the</span><span style="color:#19757b;"> progress of loading files and perform various </span><span style="color:#19757a;">tas</span><span style="color:#19747a;">ks based on the loading information.</span></p>
<p>NetCon<span style="color:#197479;">nectio</span><span style="color:#197379;">n class and Ne</span><span style="color:#187379;">tStream class: These classe</span><span style="color:#187378;">s let you</span><span style="color:#187278;"> stream local Flash Video (FLV) files </span><span style="color:#187277;">and control </span><span style="color:#187177;">them.</span></p>
<p>Sound.onID3 and Sound.id3: Ev<span style="color:#187176;">ent handler an</span><span style="color:#187076;">d property to provide access to I</span><span style="color:#187075;">D3 data associated</span><span style="color:#186f75;"> with a Sound object that con</span><span style="color:#186f74;">tains in an MP</span><span style="color:#176f74;">3 file.</span></p>
<p>Array.sort() and Array.s<span style="color:#176e73;">ortOn(): These new metho</span><span style="color:#176d73;">ds let you perform addit</span><span style="color:#176d72;">ional sorting options, suc</span><span style="color:#176c72;">h as ascending and de</span><span style="color:#176c71;">scending sorting, whether to </span><span style="color:#176b71;">consider case-sens</span><span style="color:#176b70;">itivity when sorting, and so fort</span><span style="color:#176a70;">h.</span></p>
<p>System cla<span style="color:#176a6f;">ss: Thi</span><span style="color:#166a6f;">s class has several new objec</span><span style="color:#16696f;">ts and metho</span><span style="color:#16696e;">ds, and the System.capabilities object</span><span style="color:#16686e;"> has seve</span><span style="color:#16686d;">ral new properties.</span></p>
<p>TextField.condenseWh<span style="color:#16676d;">ite: T</span><span style="color:#16676c;">his property can be used to remove extra whi</span><span style="color:#16666c;">te </span><span style="color:#16666b;">space from HTML text.</span></p>
<p>TextField.mouseWheelEnabl<span style="color:#15656a;">ed: This property can be used to specify whethe</span><span style="color:#156569;">r a</span><span style="color:#156469;"> text field's contents should scroll when th</span><span style="color:#156468;">e mous</span><span style="color:#156368;">e pointer is positioned over a text field</span><span style="color:#156367;"> and the </span><span style="color:#156267;">user rolls the mouse wheel.</span></p>
<p>TextField<span style="color:#156266;">.StyleSheet </span><span style="color:#156166;">class: This Class lets you cr</span><span style="color:#146166;">eate a </span><span style="color:#146165;">style sheet ob</span><span style="color:#146065;">ject that contains text formattin</span><span style="color:#146064;">g rules such as fo</span><span style="color:#145f64;">nt size, color, and other for</span><span style="color:#145f63;">matting styles.</span></p>
<p>Text<span style="color:#145e63;">Field.styleSheet: This pro</span><span style="color:#145e62;">perty lets you attach a </span><span style="color:#145d62;">style sheet object to a </span><span style="color:#145d61;">text field.</span></p>
<p>TextFormat.ge<span style="color:#145c61;">tTextEx</span><span style="color:#135c61;">tent(): This m</span><span style="color:#135c60;">ethod accepts a new parameter</span><span style="color:#135b60;">, and the object i</span><span style="color:#135b5f;">t returns contains a new member.<br />
</span><span style="color:#135a5f;"><br />
XML.addReques</span><span style="color:#135a5e;">tHeader(): This method lets you add </span><span style="color:#13595e;">or change HT</span><span style="color:#13595d;">TP request headers sent with POST acti</span><span style="color:#13585d;">ons.</span></p>
<p>Mou<span style="color:#13585c;">se.onMouseWheel: This event</span><span style="color:#12585c;"> listener will</span><span style="color:#12575c;"> be ge</span><span style="color:#12575b;">nerated when the user scrolls using the mous</span><span style="color:#12565b;">e w</span><span style="color:#12565a;">heel.</span></p>
<p>MovieClip.getNextHighestDepth(): This met<span style="color:#125559;">hod lets you create MovieClip instances at runt</span><span style="color:#125558;">ime</span><span style="color:#125458;"> and be guaranteed that their objects render</span><span style="color:#125457;"> in fr</span><span style="color:#125357;">ont of the oth</span><span style="color:#115357;">er objects in a parent movi</span><span style="color:#115356;">e clip's </span><span style="color:#115256;">z-order space.</span></p>
<p>MovieClip.getInstanceA<span style="color:#115255;">tDepth(): Th</span><span style="color:#115155;">is method lets you access dynamicall</span><span style="color:#115154;">y created Movi</span><span style="color:#115054;">eClip instances using the depth a</span><span style="color:#115053;">s a search index.<br />
</span><span style="color:#114f53;"><br />
MovieClip.getSWFVersion(): T</span><span style="color:#114f52;">his method let</span><span style="color:#104f52;">s you d</span><span style="color:#104e52;">etermine which version of </span><span style="color:#104e51;">Flash Player is supporte</span><span style="color:#104d51;">d by a loaded SWF file.<br />
</span><span style="color:#104d50;"><br />
MovieClip.getTextSnapshot</span><span style="color:#104c50;">(): This method and t</span><span style="color:#104c4f;">he "TextSnapshot object" let </span><span style="color:#104b4f;">you work with text</span><span style="color:#104b4e;"> that is in static text fields in</span><span style="color:#104a4e;"> a movie clip.</span></p>
<p>Movie<span style="color:#0f4a4d;">Clip._lockroot: This property</span><span style="color:#0f494d;"> lets you sp</span><span style="color:#0f494c;">ecify that a movie clip will act as _r</span><span style="color:#0f484c;">oot for a</span><span style="color:#0f484b;">ny movie clips loaded into it or that the</span><span style="color:#0f474b;"> meani</span><span style="color:#0f474a;">ng of _root in a movie clip won't change if </span><span style="color:#0f464a;">tha</span><span style="color:#0f4649;">t movie clip is loaded into another movie clip. </span></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[ActionScript 2.0 - 5]]></title>
<link>http://pwano.wordpress.com/?p=302</link>
<pubDate>Sun, 29 Jun 2008 02:24:55 +0000</pubDate>
<dc:creator>pwano</dc:creator>
<guid>http://pwano.wordpress.com/?p=302</guid>
<description><![CDATA[Debugging changes
This section describes changes that improve your ability to debug your ActionScrip]]></description>
<content:encoded><![CDATA[<p><span style="color:#74d2d8;">D</span><span style="color:#6ad1d2;">e</span><span style="color:#61d0cd;">b</span><span style="color:#58cfc8;">u</span><span style="color:#4fcfc3;">g</span><span style="color:#45cebe;">g</span><span style="color:#3ccdb9;">i</span><span style="color:#33ccb4;">n</span><span style="color:#2accaf;">g </span><span style="color:#26b99f;">c</span><span style="color:#22a78f;">h</span><span style="color:#1e947f;">a</span><span style="color:#1a826f;">n</span><span style="color:#166f5f;">g</span><span style="color:#125d4f;">e</span><span style="color:#0f4b40;">s</span></p>
<p><span style="color:#1d868d;">T</span><span style="color:#1c858c;">his section describes changes that i</span><span style="color:#1c858b;">mp</span><span style="color:#1c848b;">rove your ability to debug your Ac</span><span style="color:#1c848a;">tion</span><span style="color:#1c838a;">Script programs.</span></p>
<p>Output window <span style="color:#1c8389;">change</span><span style="color:#1c8289;">d to Output panel You can now </span><span style="color:#1c8288;">move and </span><span style="color:#1c8188;">dock the Output panel</span><span style="color:#1b8188;"> in th</span><span style="color:#1b8187;">e same way </span><span style="color:#1b8087;">as any other panel in Fla</span><span style="color:#1b8086;">sh. It shows </span><span style="color:#1b7f86;">error messages (includi</span><span style="color:#1b7f85;">ng some runtime</span><span style="color:#1b7e85;"> errors) and lists of</span><span style="color:#1b7e84;"> variables and obj</span><span style="color:#1b7d84;">ects</span></p>
<p>Improved err<span style="color:#1b7d83;">or reporting at comp</span><span style="color:#1b7c83;">ile t</span><span style="color:#1a7c83;">ime In addi</span><span style="color:#1a7c82;">tion to providing more</span><span style="color:#1a7b82;"> robust except</span><span style="color:#1a7b81;">ion handling, ActionScri</span><span style="color:#1a7a81;">pt 2.0 provi</span><span style="color:#1a7a80;">des several new compile-tim</span><span style="color:#1a7980;">e errors.</span></p>
<p>Improved exception handling<span style="color:#1a787f;"> The Er</span><span style="color:#1a787e;">ror class and the th</span><span style="color:#19787e;">row and try</span><span style="color:#19777e;">..cat</span><span style="color:#19777d;">ch..finally statements let you te</span><span style="color:#19767d;">st </span><span style="color:#19767c;">and respond to runtime errors from w</span><span style="color:#19757b;">ithin your script so that you can im</span><span style="color:#19757a;">pl</span><span style="color:#19747a;">ement more robust exception handli</span><span style="color:#197479;">ng.<br />
</span><span style="color:#197379;"><br />
Changes co</span><span style="color:#187379;">mpared to ActionScrip</span><span style="color:#187378;">t 1.0</span></p>
<p><span style="color:#187278;">The following are the major c</span><span style="color:#187277;">hanges th</span><span style="color:#187177;">at you will find in ActionS</span><span style="color:#187176;">cript 2.0 w</span><span style="color:#187076;">hen compared with 1.0.<br />
Ca</span><span style="color:#187075;">se Sensitivit</span><span style="color:#186f75;">y: Case sensitivity is </span><span style="color:#186f74;">the new fe</span><span style="color:#176f74;">ature </span><span style="color:#176e74;">introduced in Action</span><span style="color:#176e73;">Script 2.0, and wh</span><span style="color:#176d73;">enever you publish</span><span style="color:#176d72;"> your movie in Flash</span><span style="color:#176c72;"> Player 7 or lat</span><span style="color:#176c71;">er it will be applied </span><span style="color:#176b71;">to your code. </span><span style="color:#176b70;">That means variable names</span><span style="color:#176a70;"> that diffe</span><span style="color:#176a6f;">r onl</span><span style="color:#166a6f;">y in case (depth and D</span><span style="color:#16696f;">epth) are</span><span style="color:#16696e;"> considered different from ea</span><span style="color:#16686e;">ch othe</span><span style="color:#16686d;">r. This applies to keywords, cl</span><span style="color:#16676d;">ass n</span><span style="color:#16676c;">ames, variables, method names, and</span><span style="color:#16666c;"> s</span><span style="color:#16666b;">o on.</span></p>
<p>This change also affects exte<span style="color:#15656a;">rnal variables loaded with LoadVars.</span><span style="color:#156569;">lo</span><span style="color:#156469;">ad() or loadvariables().</span></p>
<p>Case-sen<span style="color:#156468;">sitiv</span><span style="color:#156368;">ity is implemented in external </span><span style="color:#156367;">scripts</span><span style="color:#156267;"> such as class files, scripts</span><span style="color:#156266;"> that you</span><span style="color:#156166;"> import using the #inc</span><span style="color:#146166;">lude </span><span style="color:#146165;">command, an</span><span style="color:#146065;">d scripts that you write </span><span style="color:#146064;">in your flash </span><span style="color:#145f64;">movie.<br />
Strict Data Typ</span><span style="color:#145f63;">ing: This is ano</span><span style="color:#145e63;">ther useful feature </span><span style="color:#145e62;">that allows you to</span><span style="color:#145d62;"> type cast your va</span><span style="color:#145d61;">riables to their app</span><span style="color:#145c61;">ropria</span><span style="color:#135c61;">te data ty</span><span style="color:#135c60;">pes, so that you can re</span><span style="color:#135b60;">strict variab</span><span style="color:#135b5f;">les to accept only specif</span><span style="color:#135a5f;">ied data ty</span><span style="color:#135a5e;">pe values.</span></p>
<p>When creating a<span style="color:#13595e;"> variable</span><span style="color:#13595d;"> with ActionScript 2.0, use t</span><span style="color:#13585d;">he foll</span><span style="color:#13585c;">owing syntax not only</span><span style="color:#12585c;"> to create </span><span style="color:#12575c;">the </span><span style="color:#12575b;">variable, but also to assign its d</span><span style="color:#12565b;">at</span><span style="color:#12565a;">a type at the same time:</span></p>
<p>var a:<span style="color:#125559;">String = "Hello World";</span></p>
<p>The above l<span style="color:#125558;">ine</span><span style="color:#125458;"> says that "a" is a variable of s</span><span style="color:#125457;">tring</span><span style="color:#125357;"> data type.</span><span style="color:#115357;"> If you assign any o</span><span style="color:#115356;">ther da</span><span style="color:#115256;">ta type value to "a" (Example</span><span style="color:#115255;">: a = 20)</span><span style="color:#115155;"> it throws a "Type mismatch</span><span style="color:#115154;">" error when</span><span style="color:#115054;"> compiled. Strict data t</span><span style="color:#115053;">yping also app</span><span style="color:#114f53;">lies to classes, funct</span><span style="color:#114f52;">ions to typ</span><span style="color:#104f52;">e cas</span><span style="color:#104e52;">t function parameter</span><span style="color:#104e51;">s, return types, a</span><span style="color:#104d51;">nd so forth. Examp</span><span style="color:#104d50;">le:</span></p>
<p>var my_array<span style="color:#104c50;">:Array = new Ar</span><span style="color:#104c4f;">ray(); var my_lv:LoadVa</span><span style="color:#104b4f;">rs = new Load</span><span style="color:#104b4e;">Vars(); function myFuncti</span><span style="color:#104a4e;">on(name:Str</span><span style="color:#104a4d;">ing, a</span><span style="color:#0f4a4d;">ge:Number):Void { }</span></p>
<p><span style="color:#0f494d;">It is rec</span><span style="color:#0f494c;">ommended to type cast all vari</span><span style="color:#0f484c;">ables,</span><span style="color:#0f484b;"> classes, functions, and so fort</span><span style="color:#0f474b;">h th</span><span style="color:#0f474a;">at you use in your script; it prov</span><span style="color:#0f464a;">es</span><span style="color:#0f4649;"> to be a good programming practice.</span></p>
]]></content:encoded>
</item>

</channel>
</rss>
