BetaDesigns( Blog ) Flex and Component Development

28Sep/090

Forcing the Browser to crash using ActionScript

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.

  1.  
  2.  
  3. package
  4. {
  5. public class BrowserCrasher
  6. {
  7. public function BrowserCrasher( )
  8. {
  9. throw new Error( 'goodbye browser' );
  10. }
  11. }
  12. }
  13.  
Filed under: ActionScript, Flex No Comments
28Sep/090

Enums and static initializers in AS3

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