<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Flash CS3 Tutorial &#8211; Volume Slider</title>
	<atom:link href="http://www.schoolofflash.com/blog/2008/03/flash-cs3-tutorial-volume-slider/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.schoolofflash.com/blog/2008/03/flash-cs3-tutorial-volume-slider/</link>
	<description>Flash and ActionScript Tutorials</description>
	<lastBuildDate>Wed, 07 Apr 2010 18:49:35 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Tommy</title>
		<link>http://www.schoolofflash.com/blog/2008/03/flash-cs3-tutorial-volume-slider/comment-page-1/#comment-248</link>
		<dc:creator>Tommy</dc:creator>
		<pubDate>Sat, 20 Feb 2010 15:27:10 +0000</pubDate>
		<guid isPermaLink="false">http://schoolofflash.com/2008/03/29/flash-cs3-tutorial-volume-slider/#comment-248</guid>
		<description>nice tutorial!!! thanks a lot...</description>
		<content:encoded><![CDATA[<p>nice tutorial!!! thanks a lot&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Will</title>
		<link>http://www.schoolofflash.com/blog/2008/03/flash-cs3-tutorial-volume-slider/comment-page-1/#comment-247</link>
		<dc:creator>Will</dc:creator>
		<pubDate>Thu, 18 Feb 2010 17:58:43 +0000</pubDate>
		<guid isPermaLink="false">http://schoolofflash.com/2008/03/29/flash-cs3-tutorial-volume-slider/#comment-247</guid>
		<description>To all those who want the music to autoplay at the start - what i did was move the variables to an earlier keyframe (ie. not the keyframe where the play/stop button controls are) and then i added a new function.  here&#039;s the AS in frame 5:

var music:Sound = new Sound(new URLRequest(&quot;media/beautiful_world.mp3&quot;));
var sc:SoundChannel;
var isPlaying:Boolean = false;

function startMusic(e:Event):void
{
	if (!isPlaying)
	{
		sc = music.play();
		isPlaying = true;
	}
}

startMusic(null);



and then in frame 10, which is the home frame whenever a user clicks &quot;Back&quot; has this code (and more, if you want a slider, mute control, etc):



stop_btn.addEventListener(MouseEvent.CLICK, stopMusic);

function stopMusic(e:Event):void
{
	sc.stop();
	isPlaying = false;
}

play_btn.addEventListener(MouseEvent.CLICK, playMusic);

function playMusic(e:Event):void
{
	if (!isPlaying)
	{
		sc = music.play();
		isPlaying = true;
	}
}



hopefully this works for you too!</description>
		<content:encoded><![CDATA[<p>To all those who want the music to autoplay at the start &#8211; what i did was move the variables to an earlier keyframe (ie. not the keyframe where the play/stop button controls are) and then i added a new function.  here&#8217;s the AS in frame 5:</p>
<p>var music:Sound = new Sound(new URLRequest(&#8220;media/beautiful_world.mp3&#8243;));<br />
var sc:SoundChannel;<br />
var isPlaying:Boolean = false;</p>
<p>function startMusic(e:Event):void<br />
{<br />
	if (!isPlaying)<br />
	{<br />
		sc = music.play();<br />
		isPlaying = true;<br />
	}<br />
}</p>
<p>startMusic(null);</p>
<p>and then in frame 10, which is the home frame whenever a user clicks &#8220;Back&#8221; has this code (and more, if you want a slider, mute control, etc):</p>
<p>stop_btn.addEventListener(MouseEvent.CLICK, stopMusic);</p>
<p>function stopMusic(e:Event):void<br />
{<br />
	sc.stop();<br />
	isPlaying = false;<br />
}</p>
<p>play_btn.addEventListener(MouseEvent.CLICK, playMusic);</p>
<p>function playMusic(e:Event):void<br />
{<br />
	if (!isPlaying)<br />
	{<br />
		sc = music.play();<br />
		isPlaying = true;<br />
	}<br />
}</p>
<p>hopefully this works for you too!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Truly of the Yard</title>
		<link>http://www.schoolofflash.com/blog/2008/03/flash-cs3-tutorial-volume-slider/comment-page-1/#comment-246</link>
		<dc:creator>Truly of the Yard</dc:creator>
		<pubDate>Sun, 07 Feb 2010 15:53:16 +0000</pubDate>
		<guid isPermaLink="false">http://schoolofflash.com/2008/03/29/flash-cs3-tutorial-volume-slider/#comment-246</guid>
		<description>Almost 2 years old, and still an excellent tutorial, thank you. I just want to add (if it isn&#039;t obvious) that the control knob has to be centered on its registration point, or else it will flop around when first selecting it.</description>
		<content:encoded><![CDATA[<p>Almost 2 years old, and still an excellent tutorial, thank you. I just want to add (if it isn&#8217;t obvious) that the control knob has to be centered on its registration point, or else it will flop around when first selecting it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Shockostar</title>
		<link>http://www.schoolofflash.com/blog/2008/03/flash-cs3-tutorial-volume-slider/comment-page-1/#comment-245</link>
		<dc:creator>Shockostar</dc:creator>
		<pubDate>Fri, 29 Jan 2010 03:27:42 +0000</pubDate>
		<guid isPermaLink="false">http://schoolofflash.com/2008/03/29/flash-cs3-tutorial-volume-slider/#comment-245</guid>
		<description>God bless you man!
Your tutorial really really enlightened me =D
Very well explained, easy to understand.
You&#039;re going straight to heaven! hahaha...
S.S.</description>
		<content:encoded><![CDATA[<p>God bless you man!<br />
Your tutorial really really enlightened me =D<br />
Very well explained, easy to understand.<br />
You&#8217;re going straight to heaven! hahaha&#8230;<br />
S.S.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gabriel</title>
		<link>http://www.schoolofflash.com/blog/2008/03/flash-cs3-tutorial-volume-slider/comment-page-1/#comment-244</link>
		<dc:creator>Gabriel</dc:creator>
		<pubDate>Sun, 20 Dec 2009 09:14:03 +0000</pubDate>
		<guid isPermaLink="false">http://schoolofflash.com/2008/03/29/flash-cs3-tutorial-volume-slider/#comment-244</guid>
		<description>Solved!.

I&#039;ve added

sc = music.play();

at end of code...this is playing as soon as i run swf or html.

Thanks again!.</description>
		<content:encoded><![CDATA[<p>Solved!.</p>
<p>I&#8217;ve added</p>
<p>sc = music.play();</p>
<p>at end of code&#8230;this is playing as soon as i run swf or html.</p>
<p>Thanks again!.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gabriel</title>
		<link>http://www.schoolofflash.com/blog/2008/03/flash-cs3-tutorial-volume-slider/comment-page-1/#comment-243</link>
		<dc:creator>Gabriel</dc:creator>
		<pubDate>Sun, 20 Dec 2009 08:24:24 +0000</pubDate>
		<guid isPermaLink="false">http://schoolofflash.com/2008/03/29/flash-cs3-tutorial-volume-slider/#comment-243</guid>
		<description>Great!.

I&#039;ve tested by using a shoutcast adress instead the walk.mp3 sound...It functions OK, now...

¿How can i do to the sound plays without click Play button?...That&#039;s: The sound plays when i open my web or when i open the swf file...

Thanks so much!.</description>
		<content:encoded><![CDATA[<p>Great!.</p>
<p>I&#8217;ve tested by using a shoutcast adress instead the walk.mp3 sound&#8230;It functions OK, now&#8230;</p>
<p>¿How can i do to the sound plays without click Play button?&#8230;That&#8217;s: The sound plays when i open my web or when i open the swf file&#8230;</p>
<p>Thanks so much!.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ralphonz</title>
		<link>http://www.schoolofflash.com/blog/2008/03/flash-cs3-tutorial-volume-slider/comment-page-1/#comment-242</link>
		<dc:creator>ralphonz</dc:creator>
		<pubDate>Wed, 11 Nov 2009 14:32:02 +0000</pubDate>
		<guid isPermaLink="false">http://schoolofflash.com/2008/03/29/flash-cs3-tutorial-volume-slider/#comment-242</guid>
		<description>Hi,

thanks so much for the tutorial! i looked at so many others first which made no sense or didn&#039;t work!  Got this one working with some slightly different  code for play and stop, added a pause function, up/down buttons for moving the slider and a little beep when a button is hit!

However, i&#039;m having problems actually playing the track on my local site.
I&#039;ve successfully embedded the player in the HTML file. It will play a medium sized mp3 file fine but not a larger one.
However the .swf on its own, or through the flash-generated html, will play any mp3 file fine, just not when its embedded on my page?

If anyone can help i would really appreciate it!</description>
		<content:encoded><![CDATA[<p>Hi,</p>
<p>thanks so much for the tutorial! i looked at so many others first which made no sense or didn&#8217;t work!  Got this one working with some slightly different  code for play and stop, added a pause function, up/down buttons for moving the slider and a little beep when a button is hit!</p>
<p>However, i&#8217;m having problems actually playing the track on my local site.<br />
I&#8217;ve successfully embedded the player in the HTML file. It will play a medium sized mp3 file fine but not a larger one.<br />
However the .swf on its own, or through the flash-generated html, will play any mp3 file fine, just not when its embedded on my page?</p>
<p>If anyone can help i would really appreciate it!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: AlPual</title>
		<link>http://www.schoolofflash.com/blog/2008/03/flash-cs3-tutorial-volume-slider/comment-page-1/#comment-241</link>
		<dc:creator>AlPual</dc:creator>
		<pubDate>Mon, 10 Aug 2009 10:51:17 +0000</pubDate>
		<guid isPermaLink="false">http://schoolofflash.com/2008/03/29/flash-cs3-tutorial-volume-slider/#comment-241</guid>
		<description>Hi, thanks for posting this.  It&#039;s a great tutorial.  I am a bit confused though, not being familiar with Actionscript (I am used to Java).  It looks to me like the ENTER_FRAME event will be called from now until eternity, since the listener is never removed.  Also, it seems to me that a user who drops the volume level down before they press play would be greeted with the default (max) volume.  As mentioned, I don&#039;t know Actionscript, but it seems that, if there is a reason these problems wont occur, then that should be mentioned, since it&#039;s not very intuitive.</description>
		<content:encoded><![CDATA[<p>Hi, thanks for posting this.  It&#8217;s a great tutorial.  I am a bit confused though, not being familiar with Actionscript (I am used to Java).  It looks to me like the ENTER_FRAME event will be called from now until eternity, since the listener is never removed.  Also, it seems to me that a user who drops the volume level down before they press play would be greeted with the default (max) volume.  As mentioned, I don&#8217;t know Actionscript, but it seems that, if there is a reason these problems wont occur, then that should be mentioned, since it&#8217;s not very intuitive.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tinku TR</title>
		<link>http://www.schoolofflash.com/blog/2008/03/flash-cs3-tutorial-volume-slider/comment-page-1/#comment-240</link>
		<dc:creator>Tinku TR</dc:creator>
		<pubDate>Thu, 28 May 2009 04:34:04 +0000</pubDate>
		<guid isPermaLink="false">http://schoolofflash.com/2008/03/29/flash-cs3-tutorial-volume-slider/#comment-240</guid>
		<description>Thanks . nice and usable code</description>
		<content:encoded><![CDATA[<p>Thanks . nice and usable code</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: NickSF</title>
		<link>http://www.schoolofflash.com/blog/2008/03/flash-cs3-tutorial-volume-slider/comment-page-1/#comment-239</link>
		<dc:creator>NickSF</dc:creator>
		<pubDate>Tue, 31 Mar 2009 03:51:08 +0000</pubDate>
		<guid isPermaLink="false">http://schoolofflash.com/2008/03/29/flash-cs3-tutorial-volume-slider/#comment-239</guid>
		<description>Hey, the face made by the layout looks kinda sad... like maybe he&#039;s sick and has a thermometer in his mouth.

I hope he feels better soon!</description>
		<content:encoded><![CDATA[<p>Hey, the face made by the layout looks kinda sad&#8230; like maybe he&#8217;s sick and has a thermometer in his mouth.</p>
<p>I hope he feels better soon!</p>
]]></content:encoded>
	</item>
</channel>
</rss>
