Flash: Adding Compiler Settings using AS3 Params


/ Published in: ActionScript 3
Save to your folder(s)

For those of us who dislike having to set Width, Height, Background Color, and Frame Rate in Stage Properties, here's an easy way to provide those Params in your Main ActionScript file.


Copy this code and paste it in your HTML
  1. package
  2. {
  3. import flash.display.Sprite;
  4.  
  5. [SWF(width="448", height="445", backgroundColor="#000000", framerate="15")]
  6. public class Main extends Sprite
  7. {
  8. public function Main()
  9. {
  10. }
  11. }
  12. }

Report this snippet


Comments


You need to login to view comments.