Archive for August, 2008

AMFPHP – Server interaction with ActionScript

AMFPHP logoAll of the blogs i follow concerning flash, actionscript and future web technologies have now looked into AMFPHP so why should`nt I. AMFPHP is a open source implementation of the Actionscript Message Format(AMF). This message format lets you send native types and object to and from a server because the AMF allows for binary serialization. What this means is that you can have a folder on your server with AMF installed, create some PHP-files with your request methods and your server is done. The only thing now is to write a few lines of actionscript to connect to your server and your server interaction is done.

I will be back to write a tutorial on this matter so you hold on… or just go to Lee Brimelow`s second part of his AMFPHP video tutorial. Also check out their site.

Have fun!

Loading external resources into Actionscript 3

Images and flash movies(swf´s) are loaded into flash in a standard way, but when loading more than one image troughout your solution the handeling can be tough to manage in a good way. The standard way in loading resources is by using the Loader class and using the load method with the url as parameter. Here is an example:


var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onComplete);
loader.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressLoaded);
loader.load(new URLRequest(url));

When I create a movie I allways create a representing class to handle all loading of extenal resourses. The main reason is to not have to add the required Read more »