Posted By

damarev on 03/04/09


Tagged


Versions (?)

Detect hardware acceleration at runtime in Flash Player 10 standalone


 / Published in: ActionScript 3
 

  1. // create the SWFExplorer object
  2. var explorer:SWFExplorer = new SWFExplorer();
  3.  
  4. // pass the current SWF bytes and specify that you want to discover the current GPU mode
  5. // you would pass SWFExplorer.CLASSES to discover the linked classes
  6. explorer.parse( loaderInfo.bytes, SWFExplorer.ACCELERATION );
  7.  
  8. // affiche : true
  9. trace( explorer.acceleration == SWFExplorer.GPU );
  10.  
  11. // affiche : false
  12. trace( explorer.acceleration == SWFExplorer.DIRECT );
  13.  
  14. // affiche : false
  15. trace( explorer.acceleration == SWFExplorer.NONE );

Report this snippet  

You need to login to post a comment.