Enterprise Architect for Actionscript
Good habits – http://imanit.com/blog/?p=43
How To – Create a class model from an AS project – http://fasanya.blogspot.com/2010/04/using-enterprise-architect-to-create.html
How To – Configuring EA, creating a diagram, generating stub code – http://dgrigg.com/blog/2006/09/14/uml-stub-code-and-asdocs/
Alternatives to Enterprise Architect for Actionscript:
UML4AS – http://www.uml4as.com/flower-platform/home-uml4as.html
ArgoUML – http://argouml.tigris.org/tours/
StarUML – http://www.senocular.com/flash/tutorials/starumltoas3/
CrocusUML – http://crocusmodeller.com/
http://crocusmodeller.com/
Flash IDE, XML stream error 2032, Firewall settings
After a few hours of mystifying troubleshooting I found 2 other users with the same problem I’m currently experiencing.
The Flash IDE fails to load XML, but viewing the same SWF in a browser (or opening it using the standalone Flash Player) works just fine.
The error message from the IDE is:
Error #2032: Stream Error. URL: file:///c|/myXML.xml
The 2 other users I found with the same problem are here. It seems that if Flash is blocked on all IP addresses and all ports that you won’t be able to load local content in the IDE.
Flash debugging and diagnostic tools
Over the years I’ve tried a lot of different Flash debugging and testing tools. Whether I’m on my development workstation or at a client site I keep a stash of installers for these handy at all times.
Here’s a list of the ones worth keeping – there’s no problem that these tools can’t discover. And (with the exception of Charles) they’re all FREE!
- Charles HTTP proxy – see exactly what’s being requested and returned (great for revealing server errors)
- Firefox – Allows me to run the Flash Switcher and Flash Tracer plugins
- Flash Switcher – easily test in multiple versions of the Flash Player
- Flashtracer – View the log output of the Debug Player, includes pattern matching and text colouring
- A text document with an example of a valid path to flashlog.txt (to make up for having a bad memory!)
- Installers for Debug Flash Player 9 and 10, ActiveX/plugin/standalone
- A copy of my own ‘mm.cfg’ file (to copy onto a client machine if required)
Assuming that I need to visit a client site to test an issue (a rare occurence, but that makes it even more important that I get in, do the business and get out as quickly and reliably as possible!) I can start with a ‘virgin’ machine and have it loaded with my test suite in under 20 minutes.
Additionally, when I’m testing and debugging on my development machine, I always install:
- dnGREP – Easy, fast, multi-line search and replace
- MonsterDebugger – Provides ‘Flash Debug’ style object introspection
- Launchy – Indispensible shortcut tool
- WAMPServer – Reliable testing of local content in a webserver environment
Other useful compilations of Flash and Flex debugging and diagnostic tools are:
the list of helpful Flex or Flash debug tools
*drawlogic’s Helpful Flash Debugging Tools
What about you? Are there any tools you can’t live without?
Better memory management in AS3 with Temple Library
After seeing some memory issues with a large Gaia Flash Framework project I was directed to the Temple Memory Management library.
By extending the Gaia AbstractPage from the Temple ‘CoreMovielip’ class instead of the Flash MovieClip class I gained a bunch of useful cleanup functions that operate pretty much on ‘auto pilot’ and instantly reduced my memory overhead with no additional work.
In addition to memory management there are a bunch of other useful ‘toolkit’ classes. Like the Gaia framework, this is a well-thought-out structure that you can use as much (or as little) as you like. Just the memory management alone makes it worthwhile, the rest is up to you.
RobotLegs with Gaia Flash Framework, getting started
I’ve used Gaia for a couple of years and recently started to integrate RobotLegs into my projects.
My ‘most useful references’ are:
RobotLegs ‘Hello World’ video – John Lindquist
This video is also a brilliant demo for writing code fast with FDT. I’ve watched it over a dozen times and learn something new regularly. When I watch John creating the Hello World example from scratch I see the state of ‘flow’ I want to replicate in my own work. My current favourite keyboard shortcut is ‘CTRL-PageUp and CTRL-PageDown to navigate between open files in the Eclipse IDE.
How to Use RobotLegs on top of Gaia (part deux) – JesterXL
Gaia and RobotLegs Together
Common Problems – RobotLegs – I reached this page with three ‘common problems’ – I wasn’t exporting a SWC from Flash, I’d already added my View class to the stage before I’d mapped the Mediator, and I had a semi-colon after my [Inject], all definite no-no’s.
Developing a LivePreview for an AS3 component in Flash CS4
I’m writing a component for Flash that will display an external image (JPG or PNG) in the IDE. This is so our designers can see in realtime what the screen they’re building will look like, but we’ll be able to localise without republishing the SWF.
My component definition specifies an external SWF as the LivePreview, but I’ve found that the Flash IDE isn’t very responsive when I republish my LivePreview.
It seems the only way to guarantee that I’m seeing the newly published LivePreview SWF is to completely exit Flash CS4 and restart it.
Has anyone got a solution? (Or a better workflow?)
Font blurring problems when embedding Captivate SWFs
A current project sees us producing short simulations using Adobe Captivate and embedding the resulting SWF in our own e-learning application.
Our application is deployed using Steven Sacks’ Gaia Flash framework, and loads the Captivate content as an ‘Asset’. Some custom XML parameters let us specify the exact width and height, but despite matching the Captivate settings exactly we were seeing a mysterious font-blurring effect that simply wasn’t there when we viewed the Captivate content outside our application.
It turns out our problem was in the use of customised UI elements in Captivate. We’d imported some button art at an incorrect size and resized it within Captivate. Ordinarily this wouldn’t be an issue because (we discovered) Captivate does some (ahem) ‘magic stage resizing’ in the background when it’s running as a standalone element, and the ‘magic’ wasn’t happening when it was embedded in our Gaia application.
The solution was an old one… ‘do everything exactly right the first time’ – ensure all button and UI art was at the correct dimensions, removing the need for Captivate to do any ‘magic stage resizing’ and restoring complete clarity to our text.
OMG! Specific Flash accessibility techniques, code samples and tests for WCAG 2.0
Historically it’s been difficult to find meaningful help when trying to make Flash content comply with the old W3C, and more recently WCAG2.0, accessibility requirements. This W3C draft list of Flash Techniques for WCAG2.0 is (a draft version) of the final word.
It includes detailed instructions for the Flash IDE Accessibility panel, example AS2 and AS3 implementations, and tests to ensure compliance for 35 different Flash scenarios. I love this list because it makes it easier for me to explain the amount of work in ‘making it accessible’ to colleagues who don;t really ‘get’ accessibility.
More than that, it gives testable code examples of specific implementations and explains them in multiple contexts. Thankyou W3C!
Because it’s currently a draft document you won’t find these techniques in the ‘How To Meet WCAG 2.0 Checklist‘. Comments close on August 9.
‘Fluxus’ – Flex and Actionscript Library / Package management repository (think Ruby Gems or Perl CPAN)
Described by one of the project owners as ‘like RubyGems for the Flash platform’, the Fluxus Project currently provides a database of AS3 libraries, and will ‘soon’ feature a command-line interface to the database, and a GUI to manage your local ‘Fluxus’.
Anyone already on GitHub should ‘watch’ this, it’s gonna get seriously useful. And if you’ve got skills you can use to help the community out then head over to http://fluxdb.fluxusproject.org/
Check it out – over 270 AS3 libraries and counting!
AS3 _targetInstanceName equivalent is scrollTargetName
Back in the MX2004 day we could use the _xch clip in the Flash IDE to help us determine the name of any asset we dropped our component onto. Excessive Googling hasn’t turned up anything useful so, dear reader, this is for you.
In the CS4 library, select your component clip, right-click and choose ‘Component Definition‘. Add a parameter called scrollTargetName, give it a variable name of ‘scrollTargetName‘. In your component class, ensure you have getters and setters for ‘scrollTargetName‘ and for ‘scrollTarget‘, like this:
Now update your component by selecting ‘Component Definition’ again, but this time just clik ‘OK‘ to force the update.
Now place a TextField or MovieClip onstage and give it an instance name, then drag your updated component from the library onto the test clip. If you check the Component Parameters panel you should see that it’s automagically populated with the instance name of your example clip, just like _targetInstanceName used to. Dragging it onto other named instances should also update the parameter in the panel. Dragging your component onto an unnamed instance forces a default instance name, couldn’t be sweeter!
I also implemented some functionality that (via the SWFPanel of my component) auto-positions the dropped component instance at the top-left of its’ target instance. Let me know in the comments if you want to see how this is done.










