snipt

Ctrl+h for KB shortcuts

ActionScript 3

Test for AIR Capabilities

if(Capabilities.playerType == "Desktop") //test for AIR
https://snipt.net/embed/bb4312b9e4b184cf20b82e5cfa84be72/
/raw/bb4312b9e4b184cf20b82e5cfa84be72/
bb4312b9e4b184cf20b82e5cfa84be72
as3
ActionScript 3
1
2019-08-18T01:33:07
True
False
False
/api/public/snipt/14783/
test-for-air-capabilities
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="k">if</span><span class="o">(</span><span class="n">Capabilities</span><span class="o">.</span><span class="na">playerType</span> <span class="o">==</span> <span class="s2">&quot;Desktop&quot;</span><span class="o">)</span> <span class="c1">//test for AIR</span> </span></pre></div> </td></tr></table>
as3, capabilities, playertype

ActionScript 3

AS3 Unicode Embeding

1
2
3
4
5
6
7
Uppercase : U+0020,U+0041-U+005A
Lowercase : U+0020,U+0061-U+007A
Numerals : U+0030-U+0039,U+002E
Punctuation : U+0020-U+002F,U+003A-U+0040,U+005B-U+0060,U+007B-U+007E
Basic Latin : U+0020-U+002F, U+0030-U+0039, U+003A-U+0040, U+0041-U+005A, U+005B-U+0060, U+0061-U+007A, U+007B-U+007E

//via http://blog.open-design.be/2008/06/12/set-unicode-range-in-embedded-font-using-flex-sdk-as3/
https://snipt.net/embed/912b2cd20b03e8ffc659e2979500a377/
/raw/912b2cd20b03e8ffc659e2979500a377/
912b2cd20b03e8ffc659e2979500a377
as3
ActionScript 3
7
2019-08-14T14:48:54
True
False
False
/api/public/snipt/14606/
as3-unicode-embeding
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="n">Uppercase</span> <span class="o">:</span> <span class="n">U</span><span class="o">+</span><span class="mi">0020</span><span class="o">,</span><span class="n">U</span><span class="o">+</span><span class="mi">0041</span><span class="o">-</span><span class="n">U</span><span class="o">+</span><span class="mi">005</span><span class="n">A</span> </span><span id="L-2"><a name="L-2"></a><span class="n">Lowercase</span> <span class="o">:</span> <span class="n">U</span><span class="o">+</span><span class="mi">0020</span><span class="o">,</span><span class="n">U</span><span class="o">+</span><span class="mi">0061</span><span class="o">-</span><span class="n">U</span><span class="o">+</span><span class="mi">007</span><span class="n">A</span> </span><span id="L-3"><a name="L-3"></a><span class="n">Numerals</span> <span class="o">:</span> <span class="n">U</span><span class="o">+</span><span class="mi">0030</span><span class="o">-</span><span class="n">U</span><span class="o">+</span><span class="mi">0039</span><span class="o">,</span><span class="n">U</span><span class="o">+</span><span class="mi">002</span><span class="n">E</span> </span><span id="L-4"><a name="L-4"></a><span class="n">Punctuation</span> <span class="o">:</span> <span class="n">U</span><span class="o">+</span><span class="mi">0020</span><span class="o">-</span><span class="n">U</span><span class="o">+</span><span class="mi">002</span><span class="n">F</span><span class="o">,</span><span class="n">U</span><span class="o">+</span><span class="mi">003</span><span class="n">A</span><span class="o">-</span><span class="n">U</span><span class="o">+</span><span class="mi">0040</span><span class="o">,</span><span class="n">U</span><span class="o">+</span><span class="mi">005</span><span class="n">B</span><span class="o">-</span><span class="n">U</span><span class="o">+</span><span class="mi">0060</span><span class="o">,</span><span class="n">U</span><span class="o">+</span><span class="mi">007</span><span class="n">B</span><span class="o">-</span><span class="n">U</span><span class="o">+</span><span class="mi">007</span><span class="n">E</span> </span><span id="L-5"><a name="L-5"></a><span class="n">Basic</span> <span class="n">Latin</span> <span class="o">:</span> <span class="n">U</span><span class="o">+</span><span class="mi">0020</span><span class="o">-</span><span class="n">U</span><span class="o">+</span><span class="mi">002</span><span class="n">F</span><span class="o">,</span> <span class="n">U</span><span class="o">+</span><span class="mi">0030</span><span class="o">-</span><span class="n">U</span><span class="o">+</span><span class="mi">0039</span><span class="o">,</span> <span class="n">U</span><span class="o">+</span><span class="mi">003</span><span class="n">A</span><span class="o">-</span><span class="n">U</span><span class="o">+</span><span class="mi">0040</span><span class="o">,</span> <span class="n">U</span><span class="o">+</span><span class="mi">0041</span><span class="o">-</span><span class="n">U</span><span class="o">+</span><span class="mi">005</span><span class="n">A</span><span class="o">,</span> <span class="n">U</span><span class="o">+</span><span class="mi">005</span><span class="n">B</span><span class="o">-</span><span class="n">U</span><span class="o">+</span><span class="mi">0060</span><span class="o">,</span> <span class="n">U</span><span class="o">+</span><span class="mi">0061</span><span class="o">-</span><span class="n">U</span><span class="o">+</span><span class="mi">007</span><span class="n">A</span><span class="o">,</span> <span class="n">U</span><span class="o">+</span><span class="mi">007</span><span class="n">B</span><span class="o">-</span><span class="n">U</span><span class="o">+</span><span class="mi">007</span><span class="n">E</span> </span><span id="L-6"><a name="L-6"></a> </span><span id="L-7"><a name="L-7"></a><span class="c1">//via http://blog.open-design.be/2008/06/12/set-unicode-range-in-embedded-font-using-flex-sdk-as3/</span> </span></pre></div> </td></tr></table>
as3, embed, unicoderange

ActionScript 3

AS3 Interface Class

1
2
3
4
5
6
7
package
{
	public interface IMyInterface
	{
		
	}
}
https://snipt.net/embed/2b822da62b46dd54358aff6972ecc402/
/raw/2b822da62b46dd54358aff6972ecc402/
2b822da62b46dd54358aff6972ecc402
as3
ActionScript 3
7
2019-08-16T03:55:28
True
False
False
/api/public/snipt/14401/
basic-interface-class
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a><span class="kd">package</span> </span><span id="L-2"><a name="L-2"></a><span class="o">{</span> </span><span id="L-3"><a name="L-3"></a> <span class="kd">public</span> <span class="kd">interface</span> <span class="n">IMyInterface</span> </span><span id="L-4"><a name="L-4"></a> <span class="o">{</span> </span><span id="L-5"><a name="L-5"></a> </span><span id="L-6"><a name="L-6"></a> <span class="o">}</span> </span><span id="L-7"><a name="L-7"></a><span class="o">}</span> </span></pre></div> </td></tr></table>
as, template

Bash

Simple HTTP Server Anywhere

1
2
3
4
5
6
7
//Run a simple webserver in any dir

mkdir /miniserver
cd /miniserver
python -m SimpleHTTPServer

//http://localhost:8000/
https://snipt.net/embed/013dc08c9da53a5358ea24f2eefd33c9/
/raw/013dc08c9da53a5358ea24f2eefd33c9/
013dc08c9da53a5358ea24f2eefd33c9
bash
Bash
7
2019-08-17T21:12:40
True
False
False
/api/public/snipt/14289/
simple-http-server-anywhere
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a></pre></div></td><td class="code"><div class="highlight"><pre><span></span><span id="L-1"><a name="L-1"></a>//Run a simple webserver in any dir </span><span id="L-2"><a name="L-2"></a> </span><span id="L-3"><a name="L-3"></a>mkdir /miniserver </span><span id="L-4"><a name="L-4"></a><span class="nb">cd</span> /miniserver </span><span id="L-5"><a name="L-5"></a>python -m SimpleHTTPServer </span><span id="L-6"><a name="L-6"></a> </span><span id="L-7"><a name="L-7"></a>//http://localhost:8000/ </span></pre></div> </td></tr></table>
"web server", bash, http, python