Archive for the ‘ActionScript’ Category
Serializing File Reference Instances in Adobe AIR
In one of the projects I am working one with the Adobe AIR bus tour, I had a need to serialize instance of File class to the file system. Normally you can do this with File.writeObject(), but as the player serializer / de-serializer does not know about the File class, this would not work for me.
I came up with a simple solution that I wanted to share. Basically, you need to extend the File class and provide the meta data for it to tell the player how to serialize and de-serialize the class. This will then allow it to be serialized to the file system.
Here is the code:
Read the rest of this entry »
Open Source Amazon S3 ActionScript Library
Christian Cantrell has released and open sourced an Amazon S3 ActionScript 3 Library. This can be used to send and retrieve items to an from the Amazon S3 storage service from an Apollo application.
We posted a video of Christian showing of an appliction that uses the API a couple of weeks ago.
You can find more information here.
Excluding Classes from being Compiled into SWF
Did you know that you can exclude ActionScript classes from being compiled into the final SWF? You may want to do this to decrease file size, but still have the classes avaliable for type checking.
You can find out how to exclude classes from being compiled here.
Colin Moock’s Essential ActionScript 2.0 Chapter Online
We have posted a chapter from Colin Moock’s forthcoming tome on ActionScript 2, titled Essential ActionScript 2.0.
You can read chapter 2, “Object Oriented ActionScript”, here.
You can find more information on Essential ActionScript 2.0 from here.
MXNA Sample Application Source Code Released
Just a quick fyi, we have posted the source code for my MXNA sample application.
You can view the app, read some info, and download the source code from here.
Challenge : Search engine in 4 lines of code?
I was just reading this article about the closing of WebMonkey. One of the things they mentioned were “stunt journalism” articles where they would do things such as write chat engines, or search engines in four lines of code.
Hmm… pretty interesting. So, knowing the ingenuity of the Flash community, I thought I would see what you could do. So, lets start off with something easy, can you create a search engine in Flash in 4 lines of code or less? If so, post the code in the comments (you can use any components included with Flash MX 2004 Pro).
Atom ActionScript Class v.22
Just a quick fyi. I have updated my ActionScript 2 Atom class.
You can find more info on the latest changes, and well as view the class here.
W3CDateTime ActionScript Class
As part of the ActionScript 2 Atom class that I am putting together, I have created an ActionScript class that represents a W3CDateTime string. This is the format that Atom uses to represent dates.
A beta of the class and simple usage example is included below. If you have any questions or suggestions (especially parsing optimizations), or find any bugs, please post them in the comments.
Atom Feed ActionScript 2 Class Alpha
I am putting together an ActionScript 2 class to represent and parse Atom feeds. I have put together an early alpha version of the class, but wanted to get some feedback on it before I continue work on it.
EventProxy.as : Proxying Events
One of the issues I ran into while building the MXNA WebService example app, was that both the ComboBox and DataGrid both broadcast “change” events. This meant that I could not have a separate function to listen for each event (and have the functions run within the scope of the feedView class).





