Flash using ActionScript libraries tutorial

The educational technology and digital learning wiki
Jump to navigation Jump to search

This article or section is currently under construction

In principle, someone is working on it and there should be a better version in a not so distant future.
If you want to modify this page, please discuss it with the person working on it (see the "history")

<pageby nominor="false" comments="false"/>

Introduction

Learning goals
  • Learn how to reuse example code that illustrate features of ActionScript libraries.
  • Learn how to be able to import 3rd party packages by defining an ActionScript classpath.
Prerequisites
Environment
  • Flash CS3
Moving on
Level and target population
  • Beginners (but see the prerequisites)
Quality
  • useable, but under progress.
To Do
  • Other examples

There exist several free high quality ActionScript libraries available and that can be used by Flash designers that only possess very little programming skills.

Typical examples of such libraries are:

  • Flash 3D libraries that allow a CS3 developer to create animated and interactive 3D scenes.
  • Special purpose animation libraries like the FLiNT particle system that allows you to create stuff like fireworks and snowflakes.
  • Tweening libraries like TweenLite that allow you to define sophisticated animations with a few method calls (instead of spending hours of drawing).

Flash libraries can come in several forms (see Flash formats and objects overview). In this short tutorial we will deal with

  • .swc - compiled clips that include ActionScript code and other stuff
  • .fla - Flash CS3/CS4 source code files
  • .as - Action script code.

In this tutorial, we just will a short overview. If want to go through an example, read the FliNT particle system introductory tutorial. FLiNT is a very useful library to create very cool animations with particles flying around.

List of libraries that are part of these Flash tutorials:

Installing and using libraries

This is a short executive overview on using ActionScript libraries



A note on classes and packages

All ActionScript code that you will import is defined with classes (see the Actionscript 3 tutorials if you really want to learn how programming works.). Theses classes can then be bundled together in so-called packages which allows to organize code into discrete groups that can be imported by other scripts. E.g.

package packageName {
   class someClassName { 
   } 
}

More information about setting the Class path can be found at Adobe, i.e. here and here in the "Using Flash documentation".

More information about packages can be found in Adobe's Packages and namespaces chapter in the Programming ActionScript 3.0 tutorial which is very technical.