Jump to content

What are the most powerful aspects of ActionScript?

MaryO's Photo
Posted Dec 11 2009 12:25 PM
5006 Views

What are the most powerful aspects of ActionScript?

Tags:
0 Subscribe


2 Replies

0
  DaveOnCode's Photo
Posted Dec 14 2009 12:31 AM

The last release of Actionscript (AS3), is a powerful object oriented programming language. This means you can create new classes, extend classes, create and implements interfaces, define the type of a variable (number, string, array...), organize your code into packages and much more. AS3 offers a rich set of classes and tools to work with vector graphics, XML, sound (you can read and play mp3 and access ID3 info), net streams and more.
Actionscript is the core behind Flex, if you want to work on a project based on Adobe Flash (which has an swf as output) you definitely should learn and use it!
0
  florian.salihovic's Photo
Posted Sep 22 2010 01:48 PM

Perhaps a litle late, but this might be helpful for others as well.

Next to the aspects already mentioned, there are some points i'd like to point out.

  • Function are first level member and are bound via closures to a scope. This allows you to bind a method at runtime to a class. ActionScript know two kinds of closures: method closures (methods which belong to an instance or class) and function closures (function not defined in a class, but in a namespace)
  • ActionScript is a nonblocking API which forces the developer to write event driven code. This might seem a bit complicated at first, but as soon as the developer got the idea, writing data driven applications will be easier. As an example: data can be loaded in small chunks and the flash application will stay responsive. On the other hand, keep in mind that the flash player is a single threaded vm which. Loaded a huge amount of data will force the vm to compute the data. As a result you'll have a freezed and non responsive application. The event driven approach is realized by Function
  • Native support of XML: this allows an easy access to nodes of xml documents/data. It is by far more easier to read and understand, and of course less complicated then DOM, SAX and other parsing APIs for XML.
  • Namespaces: ActionScript offers a string support for namespaces. Packages are one kind of namespace, XML uses a specific type for namespace bound nodes but there is also the possibility to bind members and method to different namespaces. Think of the visibility modifiers in Java. We have public, protected and private. These are modifiers in ActionScript as well, but since in ActionScript those are namespaces, you can define your own.


I hope this is helpful. Best regards from Germany