snipt

Ctrl+h for KB shortcuts

ActionScript 3

Mask in as2 setMask

1
2
3
4
box.cacheAsBitmap = true;
m.cacheAsBitmap = true;

box.setMask("m");
https://snipt.net/embed/9ee1f374521dd897ffc98d4d2ec3106c/
https://snipt.net/raw/9ee1f374521dd897ffc98d4d2ec3106c/
9ee1f374521dd897ffc98d4d2ec3106c
as3
ActionScript 3
4
2016-09-30T08:41:05
True
False
False
/api/public/snipt/35158/
mask-in-as2-setmask
<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></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="n">box</span><span class="o">.</span><span class="na">cacheAsBitmap</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span> </span><span id="L-2"><a name="L-2"></a><span class="n">m</span><span class="o">.</span><span class="na">cacheAsBitmap</span> <span class="o">=</span> <span class="kc">true</span><span class="o">;</span> </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a><span class="n">box</span><span class="o">.</span><span class="na">setMask</span><span class="o">(</span><span class="s2">&quot;m&quot;</span><span class="o">);</span> </span></pre></div> </td></tr></table>
as2, utility

ActionScript 3

flash xml cache issue

var date:Date = new Date();
var toLoad:String = "myxml.xml?t=" + String(date.getTime()) + Math.round(1000 * Math.random());
https://snipt.net/embed/c6eb5a59f0a5b02e0df29de9b8670f19/
https://snipt.net/raw/c6eb5a59f0a5b02e0df29de9b8670f19/
c6eb5a59f0a5b02e0df29de9b8670f19
as3
ActionScript 3
2
2016-10-01T00:27:41
True
False
False
/api/public/snipt/6546/
flash-xml-cache-issue-this-will-fix-any-issues
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="kd">var</span> <span class="n">date</span><span class="p">:</span><span class="kt">Date</span> <span class="o">=</span> <span class="k">new</span> <span class="kt">Date</span><span class="o">();</span> </span><span id="L-2"><a name="L-2"></a><span class="kd">var</span> <span class="n">toLoad</span><span class="p">:</span><span class="kt">String</span> <span class="o">=</span> <span class="s2">&quot;myxml.xml?t=&quot;</span> <span class="o">+</span> <span class="n">String</span><span class="o">(</span><span class="n">date</span><span class="o">.</span><span class="na">getTime</span><span class="o">())</span> <span class="o">+</span> <span class="n">Math</span><span class="o">.</span><span class="na">round</span><span class="o">(</span><span class="mi">1000</span> <span class="o">*</span> <span class="n">Math</span><span class="o">.</span><span class="na">random</span><span class="o">());</span> </span></pre></div> </td></tr></table>
actionscript, as2, as3, cache, xml
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.