Archive for the 'ActionScript' Category

Adobe drops restrictions on SWF, FLV formats

mikechambers May 1st, 2008

As you have probably seen, Adobe has dropped the licensing restrictions on both the SWF and FLV file formats. Among other things, you can know use the formats to create players that read in the formats.

Check out Ryan Stewart’s weblog for more discussion

We have also put up a site with some information, which includes a FAQ.

You can also download the specs:

initializing for loop counter outside of loop in ActionScript

mikechambers October 23rd, 2007

Continuing my series of posts of interesting, but not too useful ActionScript tips (which I learned from studying Objective-C), did you know that you dont have to initialize your counter variable within a for loop.

For example, this is perfectly valid:
Continue Reading »

Using Bitwise XOR to exchange variable values in ActionScript

mikechambers October 22nd, 2007

I have been studying some Objective-C in my spare time, and was reading up on Bitwise operators tonight. I came across a simple way to exchange the value of two variables using the Exclusive-OR (XOR) operator that doesn’t require creating a temporary variable.

Normally, if you wanted to exchange the value of two variables, you would have to create a temp variable to store values temporarily (which uses additional memory). For example:
Continue Reading »

Handling Flash File Uploads with .NET

mikechambers August 6th, 2007

Denis Sosnovtsev has posted a really useful blog post over on the atellis labs site. The post shows how to upload files from Flash to a .NET backend. The example includes both ActionScript and .NET / C# code snippets.

You can view the entire post here.

You can also view Mark Piller’s session from the on AIR Bus tour on integrating .NET with Adobe AIR applications.

Know any other good ActionScript / .NET resources and tutorials? Post them in the comments.

Serializing File Reference Instances in Adobe AIR

mikechambers June 22nd, 2007

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:
Continue Reading »

Open Source Amazon S3 ActionScript Library

mikechambers May 30th, 2007

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

mikechambers May 25th, 2004

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

mikechambers April 23rd, 2004

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

mikechambers March 29th, 2004

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?

mikechambers February 25th, 2004

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).

Next »