ActionScript 3.0

From Whirled Club Wiki
(Redirected from AS3)
Jump to: navigation, search

File:Bold text ---- Insert non-formatted text here

Icon-Programming.png

ActionScript 3.0, also known as AS3, is the programming language put out by Adobe to create Flash content. You can use AS3 both as standalone, or inside Adobe Flash CS3. You can learn more about it here.


Here are some examples of what AS3 looks like

<actionscript>

  protected function handleEnterFrame (... ignored) :void
   {
       var now :Number = getTimer();
       var elapsed :Number = now - _bounceBase;
       while (elapsed > BOUNCE_FREQUENCY) {
           elapsed -= BOUNCE_FREQUENCY;
           _bounceBase += BOUNCE_FREQUENCY; // give us less math to do next time..
       }
       var val :Number = elapsed * Math.PI / BOUNCE_FREQUENCY;
       _image.y = BOUNCE - (Math.sin(val) * BOUNCE);
   }

</actionscript>

Files with just stand alone AS3 will usually be called *.as files before you compile them, while AS3 being used in Adobe Flash CS3 are usually part of the *.fla file. Both of these will compile to *.swf.


See Also