Learning a new thing everyday – AS3 Tips and Tricks

While wandering the floor during day 3 of Flash in the Can (an article about the rest of the conference coming soon), I ended up sitting in on the end of R. Blank’s Get off your ass and start using AS3 already!. While I figured the core subject matter would be things I already know (my only experience with Flash is in AS3), I was surprised to learn a few new tricks. Some are new features to Flash Player 10, and others are just thingsĀ  I never picked up before:

  • You can change the frame rate at runtime via Stage.frameRate
  • Event.ENTER_FRAME is dispatched as the frame rendering begins, and Event.EXIT_FRAME (new to Flash 10) is upon completion.
  • You can enable Color Correction via Stage.colorCorrection = ColorCorrection.ON
  • flash.utils.describeType() will return an XML formatted string of advanced information of any object type – much easier to decipher than [object object]
  • MouseEvent.MOUSE_LEAVE will determine when the mouse moves off the stage / the swf leaves focus

Nothing too fancy, but they are tidbits that I will definitely use during my day-to-day coding. I’m glad I poked my head in during some down time.

One Comment

  1. [...] I then wandered the floor for an hour, stopping in at every panel to see what was going on. I was initially interested in seeing Brian Lesser’s talk on RTMFP, but I got in late and had to sit at the back where I could not see any of the slides very well. I ended up in R. Blank’s AS2-AS3 Migration session, which had a larger audience than I anticipated – I guess I had figured that more people had made the jump to AS3 already. I’m glad I stopped in, as I picked up a few things. [...]

Leave a Reply