<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.3.1" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
<channel>
	<title>Comments on: Sound Mixer Source</title>
	<link>http://www.learningactionscript3.com/2007/12/06/sound-mixer-source/</link>
	<description>A digital supplement for the O'Reilly book</description>
	<pubDate>Thu, 20 Nov 2008 07:56:56 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.1</generator>
		<item>
		<title>By: Zevan</title>
		<link>http://www.learningactionscript3.com/2007/12/06/sound-mixer-source/#comment-655</link>
		<dc:creator>Zevan</dc:creator>
		<pubDate>Mon, 06 Oct 2008 14:18:26 +0000</pubDate>
		<guid>http://www.learningactionscript3.com/2007/12/06/sound-mixer-source/#comment-655</guid>
		<description>Hey Eric,

TweenLite has a function called delayedCall() that's specifically for this:

&lt;pre class='code'&gt;
import gs.TweenLite;

var snd:Sound = new Sound(new URLRequest("sound.mp3"));

TweenLite.delayedCall(1, onPlaySound);
function onPlaySound():void{
	snd.play();
}
&lt;/pre&gt;

Delayed call takes two parameters, delay and the callback function. TweenLite's delayedCall() is nearly identical to setTimeout() from the flash.utils package. The main difference is that setTimeout() requires that its delay argument be in milliseconds:

&lt;pre class='code'&gt;
var snd:Sound = new Sound(new URLRequest("sound.mp3"));

setTimeout(onPlaySound, 1000);

function onPlaySound():void{
	snd.play();
}
&lt;/pre&gt;

Hope that helps.</description>
		<content:encoded><![CDATA[<p>Hey Eric,</p>
<p>TweenLite has a function called delayedCall() that&#8217;s specifically for this:</p>
<pre class='code'>
import gs.TweenLite;

var snd:Sound = new Sound(new URLRequest("sound.mp3"));

TweenLite.delayedCall(1, onPlaySound);
function onPlaySound():void{
	snd.play();
}
</pre>
<p>Delayed call takes two parameters, delay and the callback function. TweenLite&#8217;s delayedCall() is nearly identical to setTimeout() from the flash.utils package. The main difference is that setTimeout() requires that its delay argument be in milliseconds:</p>
<pre class='code'>
var snd:Sound = new Sound(new URLRequest("sound.mp3"));

setTimeout(onPlaySound, 1000);

function onPlaySound():void{
	snd.play();
}
</pre>
<p>Hope that helps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://www.learningactionscript3.com/2007/12/06/sound-mixer-source/#comment-652</link>
		<dc:creator>Eric</dc:creator>
		<pubDate>Sun, 05 Oct 2008 14:58:49 +0000</pubDate>
		<guid>http://www.learningactionscript3.com/2007/12/06/sound-mixer-source/#comment-652</guid>
		<description>Hey there! We got to exchange email before on dynamic shadows once. Anyway, I was wondering if you knew how to delay playing a sound using TweenLite. I want to start playing the sound 1 second after I click a movieClip. Any suggestions?
I have the following:

var snd:Sound = new Sound(new URLRequest("sound.mp3"));
TweenLite.to(snd, .45, {play:1, delay:2});</description>
		<content:encoded><![CDATA[<p>Hey there! We got to exchange email before on dynamic shadows once. Anyway, I was wondering if you knew how to delay playing a sound using TweenLite. I want to start playing the sound 1 second after I click a movieClip. Any suggestions?<br />
I have the following:</p>
<p>var snd:Sound = new Sound(new URLRequest(&#8221;sound.mp3&#8243;));<br />
TweenLite.to(snd, .45, {play:1, delay:2});</p>
]]></content:encoded>
	</item>
</channel>
</rss>
