David Pett

Textmate: code hinting, auto-completion

Thanks to Simon Gregory for this update to the Actionscript 3 bundle for textmate. it offers auto-complete for your code. Once installed got to Bundles > ActionScript 3 > Auto Complete to enable it, and then when typing use the keyboard shortcut of option+esc to bring up the list of possible options. See his blog [...]

Read Full Post

Actionscript 3: Managing Memory

I have been doing a lot of work in trying to minimize memory and file size in my flash/actionscript projects, because of the structure of actionscript 3 most of this is a manual process. One of the first things you can do is when adding an event listener, use the optional parameters:

Read Full Post

Actionscript 3: issue with stage sizes

I’ve noticed a few issues with different browsers and not getting the stage.stageWidth property on load. To fix this I use an enterFrame to check when the stage.stageWidth property is greater than zero and the continue building the display list.

I hadn’t noticed this issue before, because I use a resize event for full flash sites or projects that expand with the browser size. I’ve done a few projects that don’t resize after the initial build, and that is where the issue lies.

Code after jump.

Read Full Post

0 Comments

Leave a Comment

Actionscript 3: Using External Assets

By using an external assets swf file, I have been able to drastically reduce the file size of my main swf file. In my external asset swf file I include all fonts and audio(sound effects). To do this, I create a swf file and make sure all of the assets have Linkage with a class name, for example a font that is used a lot, I might call “MainFont.” Once all assets are properly exported for Actionscript, Publish the swf file, and let the main swf know where it is.

Code after jump.

Read Full Post

Path Copy

I work in an office that uses network drives to hold and share files with other people in the office, many times I am asked to let somebody know where a particular file is, and many times I have had to type very long paths (which sometimes end up missing a step or two). I [...]

Read Full Post

New Site

I just moved to the wordpress platform, which so far I love. I was able to start a new theme from scratch and design how I like to design, and show what I like to show. I will try to update often with tips for Actionscript 3 and the Flash/Flex platforms. Please check back soon [...]

Read Full Post

0 Comments

Leave a Comment

Actionscript 3: Loading an XML File

XML files allow you to keep all of your data outside of your source .fla, giving you complete dynamic control of the content without having to go republish your flash file. Since most of the work I do involves an XML file, this is how i use the URLLoader Class to load the data:

Code after jump.

Read Full Post

0 Comments

Leave a Comment

Actionscript 3: Loading External Images

This is the best way I have found of loading images, catching any error that might come along. This can also be used for loading external swf files, just changing the Bitmap in the imageLoaded method to MovieClip

Code after jump.

Read Full Post

Textmate: Publishing Flash Files

A while ago Lee Brimelow posted about a way to publish flash files from textmate, but for some reason it never worked for me. Based on that method and some research into extending flash I have created a way to test your flash movies from Textmate, without switching to Flash.

Code after jump.

Read Full Post

Actionscript 3: External Variables

On pretty much every project that I do, I use an external variable or two to specify the path of a file(generally an XML file). when testing the flash movie you can use one variable and have it use a different one when embedded into the html page. To do this you use the Capabilities class in flash.system. using playerType == “External” which means testing from the IDE.

Code after jump.

Read Full Post