Flight Framework coming soon?

I’ve been involved with the Flight framework since its inception at mediaRAIN. I’ve helped Tyler with it via brainstorming, feedback, etc. But he’s been the one mostly to code it up. It’s been great from the beginning for a lot of our projects because it has built-in undo/redo and allows for some quite custom things along those lines. Well, Tyler went in another direction with it for awhile, wanting to please everyone, taking out Singletons and such for example, and mediaRAIN forked it into a project called Nimbus. I will probably be helping out with both as I can. Flight is now coming in from the wings more with their changes and it looks like quite a solid and complete framework, even if I didn’t need undo/redo. I’ll have to try it out with Layered Content as I upgrade the admin.

How to listen to Flash events that don’t bubble

I learned a little trick the other week and thought I’d share. Sometimes you might need to listen to a non-bubbling event “up the chain” somewhere, but of course, since it is not bubbling, that can be hard. The trick is that event events that don’t have bubbling still have the capture phase, so if you flip that capture flag to true in the event listener then you can now listen to any events dispatched by any child views whether they are bubbling or not. Example:

 // listen for some event (this one is even custom) that does not bubble // make sure to set true on capture stage.addEventListener("customNonBubbling", myListener, true); ...
<mx:Button id="myButton" click="dispatchEvent(new Event('customNonBubbling'))"/> 

Note: this only works on display objects as far as I know. Capture and bubbling don’t apply to objects that are not on the display list.

Flash Project Timer

A project timer is something I have been needing. I have trouble keeping track of hours for projects I have. I usually don’t worry about time traking for my personal projects, which is good because if I thought about all the time I’ve spent (wasted), I might take up a new hobby. But for contract work and for projects at mediaRAIN, I need to keep track of time I spend on each project. I always forget to write something down at the end of the day, and usually can’t remember how long I’ve spent anyway. So, I made a project timer. It actually is built in Macromedia Flash, and made into a nice executable using mProjector. I have yet to start using it for my projects, but it seems to be working pretty well. I thought I would share it in case anyone else needed something like this. It only works on Windows right now, but mProjector can make executables for Mac, so I’ll look at doing a Mac version soon. I used to have a screenshot of the app here. However, it’s flash, so why don’t I just put the swf up? Pretty small, unobtrusive, and hopefully usable. To use, click on the world icon, enter in a new project, hit enter, and then click the green play button to start timing. You can add as many projects as needed and choose them from the drop down that appears when you click the world icon. The timer also minimizes to the system tray. You can make it stay on top of all applications from the right click menu, as well as close it down from there. It doesn’t use the registry or create any files of it’s own. It only uses the Flash SharedObject (which is basically a cookie for Flash). Also, if it works the way it should, you can look at a projects total time, the time for the current day, current week, current month, or even a custom time period. When you click custom, it will ask you for a start day. You can also put in an end day by adding a dash and another full date (e.g. “14/11/2005-18/11/2005”). You may download the following: flash_timer-mac-0.1.zip flash_timer-win-0.1.zip Hope it helps!

AMFPHP 1.0 Ready

AMFPHP (Flash Remoting written in PHP) has hit a stable version 1.0 release! I’ve been looking forward to this for a long time.

Flash Remoting is a method of transfering data to a Macromedia Flash Movie. It sends it in binary format and is much easier to use as it arrives in an object form, meaning, you don’t have to sort through the child nodes of an XML object. I have been using AMFPHP for over a year on several projects (being one of the main backend developers in my company, mediaRAIN) to send stuff. I created the logo storage of LogoMaker/InstaLogo using AMFPHP which handles, and I quote, “a lot.” Actaully, in July we got 4.4 million posts to the remoting service. I suppose that’s on average almost 100 a minute! We’ve also used remoting in several other applications.

I’ve been pretty pleased just with the ability to pass data back an forth from Flash to PHP. The only things that bothered me was the beastly methodTable array the PHP service needed and the design issue in which your Flash objects are converted into associative arrays in PHP rather than PHP objects. The methodTable is now created using reflecting and JavaDoc style documenting (very nice) and as for the array vs object issue, well, I made a hack for that myself in our version of the remoting. Associative arrays are “more natural” in PHP, and you can use the methodTable to define custom object types. Well, not recursively, however, you can now be able to associate a PHP class with a Flash class in version 1.0. Really nice feature. Kudos to all of those who have helped develop PHP remoting for Flash. You can see all of the new features in 1.0 yourself, but it’s faster, more organized, more features, and the whole bit.

Pherret currently can be integrated with Flash Remoting and will have full support as an extra module. mediaRAIN is all about Flash, so of course I had to take that into consideration as I built Pherret. But you have a truer Model View Controller (MVC) system when you can use different views (HTML or Flash) or controllers and the same model.

« Previous Page