Tuesday Write Up
I went down to the Flash on the Beach 08 conference yesterday, here’s some of the notes that I wrote up on the train back:
Creating The Next Generation Happy Meal Toy
Julian is lead Developer for Fuel Industies, a creative agency that worked on a large scale campaign for the fast food chain McDonalds. The project was a rich multimedia experience centred on magical fairies and dragons. The application was delivered on CD which was bundled with Happy Meals. The campaign proved very successful pushing over 80 million units in 30 countries. He began his presentation with a brief overview of the product (marred somewhat by the fact the projector was not playing ball and he had to show it to the audience from the screen of his 15” Macbook).
Julian’s project had several key requirements which were taken into consideration during the initial planning stage:
- App. must be Cross Platform (Win32 and Mac OS)
- Installed from a CD, with no internet access required
- Handle multiple windows (for performance) and alpha transparency
This ruled out Adobe Air 1.0 as it can’t be installed solely from a CD, it also has issues with full frame transparency. As a result they settled on a mixture of MDM Zinc 3 and mProjector. They also used Install Builder, which is a Cross Platform (Win32, Linux and Mac) installation creator. Their main Flash tools were FDT and Eclipse, they made use of SVN and constructed a couple of custom tools in C# using WPF on Win32
Julian’s team ended up building most of their application in ActionScript 2, Julain cited this was because of a lack of a mature ActionScript 3 development environment when the project was started in the summer of 2007. They used SVN to keep code versioned, Mantis to track bugs and took advantage of an automated build process to get the builds out to testers. They also kept Excel spreadsheets for each library asset which detailed file locations, settings (offsets, alpha, and compression ratios for all Cell animations, sounds and linkageid’s, etc.
The team made use of JSFL, which can be used to create custom scripts inside Adobe CS Applications – one such example was the ability to apply an affect to the selected symbols in the Document’s Library.
Their major testing problem was performance bound – using fullscreen alpha transparency bought things to a crawl and meant click events went unnoticed on slower machines – as a result they split the animations down into separate transparent windows which moved across the stage (the user’s desktop). They used LocalConnection calls to get these panels to talk to each other and sync up.
Although the project appeared to go smoothly and was obviously successful, Julian did admit to one major failing. In the time between sending the CD’s off for pressing in China and the returned product – Mac OS X 10.5 shipped – and unfortunately, their application did not work on it – whoops.
Adobe Town Hall Meeting
Richard Galvan, Mike Downey, Paul Betlem, Lee Brimelow and Matt Millar.
The second talk of the day consisted of 5 members of the Adobe Team – 3 platform evangelists and two Flash Player engineers. The group asked questions asked by the audience. I managed to ask a question in the session:
“The company I work for are currently porting a large scale AS2 project to AS3 and were disheartened by the lack of support and tools made available by Adobe to assist in this. By using the Proxy class we have managed to create shims for most the intrinsic AS2 classes, but I Would like to know why Adobe did not do this and release it to the community.”
Their reply wasn’t what I was hoping for (but was to be expected). I was told that Actionscript 3 was designed to target new customers and that they wanted to add as many features as possible to the language. I’m not quite sure what to infer from this seeing as AS2 obviously had a massive user base. The group did, however, acknowledge that the lack of community support in the transition from AS2 to AS3 was a problem (although, again, made no indication that any tools would be forthcoming) . They rounded off my question by assuring that ASVM1 Content (AS1 and 2 SWFs) would continue to be usable in Flash Player releases in the future.
Another interesting question that was asked was about the support for Dynamic Runtime Languages to script the published flash applications and allow greater control at runtime. The team responded by saying that a new project – FLACC (FLAsh C++) is in the works which will allows C++ code to run natively inside the Flash Player. This could lead to other language interpreters being made available and will prove a very powerful tool for ActionScript developers.
Adobe also confirmed that Flash 10 is being worked on for the iPhone – but Apple has not confirmed it will be approved. Flash Player 10 will include the new unloadAndStop() method to help with Garbage Collection when unloading external content in the Player and that there is no AS4 on the cards – instead they will work on improving AS3 whilst pushing ECMAScript 4 forwards (they hinted that Private Constructors might be coming back)
After the Session I spoke to an Adobe Flash Player engineer, Matt Millar. I told him about our Library Linkage Problem where Child Objects placed on the stage in frame 2 (or greater) are not linked to the Display Chain on the first tick. Whilst I was asking this question, another developer stepped in and claimed it was a major problem for his team. I gave Matt my business card and the told me he would be in touch – I’m hoping that this will be fixed before FP 10 is released, but I am not holding my breath!
Things every ActionScript developer should know.
Grant is a well revered programmer in the ActionScript community, his Blog provides an excellent resource and he heads up his own development team. Grant’s talk was aimed at developers of all skill levels, but focused mainly on the grass roots. Grant gave an interesting presentation which, in his words, he wished someone had given to him 5 years ago – I’m not sure I can agree it was as life changing as Grant made out – but that may be in part due to the best practices which Mind Candy’s dev team strives towards ;)
Grant started off by assuring the audience that were no right answers in programming – don’t be driven to fake absolutes, although there are no definitive right answers there are plenty of wrong ones! Code is art, Grant stressed, learn the rules before you can start to break them and don’t get hooked on Design Patterns – they’re not the answer to everything.
Grant then proceeded to lay down some programming fundamentals – Enforce code standards as it makes inheriting files easier. Think of code like Lego, not Playdoh. If you are building a space ship in Playdoh and want to change the engine you have to pull it all apart – with Lego you can take apart and reassemble with ease – your code should be like this too. Code flows down in specialisation – at the very top of the Object stack is the Main Application Controller which includes very specific logic for this one particular app – however as you move outwards, objects should become more generic and reusable. When working with reusable code, remember inside looking out – prefer composition and event dispatching over tight coupling and inheritance.
Grant also recommended the use of Service delegates to act as a layer between Server Side logic and Controller Logic in Flash, that way, the server side logic can change with only the one class needing modification on the Flash side.
Moving towards Flash Player specifics, Grant told the audience to always keep learning – read every API you can – you don’t have to specialise but at least know what FP10 is capable of. Also remember that AS3 needs you to be very particular about Garbage Collection – always create destructors in your AS3 objects to handle this in one place.
Grant bought up the concept of using Timeline based Event dispatching. His example was a simple graphical dialogue box (like we use in Moshi), where the box just dispatches events when it finished tweening in / out – that way Classes using this Timeline code / Library Linage just need to register for its events removing any form of tight coupling. Grant proceeded to talk about he makes use of JSFL to create custom Panels and “Graphical Objects” – a single click from the command line laid out all the frames, labels and AS3 timeline code for creating a Graphical Button (including the Linkage name!)
Finally, Grant reminded the audience that we are blessed to have the Flash IDE – we can create prototype and concepts in seconds – get out there an experiment!
You can view Grant’s slides for his presentation over on his site – note that you will need Flash Player 10 beta installed as he makes use of the new 3D features present
Lee (who runs theflashblog.com) came back in the afternoon to evangelise about the new CS4 platform, showing us some of the new features available across the entire product line (Flash CS4, Flex Builder 4 and Flash Player 10). He started off his speech by outlining that Flash Developers much be proficient in 5 main areas:
- Motion and Video
- Visual Design (using Photoshop and Illustrator)
- Object Orientated ActionScript
- Flash and Flash IDE’s
- Server Side Integration
With the introduction out of the way, Lee went on to talk about some of the new features in Flash Player 10. First up was native 3D – this provides full antialiased 3D inside with AS3, and, as it’s intrinsic to the player, it’s very fast! Lee stressed that this was meant to compliment, not replace more mature and capable 3D engines like PaperVision (but mentioned that there were plenty of new API’s that those guys would be hooking in to to speed things up). To accompany this, the drawing API has received an overhaul to allow drawing and manipulating programmatically generated 3D Objects
Next up was Adobe’s Advanced Text Engine – this is in the form of an AS3 API which Lee described as bewildering to anyone except “Text Nerds” – he said it provided an incredible amount of control – so much so that they were planning to release a CS4 component shortly after release which would allow “normal people” to harness it’s power – he did however say that this component would not ship with CS4.
Flash Player 10 will incorporate a host of “tweaks” including true Hardware Acceleration which will improve the speed of Video and Bitmap Manipulation (Filters, Pixel Bender operations). Local file access will be included (but will require user prompts), the previously mentioned unloadAndStop() method will be added and the new Vector datatype for strongly typed Arrays.
One of the new features that Lee was getting excited about was Pixel Bender – this allows image processing with shaders and filters and looked very interesting. Lee showed a custom demo where he created his own filter in HLSL (High Level Shader Language – which looked a bit like C#). One of the most exciting things about Pixel Bender is the fact that it is threaded separately from Flash Player – Lee said that complex calculations could be passed off to the Pixel Bener to allow for Mutli Threading in Flash Applications – if this is true, and it’s as easy as Lee hinted then this will be a major break through for Flash Player and will be immensely useful for complex Flash Apps.
Lee proceeded to talk about Adobe Air 1.5 and Flex Builder 4, neither of which sounded very exciting – alough Flex 4 will feature (yet another) XML based language for handling graphics in Flex.
Finally, Lee showed us some of the features of the new Flash CS4 IDE including live previews of 3d Images. The Flash Properties Panel now includes a new Z property alongside the traditional x and y which allows you to move symbols in space (away from the camera) – he whipped up a simple, live demonstration of this which was very impressive, however, he insisted the really cold 3D features would only be available via AS3 scripting. He wrapped up his Flash CS4 presentation by mentioning that the Flash IDE ActionScript Panel had not been touched in this release – in his own words – fail.
The Best 8 to 12 Hours of My Life
The day ended with a visual presentation by Robert Hodgin who specialises in Audio Visualisation code – whilst not ActionScript based, his visuals provided some inspiring ideas and concepts along with a recommendation that the audience branch out and try a hit of ‘cid if they haven’t had the privilege.