Skip to content

Macromedia Components & Object.prototype Don’t Get Along

In most of my flash projects I have a prototype file I include into the project. It contains additions to core objects such as Object, MovieClip, etc. Well, today I found out that some Macromedia components (ComboBox was the one I was having trouble with) don’t like additional methods to be defined on certain classes (Object was the one I found that ComboBox was having issues with); they fail to continue to work with additional methods defined. However, there is a workaround: ASSetPropFlags. Simply hide all additional methods with this line of code: [code lang=”actionscript”]ASSetPropFlags(Object.prototype, null, 1);[/code] I can’t wait until AS3 can be used all the time.

Continue Reading

Flash & Fonts

I’ve written about the pains of fonts in flash before; and it something that still plauges my work today. However, since that post new tools have been created, new workflows introduced, and with that some new findings. Fonts With SWFMILL SWFMILL is an awesome tool that may allow you to leave the Flash IDE untouched for some projects. However, embedding fonts seems to be scarcely documented (I had trouble getting the methods documented working). Here are the two links I’ve found that document embedding fonts with swmill: Adding fonts to your SWF with FAMES Using SWFMILL I wasn’t able to get embedded fonts working using the information above, so here is my method. This is what my swfmill xml looks like…

Continue Reading

AttachMovie & Loaded Clips

Using attachMovie when you’ve loaded other clips into your movie has always been very painful. You can’t attachMovie a asset into a loaded clip that is located in the parent movieclip, and conversly you can’t attachMovie a asset in a parent that was loaded into a child. This is extremely frusterating… but after some searching today I came across this interesting link. Using the fact that Flash likes to cache everything it can, he created a function that will load an clip that contains an asset into the movieclip you are trying to use attachMovie from. Nice idea, never thought of doing this before…

Continue Reading

Adding Methods to Core Flash Classes

Every once in a while I get an email that looks like this: I tried using your Object, Function, and String method additions. When I tried to compile I get a bunch of error messages! What do I do?! Yup, this is because the method definitions are not in the Class definition files that flash looks at when compiling. The core class definitions that Flash looks at are located here: [code]~/Library/Application Support/Macromedia/Flash MX 2004/en/Configuration/Classes[/code] That “Classes” folder will contain all the method definitions for all core Flash classes (MovieClip, Object, Button, Color, etc). To make my method additions compile correctly you’ll have to edit the corresponding Class definition files and add the method definitions in…

Continue Reading

XASH 1.2

XASH 1.2 has just been released. This release has the following enhancements. Fixed a nil URL bug Added live (itunes-like) searching Some code cleanup/reorganization Added drag n’ drop for adding additional search paths Added the sparkle update framework Enjoy! If your a Cocoa developer you may want to check out XASH’s source code, it has a nice implementation of enabling a NSTableView to have a drag n’ drop capabilities while still using NSArrayController to populate the table.

Continue Reading

XTrace: Flash Debugging Without The Flash IDE

XTrace 1.0, a replacement for the horrible trace window in the Flash IDE, was released a few days ago. Take a look at the product page for more information on how it works and how to integrate it into your flash application. This is one of the pieces to the puzzle, I’ll release the BASH script I’ve written that allows better MTASC Xcode integration as soon as possible. I need more beta testers for the new application I’m going to be releasing, email me if your interested!

Continue Reading

Random Tid Bits

Heres some programming tid bits that really didn’t deserve their own post, so I grouped them all together into one post! 😛 else-switch We all know about the common else-if language construct that is available in almost all programming languages, but here one you might of not been aware of: the else-switch statement. [code lang=”javascript”] if(false) { } else switch(number) { case 0: //do something break; case 1: //do something else break; default: //do default action } [/code] Actually, you can follow if with any control statement. For instance, you can have an else-return or an else-break statement. This might be old news to some programmers, but I never knew you could do that!..

Continue Reading

NaturalDocs

A few weeks ago I was searching around trying to decide what documentation system to use in my Actionscript/Flash projects. There are alot of options out there, but these are the ones that I found viable for my situation: as2api AS2Doc VisDoc NaturalDocs As2api: overall as2api seems like a good solution but I really didn’t like the style of the documentation as2api created and the os x binary didn’t seem to work on os x. AS2Doc: looks like a good package, but it costs money; I cant see paying for something that has a free alternative which has very similar functionality. I’d rather donate to an open-source project. VisDoc: looked really nice- exactly what I was looking for, I was very close to buying it until I saw NaturalDocs…

Continue Reading