simpleas3

You've been given a few common tasks to complete for a Flash project. First, you need to load an image. Next, you need make it clickable like a button. Finally, you need to open a webpage when it is clicked.

Here's how you should it in standard ActionScript 3.0:

var imageLoader:Loader = new Loader();
this.addChild( imageLoader );

var request:URLRequest = new URLRequest( "images/button.png" );
imageLoader.load( request );

loader.addEventListener( MouseEvent.CLICK, imageClickHandler );
function imageClickHandler( event:MouseEvent ):void
{
	var request:URLRequest = new URLRequest( "http://www.example.com/" );
	navigateToURL( request, "_self" );
}

Now, take a look at how you can do the same thing with SimpleAS3:

var loader = this.loadChild( "images/button.png" );

loader.onClick(function()
{
	getURL( "http://www.example.com/", "_self" );
});

Which do you prefer?

Download SimpleAS3 and make ActionScript easy again.