Uniquely Compile AS2 with JSFL - Avoiding Class/Namespace Collision between swfs ·
3 January 2010, 22:45

AS2 does not have the concept of an application domain. So if you are loading multiple child SWFs into your AS2 project, any classes that the SWFs share will be cached at their first use. The cached definitions will stand in for any following references to the class. Not always good, and depending on your project, it can cause some pretty serious issues and headaches. Need a way around this AS2 class collision issue? Me too, so I made one.

Keep Reading...


Jonathan Greene

Comment [2]

Event Bubbling in AS2 ·
13 August 2008, 21:36

Yes, we all know the numbers. FlashPlayer 9 is at 97% penetration worldwide. After a year of primarily AS3 development (not starting any new AS2 projects), I find myself working on a project back-porting AS3 into AS2. Ohhhhhh yay, what a joy! I love the screwy event model, the rigid display list, having to fake document classes, not being able to do new MovieClip(), … and the list goes on… Regardless, this is my task, and I will prevail with flying colors (are you with me?) !

One requirement to keeping the code bases similar is to implement event bubbling in AS2. I looked around for a few techniques we could implement into our ‘new’ AS2 code, but had trouble finding an example that could be added cleanly into our project. We needed something that could extend MovieClip, and allow any subclass to bubble events up their respective _parent chain. I definitely found some working bubbling techniques, mainly this one, but decided to re-familiarize myself with AS2 by encapsulating this whole bubbly stuff.

Keep Reading...


Jonathan Greene

Comment

Double Click event in AS2 ·
13 December 2007, 16:53

Some of us are still use AS2 here and there, and some of us want to be able to capture something like the AS3 MouseEvent.DOUBLE_CLICK. I wrote a simple decorator class called DoubleClickable to give a MovieClip the ability to broadcast doubleClick events.

The example below is hopefully pretty self explanatory :)

Keep Reading...


Jonathan Greene

Comment [6]

Yahoo! Maps: AS3/Flex vs. AS2/Flash ·
16 November 2007, 13:48

Given the visibilty of mapping APIs today, it is not a supprise that many of our clients are requesting mapping elements on their site. Since I am a flash developer, I hold a particular affinity for creating solutions with Yahoo! maps over Google maps.

Since the Yahoo! maps component is an AS2 movie at its core, the AS3 API essentially wraps the AS2 map and communicates with it via the Yahoo! AS3 Maps Communication Kit. While the AS3 API lets you use all the AS2 functionality, the big kicker: it requires you use the Flex framework (adding 200kb+) to your project.

Keep Reading...


Jonathan Greene

Comment [1]

Dynamically Register MovieClips in AS2 ·
17 October 2007, 00:53

I found this great little class yesterday while trolling around for a current solution to registering loaded images to their center. Darron Schall wrote this little gem a llllooooong time ago, but nonetheless his DynamicRegistration solution is very handy and clean to mix-in with your projects.


Jonathan Greene

Comment [2]

SWFAddress: Extending and Adding to a framework ·
21 August 2007, 14:19

In my last SWFAddress post, I called for all flash developers big and small to consider using SWFAddress in their upcoming projects. I dont want to just preach afterall, so I created a basic example project.

Since most of the Flash sites I build at visicswire use a small framework of custom components, my approach to incorporating SWFAddress into projects is to register my navigation components with the SWFAddress. I have also tweaked the SWFAddress source code slightly to add a handy method (will explain below).

Keep Reading...


Jonathan Greene

Comment [1]

SWFAddress: USE IT! ·
17 August 2007, 22:49

Making your Flash project utilize the back/forward browser buttons used to be a pain…. years ago. Making your project deep-linkable used to be a pain…. years ago. Tracking your user’s traffic through your Flash project used to be a pain…. years ago. There are no more excuses.

SWFAddress has been around for a while, and its a little a dissapointing to see new, all-Flash projects being released without incorporating browser button and deep-linking support. If you are interested in using SWFAddress, check out the SWFAddress site to download it and check out the example project.

Keep Reading...


Jonathan Greene

Comment