Namespace in ActionScript 3.0

In general Namespaces allow for group entities like classes, objects and functions under a name. In ActionScript 3.0, Namespaces works like namespaces in an XML. It allows for the control of the visibility of class members.

How to declare Namespace?

namespace ;
@ function @
Read the rest of this entry »

Polymorphism in ActionScript 3.0

The term Polymorphism describes multiple possible states for a single property. And for the computers geeks, programmers, coders in us describes it as “a mechanism allowing a given function to have many different specifications, depending on the type(s) to which it is applied”.

More aptly in the world of OOP, Polymorphism is extensively used in an Inheritance relationship. It may not be wrong to point out that Polymorphism in ActionScript 2.0 was not as clear as it should have been. With ActionScript 3.0, it is being clearly demarcated with the keyword Override.
Read the rest of this entry »

Access Modifiers in ActionScript 3.0

The Basic Access Modifiers are

  1. internal
  2. private
  3. public
  4. protected

internal is the default access modifier which is used if no other modifier is specified. It allows internal access and package-level access. Unlike in ActionScript 2.0 where it was treated as public, internal is not public but internal by default in ActionScript 3.0.

private is strictly private in ActionScript 3.0. Private is the most restrictive access modifier. It only allows internal access to members and it does not allow package-level access nor access from subclasses.

public is the least restrictive access modifier and thus allows access from anywhere.

protected allows internal access to members and access from subclasses but restricts package-level access.
Read the rest of this entry »

Unique, Random, Serial Movies, Image Loader

While doing a randomizer for our splashes, we decided to get this out to the public and make it open for people to use it. This is a Flash SWF or an Image Loader spiced with the ability to load a default SWF or a random/serial from a list listed in an xml nodes.

The SWF/Image Unique, Random, Serial Loader will try to load an SWF or an Image either randomly or in a serial order. In order to get to the next or a random SWF, the mother Splash looks up for the splashes with the method splashDone();. Thus all splashes will need to called the method _parent.splashDone() for this example to work. In the case of an Image, it is considered single frame and thus the method is automatically called. One may be able to customize the SWFs or the images in the splash.xml available in the download.

The SWF is published to version 6 to attain high compatibility with browser-flash-plugins. Coded in ActionScript 2.0 and adorned with Model View Presenter pattern. Well, you might as well look at it as a simple MVP sample.
Read the rest of this entry »

Flash Player 8 – ExternalInterface

Pre Flash Player 8 Era

In the times before the dawn of the Flash Player 8, Flash-Javascript communication, interaction was done with methods like, SetVariable and GetVariable. The technique however is not that browser-proof in some cases, and is a bit slow too. Nonthless, with the release of the Flash Javascript Integration Kit, it makes it possible to somehow seamlessly communicate between Flash and JavaScript. You can call JavaScript functions from Flash, and ActionScript functions from JavaScript.

In the time of Flash Player 8

Then, came Flash Player 8 and specifically ExternalInterface class; flash.external.ExternalInterface which extends Object. Now the entire approach of Flash-Javascript communication is realizing to a new awakening. The ExternalInterface enables straightforward communications between ActionScript and the Flash Player’s contrainer (for instance, the HTML page with Javascript or a C#, C++ or a Java wrapper). We can safely say that the olden days method of FSCommand() is replaced.

ActionScript – JavaScript

  • to invoke custom ActionScript functions from JavaScript and vice versa and that too with a much cleaner API
  • pass primitive (number, boolean, string) or complex (array, object, etc) data between ActionScript and JavaScript
  • function calls are synchronous and makes you feel as if you are invoking the functions withing same scripting engine (if you invoke a JavaScript function from ActionScript you get the return values instantly, same is true if you invoke ActionScript function from JavaScript).
    Read the rest of this entry »

Professional CSS: Cascading Style Sheets for Web Design

Professional CSS: Cascading Style Sheets for Web Design is not just a book on CSS for professionals – intermediate to advanced designers and developers but far more than that. Irrespective of the Professional tag there in the title, this book would still be useful for beginners and can in fact upgrade them to another level.

The nice part of this book was that I could refer to the screenshot diagrams alongside the codes. The emphasis laid out on the Separation Of Content and Design through techniques that are semantic, well-structured markups proved to be effective yet simple, clear-cut and to-the-point. Accessibility too, is taken care of.
Read the rest of this entry »

Oinam Blog at MXNA

The Oinam Software Blog is now being officially accepted and aggregated by MXNA.

Flash 8 File Upload Download

We have completed an example of one of the new feature in Flash Player 8, the File Upload/Download – FileReference. The current demo have a parameter to control the MAX size of the individual files that can be uploaded. This value is changeable via the FlashObject variables in the SWF embedded html. The current demo is also configured to save the uploaded files to a directory, “userUploads”.

Read the rest of this entry »

Oinam Blog

July 22 is the official beginning Oinam Software – Research, Analysis and Development, Service Company. Henceforth, this date/day will be celebrated as the birthday of Oinam Software. To commemorate the anniversary, Oinam Software is releasing its blog today, the 22nd July, 2005.

Next Entries »