actionscript-d28d5a67.js 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158
  1. import{g as c}from"./index-fe76da25.js";function o(i,s){for(var n=0;n<s.length;n++){const t=s[n];if(typeof t!="string"&&!Array.isArray(t)){for(const e in t)if(e!=="default"&&!(e in i)){const a=Object.getOwnPropertyDescriptor(t,e);a&&Object.defineProperty(i,e,a.get?a:{enumerable:!0,get:()=>t[e]})}}}return Object.freeze(Object.defineProperty(i,Symbol.toStringTag,{value:"Module"}))}var r={exports:{}};(function(i,s){ace.define("ace/snippets/actionscript.snippets",["require","exports","module"],function(n,t,e){e.exports=`snippet main
  2. package {
  3. import flash.display.*;
  4. import flash.Events.*;
  5. public class Main extends Sprite {
  6. public function Main ( ) {
  7. trace("start");
  8. stage.scaleMode = StageScaleMode.NO_SCALE;
  9. stage.addEventListener(Event.RESIZE, resizeListener);
  10. }
  11. private function resizeListener (e:Event):void {
  12. trace("The application window changed size!");
  13. trace("New width: " + stage.stageWidth);
  14. trace("New height: " + stage.stageHeight);
  15. }
  16. }
  17. }
  18. snippet class
  19. \${1:public|internal} class \${2:name} \${3:extends } {
  20. public function $2 ( ) {
  21. ("start");
  22. }
  23. }
  24. snippet all
  25. package name {
  26. \${1:public|internal|final} class \${2:name} \${3:extends } {
  27. private|public| static const FOO = "abc";
  28. private|public| static var BAR = "abc";
  29. // class initializer - no JIT !! one time setup
  30. if Cababilities.os == "Linux|MacOS" {
  31. FOO = "other";
  32. }
  33. // constructor:
  34. public function $2 ( ){
  35. super2();
  36. trace("start");
  37. }
  38. public function name (a, b...){
  39. super.name(..);
  40. lable:break
  41. }
  42. }
  43. }
  44. function A(){
  45. // A can only be accessed within this file
  46. }
  47. snippet switch
  48. switch(\${1}){
  49. case \${2}:
  50. \${3}
  51. break;
  52. default:
  53. }
  54. snippet case
  55. case \${1}:
  56. \${2}
  57. break;
  58. snippet package
  59. package \${1:package}{
  60. \${2}
  61. }
  62. snippet wh
  63. while \${1:cond}{
  64. \${2}
  65. }
  66. snippet do
  67. do {
  68. \${2}
  69. } while (\${1:cond})
  70. snippet while
  71. while \${1:cond}{
  72. \${2}
  73. }
  74. snippet for enumerate names
  75. for (\${1:var} in \${2:object}){
  76. \${3}
  77. }
  78. snippet for enumerate values
  79. for each (\${1:var} in \${2:object}){
  80. \${3}
  81. }
  82. snippet get_set
  83. function get \${1:name} {
  84. return \${2}
  85. }
  86. function set $1 (newValue) {
  87. \${3}
  88. }
  89. snippet interface
  90. interface name {
  91. function method(\${1}):\${2:returntype};
  92. }
  93. snippet try
  94. try {
  95. \${1}
  96. } catch (error:ErrorType) {
  97. \${2}
  98. } finally {
  99. \${3}
  100. }
  101. # For Loop (same as c.snippet)
  102. snippet for for (..) {..}
  103. for (\${2:i} = 0; $2 < \${1:count}; $2\${3:++}) {
  104. \${4:/* code */}
  105. }
  106. # Custom For Loop
  107. snippet forr
  108. for (\${1:i} = \${2:0}; \${3:$1 < 10}; $1\${4:++}) {
  109. \${5:/* code */}
  110. }
  111. # If Condition
  112. snippet if
  113. if (\${1:/* condition */}) {
  114. \${2:/* code */}
  115. }
  116. snippet el
  117. else {
  118. \${1}
  119. }
  120. # Ternary conditional
  121. snippet t
  122. \${1:/* condition */} ? \${2:a} : \${3:b}
  123. snippet fun
  124. function \${1:function_name}(\${2})\${3}
  125. {
  126. \${4:/* code */}
  127. }
  128. # FlxSprite (usefull when using the flixel library)
  129. snippet FlxSprite
  130. package
  131. {
  132. import org.flixel.*
  133. public class \${1:ClassName} extends \${2:FlxSprite}
  134. {
  135. public function $1(\${3: X:Number, Y:Number}):void
  136. {
  137. super(X,Y);
  138. \${4: //code...}
  139. }
  140. override public function update():void
  141. {
  142. super.update();
  143. \${5: //code...}
  144. }
  145. }
  146. }
  147. `}),ace.define("ace/snippets/actionscript",["require","exports","module","ace/snippets/actionscript.snippets"],function(n,t,e){t.snippetText=n("./actionscript.snippets"),t.scope="actionscript"}),function(){ace.require(["ace/snippets/actionscript"],function(n){i&&(i.exports=n)})}()})(r);var p=r.exports;const l=c(p),$=o({__proto__:null,default:l},[p]);export{$ as a};