Password Generation in AS2

| 1 Comment

You knew this was coming... I've updated the Password Generator to ActionScript 2. The .fla for this is really sweet - it contains only these 3 lines of code and the UI components in the library so we can attach them at runtime:

import com.darronschall.PasswordGeneratorUI;

// change the color of all of the UI elements to dark blue
_global.style.setStyle("themeColor", 0x000066);

/* the magic of creating the ui happens here, when the class constructor
is executed */
var UI:PasswordGeneratorUI = new PasswordGeneratorUI(this);

The interface is created 100% dynamically by the PasswordGeneratorUI class. For the Java programmers out there, here is a "real-world" example of how you can apply your knowledge to Flash. The only thing I did in the Flash IDE was set the document size and populate the library with the components the class needs. Everything else is done in the 2 class files. Once you learn some of the syntax quirks of AS2 and how the UI components work, it shouldn't take too long to start being productive if you're comfortable with Java.

This just goes to show how developer friendly the new version of Flash is... You can download the new Password Generator here.









1 Comment

this is a nice work :)

Leave a comment



About this Entry

This page contains a single entry by darron published on September 15, 2003 10:23 AM.

Engaged! was the previous entry in this blog.

Object.prototype.someMethod is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Archives

OpenID accepted here Learn more about OpenID
Powered by Movable Type 5.02