Currently Reading

Image of Derivatives Demystified: A Step-by-Step Guide to Forwards, Futures, Swaps and Options (The Wiley Finance Series)

Image of Working Effectively with Legacy Code (Robert C Martin)

Image of Coders at Work: Reflections on the Craft of Programming

Image of Succeeding with Agile: Software Development Using Scrum (Addison-Wesley Signature)

Image of iPhone UK: The Missing Manual

Image of My Shit Life So Far

Recently Read

Image of Cloud Atlas

Image of UML 2 for Dummies

Image of ActionScript 3.0 Design Patterns: Object Oriented Programming Techniques (Adobe Developer Library)

Image of Refactoring: Improving the Design of Existing Code (Object Technology Series)

Image of Beginning iPhone 3 Development: Exploring the iPhone SDK

Image of Advanced Actionscript 3 with Design Patterns

Image of Clean Code: A Handbook of Agile Software Craftsmanship (Robert C. Martin)

Image of The Secrets of Consulting: A Guide to Giving and Getting Advice Successfully

Image of Test Driven: TDD and Acceptance TDD for Java Developers

Image of iPhone Advanced Projects (Books for Professionals by Professionals)


September 28, 2009

Forcing the Browser to crash using ActionScript

Filed under: ActionScript, Flex — Anthony @ 11:59 pm

I just discovered this little trick, I'm not sure how useful it is but it works.

Simply create a class that throws an error in the constructor. This will cause the browser to crash and close.

 
 
package
{
   public class BrowserCrasher
   {
      public function BrowserCrasher( )
      {
         throw new Error( 'goodbye browser' );
      }
   }
}
 

Enums and static initializers in AS3

Filed under: ActionScript, OOP — Anthony @ 10:24 pm

I just came across the idea of static initializers in Java and was wondering if they are available in ActionScript as well.

I found a couple posts on the subject.

post 1

post 2