Blog

  • Error Handling in ActionScript 3: Don’t Make Grenades (or how to not crash Safari)

    Preface

    At the latest WWDC it was announced that the #1 reason Safari crashes for users is because of Flash, hence the new plug-in sequestering (i.e. if Flash blows up real good, it’ll do so in a way that won’t negatively affect the browser). I agree. If you’ve ever surfed the web using the debug Flash Player, Safari 3 and 4 explode all the time. I don’t know the true cause, but I do know when it’ll happen most often: when you get an error dialogue. These are shown only if you have the debug Flash Player installed, and an error that wasn’t “caught” happens. Sometimes hitting the “Continue” button vs. the “Dismiss All” button will work… but not always… BOOM!  Thank God for History > Reopen All Windows from Last Session.  Here’s how you can help prevent Flash’s bad name from getting worse (that and until Adobe makes it more stable).

    (more…)

  • Flash Command: Convert to Symbol and Distribute to Layers

    Josh was bitching on Twitter the other day about how if you select multiple objects in Flash and choose Convert to Symbol, it puts them all on the same layer, regardless of where they were before. Others agreed that it is frustrating. I know where he’s coming from doing production art, so I built this quick Command to do just that. If you save in your Commands folder, and re-boot Flash, you can re-map your F8 key to use this Command instead of the regular Convert to Symbol Command.

    (more…)

  • Utilizing Namespaces to Indicate Framework Usage

    When utilizing PureMVC Mediator’s, there are 2 ways I’ve seen people write them. The first way is to have the Mediator call methods on the View, passing data it retrieved from a Proxy. This can also be done from a Command as well. The second way is to actually give the Mediator/Command more responsibility of State management for a particular View, and call more than 1 method on it, doing a lot of code that’s often done in the View.

    Both have the same problem: methods in the View that only PureMVC calls, yet exist for others to inadvertently use because they are public.

    (more…)

  • Creating Modules in Flash CS4

    You can now create modules in Flash CS4 using AS3.  You couldn’t in CS3, but could in Flash 8 using AS2.  Flash CS4 comes with a new feature in the Publish Settings called “External Library Path”.  What this allows you to do is point to a set of code, and allow you to compile WITHOUT it.  This is almost exactly the same as mxmlc’s (Flex compiler) -load-externs compiler parameter.  We still don’t have -link-report, though, grr….

    (more…)