Using addFrameScript

December 22nd, 2008

addFrameScript is a function that allows you to add actionscript to a specific frame (never would have guessed…). You need to pass in 2 parameters, the first is which frame you want to add the script on and the second is the function that you want to trigger on that frame. Now here is the pain with it, the frames start at zero. So if you wanted to put a script on frame 10 you would reference it with :

addFrameScript(9, myFunction);

So it can be a little tricky at first, but once you remember how to reference the frames it can be a very handy little function.


Structure Creator 1.1.3 Released

December 18th, 2008

A while ago I posted about a plugin for Flash that creates a folder structure for flash projects. Well I have just uploaded a new version with quite a few bug fixes. It is available at http://code.google.com/p/flashstructurecreator/


25lines finalists

December 17th, 2008

Here are the finalists of the recent 25 lines competition.
http://www.25lines.com/?page_id=139

They are really impressive. You are able to view the code for each entry as well.


Flash Project Structure Creator

November 17th, 2008
Structure Creator

Danny, Shang and I have been creating a flash extension which creates the project structure for a flash project. The default structure is setup for web projects however the schema is customisable using a simple xml format. Using the default schema it will generate a project with swfobject and swfaddress and create the html file for the flash to display in.

It’s a very handy plugin which speeds up the workflow when creating flash projects. It works in both Flash CS3 and CS4.

If you have any suggestions about what should be included or changed in this plugin, please leave a comment. I’d like to hear some of your feedback on it.

It is available at google code.


Using Pixel Fonts in Flash

September 10th, 2008

When using pixel fonts in Flash sometimes you will notice that the text appears slightly blury. The reason for this is that all textfields with pixel fonts need their possision to be at whole pixels. This means that if the textfield’s x possision is at 100.3 and y is at 100.8 then the font will appear fuzzy. all you need to do is round these numbers off. So the new possision of the textfield will be x=100 and y=101

If the textfield is inside a movie clip you need to make sure the possision of the movie clip as well as the text field are rounded off.


2 Great Firefox Plugins for Web Developers

August 25th, 2008

If you are web developer then there are two plugins for Firefox that are a must.

The first is the Web Developers Toolbar.

The toolbar adds many menus that aid in the development of websites. You can enable and disable JavaScript, images, CSS and cookies. You can also resize the window to show how a site will look on different screen resolutions plus a whole lot more. The toolbar also works on Flock and Seamonkey, and runs on any OS that can run these browsers such as OSX, Windows and Linux.

The other great plugin that I really love is Firebug.

“You can edit, debug, and monitor CSS, HTML, and JavaScript live in any web page” - Firebug.

There’s a great part of this plugin that I use, which is the Inspect Tool. Have you ever made a site and wondered why your div is a few extra pixels wide? With Firebug you can identify the problem with ease. It displays the width, height, padding, border, margin and offset of each element in the page so you can see why your page isn’t displaying properly. Plus you can edit pages on the fly so you can see how they look straight away.

These are really fantastic plugins. So a big shout out to Chris Pederick for the Web Developer Toolbar, and to Joe Hewitt, Rob Campbell and Justin Dolske for Firebug.


I’m A Dorky High Nerd

August 23rd, 2008


NerdTests.com says I'm a Dorky High Nerd.  What are you?  Click here!


Searching through arrays

July 7th, 2008

This works in both actionscript 2 and actionscript 3.

To search an array starting from the first position in the array we use:

for (var i:int = 0; i < myArray.length; i++)
{
   ...
}

Where you would change myArray with the variable name of your array.

But what if you wanted to search through the array from the last item? Well the easiest way of doing this is by using:

for (var i in myArray)
{
   ...
}

Now you know. And knowing is half the battle. - G.I. Joe


The Holy Bible of Actionscript 3.0

June 27th, 2008

Everyone should rush out and buy Essential Actionscript 3.0 by Colin Mook. It is a really great resource for actionscript programming with the new AS3 code. I actually managed to get this book free from Colin’s Actionscript 3.0 From the Ground Up Tour when he came to Singapore. All I had to do was answer the question ” can anyone name a text adventure game?” I called out “ZORK” and from that got a free book. Sometimes being a retro gamer pays off. I have had a good look through it and its really helpful for learning actionscript 3.


Do I need to make an AIR app?

June 11th, 2008

When creating RIA’s on the net and you start thinking if you should make an air app as well, for users to use through their desktop. Think before you act! Do I really need an AIR app? How can making an AIR app improve the experience? Am I able to use the added capabilities of AIR such as drag and drop?

Now don’t get me wrong I’m all for Adobe AIR, however I just think that you need to think what would the benefits be of creating an AIR app instead of just running it though the browser. If your product is able to take advantage of then go for it. If not, then there is really no point of making it.