Archive for March, 2008

New Video Tutorial on Binary Socket Fundamentals

I just finished uploading a new tutorial to gotoAndLearn() which shows you the basics of using binary sockets in ActionScript 3. In the example I connect to POP3 mail server and use raw commands to retrieve messages. These techniques can be used to connect to a whole range of different servers such as FTP, IMAP, Telnet, etc. Socket programming can get extremely complex but the basics are nothing that any interactive designer can’t handle easily. Here is the POP3 command reference that I used in the tutorial.

Enjoy the tutorial!
Lee

New Video Tutorial on Papervision3D 2.0 Interactivity

I just uploaded a new tutorial to gotoAndLearn() that shows you how to use Papervision3D 2.0 to create an interactive cube like the one shown below. You use your mouse to spin the cube and clicking on one of the faces will launch the corresponding website. This is using the GreatWhite branch of Papervision3D so make sure you have the correct classes before trying it out.

This text is replaced by the Flash movie.

Have fun!
Lee

Coming to FITC Toronto in April?

I know I am. This will be the first time that I will be attending the original FITC conference in Toronto. The session that I am giving will be an updated version of the AIR Conditioning presentation that I will be doing on the European AIR tour. Luckily this time I am not opposite Jared Tarbell so I can actually see his presentation. The speaker list contains a who’s who of the Flash community with names such as Natzke, Davis, Moock, Skinner, etc. The conference takes place April 19th thru the 22nd at the Hilton Toronto. Hope to see you there!

Lee

New Layers Magazine Article on Random Sound

Just got the March/April issue of Layers Magazine in the mail. I wrote a tutorial on using random number math to play random sounds in ActionScript 3. This will be very basic for regular readers of this blog but the article came out nice nonetheless. This issue also features “100 Blazing Hot Tips” for the Adobe Creative Suite. There are some nice Flash tips from Marcus Geduld in there for you too.

It should be on newsstands now or very soon. Hope you like it.

Lee

FlashForward 2008 is Coming to San Francisco!

Yes that’s right, the original Flash conference is back and is set to take place August 20-22 in San Francisco. The conference is now being run by Beau Amber from Metalliq and I’m really excited that it will live on. Lynda has done an amazing job over the years and it is the conference that I credit for getting me so into Flash. Winning a Flash Forward festival award is still the highlight of my career.

Look for more details soon as they become available. I’m also happy that I don’t have to travel to attend!

Lee

Attention Europe: Register Now for AIR Tour!

Mike Chambers just sent over a note with the current registration numbers for the European AIR Tour. The current rankings are below. London is in the lead and Brussels is currently in last place. What’s going on Belgium?

  1. London
  2. Paris
  3. Amsterdam
  4. Madrid
  5. Brussels

We really need you guys to spread the word as we can only come to Europe to do events if they are well attended. Trust me you will have fun!

Lee

Tips On Reading Decompiled ActionScript Code

In the last post I mentioned the decompiler from Sothink that completely decompiles ActionScript 3. The results of the decompilation can often be a little tricky to read if you don’t know what to look for. Below is a decompiled AIR SWF that simply creates 10 native windows every second. In the FLA all the code is on frame 1 of the timeline. See the resulting code dump below:

[as]package chrome_fla
{
import flash.display.*;
import flash.events.*;
import flash.utils.*;

dynamic public class MainTimeline extends MovieClip
{
public var backdrop:MovieClip;
public var t:Timer;
public var closer:MovieClip;

public function MainTimeline()
{
addFrameScript(0, frame1);
return;
}

public function doMove(param1:Event) : void
{
stage.nativeWindow.startMove();
return;
}

public function makeWin(param1:Event) : void
{
var _loc_2:NativeWindow;
_loc_2 = new NativeWindow(new NativeWindowInitOptions());
_loc_2.width = Math.random() * 200;
_loc_2.height = Math.random() * 200;
_loc_2.x = Math.random() * 1024;
_loc_2.y = Math.random() * 768;
_loc_2.visible = true;
return;
}

public function doClose(param1:Event) : void
{
stage.nativeWindow.close();
return;
}

function frame1()
{
closer.addEventListener(MouseEvent.CLICK, doClose);
backdrop.addEventListener(MouseEvent.MOUSE_DOWN, doMove);
t = new Timer(100);
t.addEventListener(TimerEvent.TIMER, makeWin);
t.start();
return;
}
}
}[/as]

The first thing that you will notice is that the code is inside of a class that extends MovieClip. This is the document class that gets generated behind the scenes. All of your timeline code gets included into this class when you compile. You can see on line 13 the constructor for the document class. Inside of it there is a call to the addFrameScript function. This references what from number it is on and also the name of the class method containing the code. Pretty cool stuff!

Certain things like local variables and parameters lose their original names so you will see names like “_loc_2″ in their place. Pretty easy to figure out though once you get the hang of it.

Viewing Flash ActionScript in this way is a great learning tool for what Flash actually creates when you create timeline scripts. Unfortuantely this tool only runs on Windows but you can use Parallels or VMWare to get it on the Mac.

Lee

Next Page »