Snipt.net is closing on December 31st, 2016

For more information, please visit this blog post.

snipt

Ctrl+h for KB shortcuts

ActionScript 3

TweenLite onComplete

1
2
3
4
TweenLite.to(clip_mc, 5, {alpha:0.5, x:120, ease:Back.easeOut, delay:2, onComplete:onFinishTween, onCompleteParams:[5, clip_mc]});
function onFinishTween(parameter1:Number, parameter2:MovieClip):void {
    trace("The tween has finished! parameters: " + parameter1 + ", and " + parameter2);
}
https://snipt.net/embed/35dc9f56383dee8c4161259a2f441b98/
https://snipt.net/raw/35dc9f56383dee8c4161259a2f441b98/
35dc9f56383dee8c4161259a2f441b98
as3
ActionScript 3
4
2016-12-05T15:06:16
True
False
False
/api/public/snipt/5070/
tweenlite-oncomplete
<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></span><span id="L-1"><a name="L-1"></a><span class="n">TweenLite</span><span class="o">.</span><span class="na">to</span><span class="o">(</span><span class="n">clip_mc</span><span class="o">,</span> <span class="mi">5</span><span class="o">,</span> <span class="o">{</span><span class="n">alpha</span><span class="o">:</span><span class="mf">0.5</span><span class="o">,</span> <span class="n">x</span><span class="o">:</span><span class="mi">120</span><span class="o">,</span> <span class="n">ease</span><span class="o">:</span><span class="n">Back</span><span class="o">.</span><span class="na">easeOut</span><span class="o">,</span> <span class="n">delay</span><span class="o">:</span><span class="mi">2</span><span class="o">,</span> <span class="n">onComplete</span><span class="o">:</span><span class="n">onFinishTween</span><span class="o">,</span> <span class="n">onCompleteParams</span><span class="o">:[</span><span class="mi">5</span><span class="o">,</span> <span class="n">clip_mc</span><span class="o">]});</span> </span><span id="L-2"><a name="L-2"></a><span class="kd">function </span><span class="nf">onFinishTween</span><span class="o">(</span><span class="n">parameter1</span><span class="o">:</span><span class="kt">Number</span><span class="o">,</span> <span class="n">parameter2</span><span class="o">:</span><span class="kt">MovieClip</span><span class="o">):</span><span class="kt">void</span> <span class="o">{</span> </span><span id="L-3"><a name="L-3"></a> <span class="nf">trace</span><span class="o">(</span><span class="s2">&quot;The tween has finished! parameters: &quot;</span> <span class="o">+</span> <span class="n">parameter1</span> <span class="o">+</span> <span class="s2">&quot;, and &quot;</span> <span class="o">+</span> <span class="n">parameter2</span><span class="o">);</span> </span><span id="L-4"><a name="L-4"></a><span class="o">}</span> </span></pre></div> </td></tr></table>
3, actionscript
Copyrighted, illegal, or inappropriate content? Email [email protected].