<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.0.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Understanding the Sound Constructor (AS2)</title>
	<link>http://www.quip.net/blog/2006/flash/actionscript-20/understanding-the-sound-constructor</link>
	<description>Luck is the residue of good design.</description>
	<pubDate>Thu, 09 Sep 2010 11:25:16 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.2</generator>

	<item>
		<title>by: David Stiller</title>
		<link>http://www.quip.net/blog/2006/flash/actionscript-20/understanding-the-sound-constructor#comment-149607</link>
		<pubDate>Tue, 18 Mar 2008 02:08:25 +0000</pubDate>
		<guid>http://www.quip.net/blog/2006/flash/actionscript-20/understanding-the-sound-constructor#comment-149607</guid>
					<description>Thum,

Is &lt;code&gt;mcSound&lt;/code&gt; the instance name of a valid movie clip?  What happens if you use the &lt;code&gt;trace()&lt;/code&gt; function to trace the value of &lt;code&gt;h&lt;/code&gt; (your &lt;code&gt;Sound&lt;/code&gt; instance) in the &lt;code&gt;stopVideo()&lt;/code&gt; function?

e.g.
&lt;pre&gt;&lt;code&gt;function stopVideo():Void {
  media.stop();
  trace(h);
  h.start();
}&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Thum,</p>
<p>Is <code>mcSound</code> the instance name of a valid movie clip?  What happens if you use the <code>trace()</code> function to trace the value of <code>h</code> (your <code>Sound</code> instance) in the <code>stopVideo()</code> function?</p>
<p>e.g.</p>
<pre><code>function stopVideo():Void {
  media.stop();
  trace(h);
  h.start();
}</code></pre>
]]></content:encoded>
				</item>
	<item>
		<title>by: Thum</title>
		<link>http://www.quip.net/blog/2006/flash/actionscript-20/understanding-the-sound-constructor#comment-140393</link>
		<pubDate>Wed, 27 Feb 2008 10:20:53 +0000</pubDate>
		<guid>http://www.quip.net/blog/2006/flash/actionscript-20/understanding-the-sound-constructor#comment-140393</guid>
					<description>To David

My purpose to stop start background music is when I load the flv file I want the backgraound music to stop.After I stop the flv movie then I want to start the background again.

I had put your sample code with the stop start flv action script.
The problem is when the flv movie start the script stop the back ground music.

But When I stop the flv movie .The Background music is not start.
Please advice me 


Here is my sample code.


var h:Sound = new Sound(mcSound);
h.attachSound(&quot;bg1&quot;);

function onInit(){
	if( visible )
		playVideo();
}

function onOpen(){
	playVideo();
}

function onClose(){
	stopVideo();
}

function playVideo(){
	media.play();
h.stop();
	
	}

function stopVideo(){
	media.stop();
	h.start();
}</description>
		<content:encoded><![CDATA[<p>To David</p>
<p>My purpose to stop start background music is when I load the flv file I want the backgraound music to stop.After I stop the flv movie then I want to start the background again.</p>
<p>I had put your sample code with the stop start flv action script.<br />
The problem is when the flv movie start the script stop the back ground music.</p>
<p>But When I stop the flv movie .The Background music is not start.<br />
Please advice me </p>
<p>Here is my sample code.</p>
<p>var h:Sound = new Sound(mcSound);<br />
h.attachSound(&#8221;bg1&#8243;);</p>
<p>function onInit(){<br />
	if( visible )<br />
		playVideo();<br />
}</p>
<p>function onOpen(){<br />
	playVideo();<br />
}</p>
<p>function onClose(){<br />
	stopVideo();<br />
}</p>
<p>function playVideo(){<br />
	media.play();<br />
h.stop();</p>
<p>	}</p>
<p>function stopVideo(){<br />
	media.stop();<br />
	h.start();<br />
}
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
