<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
		<id>http://dbbd.sg/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=220.255.7.194</id>
		<title>Wikicliki - User contributions [en]</title>
		<link rel="self" type="application/atom+xml" href="http://dbbd.sg/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=220.255.7.194"/>
		<link rel="alternate" type="text/html" href="http://dbbd.sg/wiki/index.php?title=Special:Contributions/220.255.7.194"/>
		<updated>2026-07-31T03:30:47Z</updated>
		<subtitle>User contributions</subtitle>
		<generator>MediaWiki 1.27.4</generator>

	<entry>
		<id>http://dbbd.sg/wiki/index.php?title=Actionscript_3_Sandbox&amp;diff=4371</id>
		<title>Actionscript 3 Sandbox</title>
		<link rel="alternate" type="text/html" href="http://dbbd.sg/wiki/index.php?title=Actionscript_3_Sandbox&amp;diff=4371"/>
				<updated>2009-07-06T01:08:59Z</updated>
		
		<summary type="html">&lt;p&gt;220.255.7.194: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;AS3 brings the core language aspects of AS2 into complianace with ECMAScript standard (the international standardized programming language for scripting).&lt;br /&gt;
&lt;br /&gt;
*http://www.flashandmath.com/&lt;br /&gt;
*http://www.learningactionscript3.com/2009/06/30/as3-tips-tricks-and-experiments/#more-61&lt;br /&gt;
*http://www.adobe.com/devnet/flash/quickstart/creating_class_as3/&lt;br /&gt;
*[http://www.bytearray.org/?page_id=82 interesting collection of as3 classes]&lt;br /&gt;
* http://www.bytearray.org/?page_id=82&lt;br /&gt;
&lt;br /&gt;
== Basics of AS3 ==&lt;br /&gt;
&lt;br /&gt;
OPTION F9 == Actions Panel&lt;br /&gt;
&lt;br /&gt;
* The difference between AS2 and AS3:&lt;br /&gt;
&amp;lt;pre&amp;gt;AS2:&lt;br /&gt;
my_MC.createTextField(&amp;quot;instance_name&amp;quot;, 10,0,0 Stage.width, 22);&lt;br /&gt;
my_MC.attachMovie(&amp;quot;MC_name&amp;quot;, &amp;quot;moviename_mc, this.getNextHighestDepth());&lt;br /&gt;
10,0,0,Stage.width == dimensions&lt;br /&gt;
22 == depth&lt;br /&gt;
&lt;br /&gt;
Versus AS3:&lt;br /&gt;
var myText:TextField = new TextField();&lt;br /&gt;
var myMC:MovieClip = new MovieClip();&lt;br /&gt;
now in AS3 you dont have to createTextField or attachMovie, and you can define all the variables later. &lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* select the property (highlighted in blue in the Actions panel), and press F1 to see a help menu telling you about what values the property can have.&lt;br /&gt;
* strings must be in quotation marks (var userName:&amp;lt;DataType&amp;gt; = &amp;quot;Data&amp;quot;;)&lt;br /&gt;
* you assign data type to the variable so you dont lose track of what it is.&lt;br /&gt;
* trace(variableName);&lt;br /&gt;
* trace(&amp;quot;long text comment&amp;quot;);&lt;br /&gt;
* function thing():void - the void means no return argument&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;function moveObj(thing:MovieClip):void &lt;br /&gt;
{ &lt;br /&gt;
thing.y -= 50;           			// mc moves 50px up&lt;br /&gt;
thing.rotation += 45;		// mc rotates 45 degrees right&lt;br /&gt;
}&lt;br /&gt;
moveObj(thing1_mc);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;function moveObj(thing:MovieClip, movement:Number, rotationAmount:Number):void &lt;br /&gt;
{&lt;br /&gt;
thing.y -= movement;           			// mc moves 50px up&lt;br /&gt;
thing.rotation += rotationAmount;		// mc rotates 45 degrees right&lt;br /&gt;
}&lt;br /&gt;
moveObj(thing1_mc, 50, 45);&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;function moveObj():Number		// the number here defines what kind of thing is returned&lt;br /&gt;
{ &lt;br /&gt;
thing1_mc.y -= 50;&lt;br /&gt;
thing1_mc.scaleY = 2;&lt;br /&gt;
return thing1_mc.y;&lt;br /&gt;
}&lt;br /&gt;
thing2_mc.y = moveObj();&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
* events must have listeners&lt;br /&gt;
&amp;lt;pre&amp;gt;myMC.addEventListener(type:String,function)&lt;br /&gt;
myMC.addEventLIstener(MouseEvent.CLICK, onClick);&amp;lt;/pre&amp;gt;&lt;br /&gt;
we are looking for a MouseEvent.SpecificallytheClick and once we hear it a function &amp;quot;onClick&amp;quot; will run&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;function onClick(event:MouseEvent):void {&lt;br /&gt;
trace(&amp;quot;its been clicked!!!&amp;quot;);&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>220.255.7.194</name></author>	</entry>

	</feed>