/examples2D/LogoOnFire/PureAS3/Main.as

https://github.com/404Assassin/Flint-examples
ActionScript | 63 lines | 27 code | 8 blank | 28 comment | 0 complexity | f6b6a0a78d5dd05f59bed04828f30bad MD5 | raw file
  1. /*
  2. * FLINT PARTICLE SYSTEM
  3. * .....................
  4. *
  5. * Author: Richard Lord
  6. * Copyright (c) Richard Lord 2008-2011
  7. * http://flintparticles.org/
  8. *
  9. * Licence Agreement
  10. *
  11. * Permission is hereby granted, free of charge, to any person obtaining a copy
  12. * of this software and associated documentation files (the "Software"), to deal
  13. * in the Software without restriction, including without limitation the rights
  14. * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
  15. * copies of the Software, and to permit persons to whom the Software is
  16. * furnished to do so, subject to the following conditions:
  17. *
  18. * The above copyright notice and this permission notice shall be included in
  19. * all copies or substantial portions of the Software.
  20. *
  21. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
  22. * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
  23. * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
  24. * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
  25. * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
  26. * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
  27. * THE SOFTWARE.
  28. */
  29. package
  30. {
  31. import org.flintparticles.twoD.emitters.Emitter2D;
  32. import org.flintparticles.twoD.renderers.BitmapRenderer;
  33. import flash.display.Bitmap;
  34. import flash.display.Sprite;
  35. import flash.geom.Rectangle;
  36. [SWF(width='500', height='200', frameRate='60', backgroundColor='#000000')]
  37. public class Main extends Sprite
  38. {
  39. private var emitter:Emitter2D;
  40. public function Main()
  41. {
  42. var bitmap:Bitmap = new Bitmap( new Logo( 265, 80 ) );
  43. addChild( bitmap );
  44. bitmap.x = 118;
  45. bitmap.y = 70;
  46. emitter = new LogoFire();
  47. var renderer:BitmapRenderer = new BitmapRenderer( new Rectangle( 0, 0, 500, 200 ) );
  48. renderer.addEmitter( emitter );
  49. addChild( renderer );
  50. emitter.x = 118;
  51. emitter.y = 70;
  52. emitter.start( );
  53. }
  54. }
  55. }