Posts tagged ‘tips’

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.