<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
	>
<channel>
	<title>Comments on: Flash: Mp3Player Pause Button</title>
	<atom:link href="http://blog.six4rty.ch/tutorials/flash-create-a-full-streaming-flash-mp3-player-using-xml-pt-3/flash-mp3player-pause-button/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.six4rty.ch</link>
	<description>Code &#38; Technology Aficionado - Come for the Flash, stay for more!</description>
	<lastBuildDate>Wed, 08 Sep 2010 03:09:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Anonymous</title>
		<link>http://blog.six4rty.ch/tutorials/flash-create-a-full-streaming-flash-mp3-player-using-xml-pt-3/flash-mp3player-pause-button/comment-page-1/#comment-57039</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Mon, 22 Jun 2009 19:20:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.six4rty.ch/tutorials/flash-create-a-full-streaming-flash-mp3-player-using-xml-pt-3/flash-mp3player-pause-button/#comment-57039</guid>
		<description>instead of stopping the music try to set the volume to 0 so it still keeps playing but you can&#039;t hear it&lt;a href=&quot;#comment-20104&quot; rel=&quot;nofollow&quot;&gt;@Marty &lt;/a&gt;</description>
		<content:encoded><![CDATA[<p>instead of stopping the music try to set the volume to 0 so it still keeps playing but you can&#8217;t hear it<a href="#comment-20104" rel="nofollow">@Marty </a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mohamed</title>
		<link>http://blog.six4rty.ch/tutorials/flash-create-a-full-streaming-flash-mp3-player-using-xml-pt-3/flash-mp3player-pause-button/comment-page-1/#comment-53642</link>
		<dc:creator>mohamed</dc:creator>
		<pubDate>Wed, 22 Apr 2009 09:41:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.six4rty.ch/tutorials/flash-create-a-full-streaming-flash-mp3-player-using-xml-pt-3/flash-mp3player-pause-button/#comment-53642</guid>
		<description>hi all,

I put the code in my mp3 player that is with xml, it includes 2 buttons one for the play and the other for pausing, and when it starts the first song and I click pause the song stops then i click play it starts from the position it stopped in.

When it goes to the second song I click in pause then I click on play but this time it goes to the third song and it is also in all the other songs.

so please I need help on making it stops and plays in all the songs.

Thank u all.</description>
		<content:encoded><![CDATA[<p>hi all,</p>
<p>I put the code in my mp3 player that is with xml, it includes 2 buttons one for the play and the other for pausing, and when it starts the first song and I click pause the song stops then i click play it starts from the position it stopped in.</p>
<p>When it goes to the second song I click in pause then I click on play but this time it goes to the third song and it is also in all the other songs.</p>
<p>so please I need help on making it stops and plays in all the songs.</p>
<p>Thank u all.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mohamed</title>
		<link>http://blog.six4rty.ch/tutorials/flash-create-a-full-streaming-flash-mp3-player-using-xml-pt-3/flash-mp3player-pause-button/comment-page-1/#comment-53612</link>
		<dc:creator>mohamed</dc:creator>
		<pubDate>Tue, 21 Apr 2009 21:08:56 +0000</pubDate>
		<guid isPermaLink="false">http://blog.six4rty.ch/tutorials/flash-create-a-full-streaming-flash-mp3-player-using-xml-pt-3/flash-mp3player-pause-button/#comment-53612</guid>
		<description>Thank u very much i searched alot about that code,and this is the only site i found my answer.

Thank u again.</description>
		<content:encoded><![CDATA[<p>Thank u very much i searched alot about that code,and this is the only site i found my answer.</p>
<p>Thank u again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: White</title>
		<link>http://blog.six4rty.ch/tutorials/flash-create-a-full-streaming-flash-mp3-player-using-xml-pt-3/flash-mp3player-pause-button/comment-page-1/#comment-41832</link>
		<dc:creator>White</dc:creator>
		<pubDate>Tue, 19 Aug 2008 02:54:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.six4rty.ch/tutorials/flash-create-a-full-streaming-flash-mp3-player-using-xml-pt-3/flash-mp3player-pause-button/#comment-41832</guid>
		<description>hi tiago 
when i add play pause and stop 

and when i click first play then pause and then play and then stop it functions properly afterwards i click play the song is playin from start but the timer is static on 00:00
will u see this code

btn_play.onRelease = function() {
    if (pause == true){
        this._parent.sound_mc.sound_obj.start(posiP) // start sound from the previously saved position
    }
		
    else {
    clearInterval(timeInterval);
    this._parent.timeDisplay_txt.text = &quot;00:00&quot;;
    this._parent.sound_mc.songStarter(songfile[song_nr],songname[song_nr]);
    }
};
btn_pause.onRelease = function() { 
    this._parent.sound_mc.sound_obj.stop(); //stop the current sound
    posiP = sound_mc.sound_obj.position / 1000; // save the current position in a new variable and divide by 1000 (ms -&gt; sec)
    pause = true;//set the variable pause to true
}
btn_stop.onRelease = function() {
	clearInterval(timeInterval);
this._parent.timeDisplay_txt.text=&quot;00:00&quot;;
this._parent.sound_mc.sound_obj.stop();
this._parent.sound_mc.sound_obj.position = 0;
posiP = 0;
}</description>
		<content:encoded><![CDATA[<p>hi tiago<br />
when i add play pause and stop </p>
<p>and when i click first play then pause and then play and then stop it functions properly afterwards i click play the song is playin from start but the timer is static on 00:00<br />
will u see this code</p>
<p>btn_play.onRelease = function() {<br />
    if (pause == true){<br />
        this._parent.sound_mc.sound_obj.start(posiP) // start sound from the previously saved position<br />
    }</p>
<p>    else {<br />
    clearInterval(timeInterval);<br />
    this._parent.timeDisplay_txt.text = &#8220;00:00&#8243;;<br />
    this._parent.sound_mc.songStarter(songfile[song_nr],songname[song_nr]);<br />
    }<br />
};<br />
btn_pause.onRelease = function() {<br />
    this._parent.sound_mc.sound_obj.stop(); //stop the current sound<br />
    posiP = sound_mc.sound_obj.position / 1000; // save the current position in a new variable and divide by 1000 (ms -&gt; sec)<br />
    pause = true;//set the variable pause to true<br />
}<br />
btn_stop.onRelease = function() {<br />
	clearInterval(timeInterval);<br />
this._parent.timeDisplay_txt.text=&#8221;00:00&#8243;;<br />
this._parent.sound_mc.sound_obj.stop();<br />
this._parent.sound_mc.sound_obj.position = 0;<br />
posiP = 0;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Joseph</title>
		<link>http://blog.six4rty.ch/tutorials/flash-create-a-full-streaming-flash-mp3-player-using-xml-pt-3/flash-mp3player-pause-button/comment-page-1/#comment-41633</link>
		<dc:creator>Joseph</dc:creator>
		<pubDate>Wed, 13 Aug 2008 20:17:49 +0000</pubDate>
		<guid isPermaLink="false">http://blog.six4rty.ch/tutorials/flash-create-a-full-streaming-flash-mp3-player-using-xml-pt-3/flash-mp3player-pause-button/#comment-41633</guid>
		<description>christie:
place the two buttons on the stage in the same position, make the play button on top, in ActionScript set the visibilty of the btn_play to false (on loadup):

stop();
btn_play._visible=false;
playlist= new XML();
playlist.ignoreWhite=true;
...

then in the pause button script make it visible:

btn_play._visible=true;

then in play button script make it invisible again:

btn_play._visible=false;</description>
		<content:encoded><![CDATA[<p>christie:<br />
place the two buttons on the stage in the same position, make the play button on top, in ActionScript set the visibilty of the btn_play to false (on loadup):</p>
<p>stop();<br />
btn_play._visible=false;<br />
playlist= new XML();<br />
playlist.ignoreWhite=true;<br />
&#8230;</p>
<p>then in the pause button script make it visible:</p>
<p>btn_play._visible=true;</p>
<p>then in play button script make it invisible again:</p>
<p>btn_play._visible=false;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fian</title>
		<link>http://blog.six4rty.ch/tutorials/flash-create-a-full-streaming-flash-mp3-player-using-xml-pt-3/flash-mp3player-pause-button/comment-page-1/#comment-38303</link>
		<dc:creator>fian</dc:creator>
		<pubDate>Mon, 30 Jun 2008 13:51:18 +0000</pubDate>
		<guid isPermaLink="false">http://blog.six4rty.ch/tutorials/flash-create-a-full-streaming-flash-mp3-player-using-xml-pt-3/flash-mp3player-pause-button/#comment-38303</guid>
		<description>&lt;a href=&quot;&quot; title=&quot; About stop button&quot; rel=&quot;nofollow&quot;&gt;
 &lt;b&gt;&lt;/b&gt;&lt;/a&gt;</description>
		<content:encoded><![CDATA[<p><a href="" title=" About stop button" rel="nofollow"><br />
 <b></b></a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: fian</title>
		<link>http://blog.six4rty.ch/tutorials/flash-create-a-full-streaming-flash-mp3-player-using-xml-pt-3/flash-mp3player-pause-button/comment-page-1/#comment-38302</link>
		<dc:creator>fian</dc:creator>
		<pubDate>Mon, 30 Jun 2008 13:49:47 +0000</pubDate>
		<guid isPermaLink="false">http://blog.six4rty.ch/tutorials/flash-create-a-full-streaming-flash-mp3-player-using-xml-pt-3/flash-mp3player-pause-button/#comment-38302</guid>
		<description>&lt;a href=&quot;&quot; title=&quot; About stop button&quot; rel=&quot;nofollow&quot;&gt;
 &lt;/a&gt;</description>
		<content:encoded><![CDATA[<p><a href="" title=" About stop button" rel="nofollow"><br />
 </a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Christie</title>
		<link>http://blog.six4rty.ch/tutorials/flash-create-a-full-streaming-flash-mp3-player-using-xml-pt-3/flash-mp3player-pause-button/comment-page-1/#comment-37242</link>
		<dc:creator>Christie</dc:creator>
		<pubDate>Fri, 13 Jun 2008 20:25:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.six4rty.ch/tutorials/flash-create-a-full-streaming-flash-mp3-player-using-xml-pt-3/flash-mp3player-pause-button/#comment-37242</guid>
		<description>Hi Tiago,
Is there a way to make it so that the pause and play button are in the same location (when the song is playing, the button shows pause.. when the song is paused or stopped, the button shows play)?</description>
		<content:encoded><![CDATA[<p>Hi Tiago,<br />
Is there a way to make it so that the pause and play button are in the same location (when the song is playing, the button shows pause.. when the song is paused or stopped, the button shows play)?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jerry</title>
		<link>http://blog.six4rty.ch/tutorials/flash-create-a-full-streaming-flash-mp3-player-using-xml-pt-3/flash-mp3player-pause-button/comment-page-1/#comment-35693</link>
		<dc:creator>Jerry</dc:creator>
		<pubDate>Wed, 14 May 2008 15:10:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.six4rty.ch/tutorials/flash-create-a-full-streaming-flash-mp3-player-using-xml-pt-3/flash-mp3player-pause-button/#comment-35693</guid>
		<description>Hey Tiago! This tutorial is great! I have yet to find one as good as this one. I have to small problems that I hope are easy fixes. For the pause button, I used both your way and Mayanks way as welll and it seems to work ok at first, but as the tracks play, if I press pause it either jumps ahead in the song after I hit play from being paused, or it just jumps to the next song after I press play from being paused. Also, I inserted  ‘pause = false;” at the end of the stop button, and it stops the song perfectly and then starts it from the beginning, which is exactly what I want it to do, but it displays &#039;undefined&#039; in the text box instead of the song title. Can these 2 things be fixed? Here is my entire code on my actions layer so it may help you figure out if it is an error on my part. Thanks again.


playlist = new XML();
playlist.ignoreWhite = true;
playlist.onLoad = function(success) {
	if (success) {
		_global.songname = [];
		_global.songband = [];
		_global.songfile = [];
		for (var i = 0; i0) {
			delete this.onEnterFrame;
			this._parent.display_txt.text = name;
		} else {
			this._parent.display_txt.text = &quot;loading...&quot;;
		}
	}
	this.sound_obj.onSoundComplete = function (){
(song_nr==songfile.length-1)? _global.song_nr=0 : _global.song_nr++;
_root.sound_mc.songStarter(songfile[song_nr],songname[song_nr]);
}
}
btn_play.onRelease = function() {
    if (pause == true){ 
        this._parent.sound_mc.sound_obj.start(posiP) 
    }
    else {
    clearInterval(timeInterval);
    _root.timeDisplay_txt.text = &quot;00:00/00:00&quot;;
    this._parent.sound_mc.songStarter(songfile[song_nr]);
    }
};
btn_stop.onRelease = function() {
	this._parent.sound_mc.sound_obj.stop();
	pause = false;
};
btn_fw.onRelease = function() {
	(song_nr == songfile.length-1) ? _global.song_nr=0 : _global.song_nr++;
	_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);
};
btn_rev.onRelease = function() {
	(song_nr == 0) ? _global.song_nr=songfile.length-1 : _global.song_nr--;
	_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);
};
btn_pause.onRelease = function() { 
    this._parent.sound_mc.sound_obj.stop(); 
    posiP = _root.sound_mc.sound_obj.position / 1000; 
    pause = true;
};
playlist.load(&quot;http://www.iamtheboogeyman.com/myspace/TheShape/flash/themesongs.xml&quot;);</description>
		<content:encoded><![CDATA[<p>Hey Tiago! This tutorial is great! I have yet to find one as good as this one. I have to small problems that I hope are easy fixes. For the pause button, I used both your way and Mayanks way as welll and it seems to work ok at first, but as the tracks play, if I press pause it either jumps ahead in the song after I hit play from being paused, or it just jumps to the next song after I press play from being paused. Also, I inserted  ‘pause = false;” at the end of the stop button, and it stops the song perfectly and then starts it from the beginning, which is exactly what I want it to do, but it displays &#8216;undefined&#8217; in the text box instead of the song title. Can these 2 things be fixed? Here is my entire code on my actions layer so it may help you figure out if it is an error on my part. Thanks again.</p>
<p>playlist = new XML();<br />
playlist.ignoreWhite = true;<br />
playlist.onLoad = function(success) {<br />
	if (success) {<br />
		_global.songname = [];<br />
		_global.songband = [];<br />
		_global.songfile = [];<br />
		for (var i = 0; i0) {<br />
			delete this.onEnterFrame;<br />
			this._parent.display_txt.text = name;<br />
		} else {<br />
			this._parent.display_txt.text = &#8220;loading&#8230;&#8221;;<br />
		}<br />
	}<br />
	this.sound_obj.onSoundComplete = function (){<br />
(song_nr==songfile.length-1)? _global.song_nr=0 : _global.song_nr++;<br />
_root.sound_mc.songStarter(songfile[song_nr],songname[song_nr]);<br />
}<br />
}<br />
btn_play.onRelease = function() {<br />
    if (pause == true){<br />
        this._parent.sound_mc.sound_obj.start(posiP)<br />
    }<br />
    else {<br />
    clearInterval(timeInterval);<br />
    _root.timeDisplay_txt.text = &#8220;00:00/00:00&#8243;;<br />
    this._parent.sound_mc.songStarter(songfile[song_nr]);<br />
    }<br />
};<br />
btn_stop.onRelease = function() {<br />
	this._parent.sound_mc.sound_obj.stop();<br />
	pause = false;<br />
};<br />
btn_fw.onRelease = function() {<br />
	(song_nr == songfile.length-1) ? _global.song_nr=0 : _global.song_nr++;<br />
	_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);<br />
};<br />
btn_rev.onRelease = function() {<br />
	(song_nr == 0) ? _global.song_nr=songfile.length-1 : _global.song_nr&#8211;;<br />
	_root.sound_mc.songStarter(songfile[song_nr], songname[song_nr]);<br />
};<br />
btn_pause.onRelease = function() {<br />
    this._parent.sound_mc.sound_obj.stop();<br />
    posiP = _root.sound_mc.sound_obj.position / 1000;<br />
    pause = true;<br />
};<br />
playlist.load(&#8220;http://www.iamtheboogeyman.com/myspace/TheShape/flash/themesongs.xml&#8221;);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lisa</title>
		<link>http://blog.six4rty.ch/tutorials/flash-create-a-full-streaming-flash-mp3-player-using-xml-pt-3/flash-mp3player-pause-button/comment-page-1/#comment-30004</link>
		<dc:creator>Lisa</dc:creator>
		<pubDate>Sat, 12 Jan 2008 18:47:09 +0000</pubDate>
		<guid isPermaLink="false">http://blog.six4rty.ch/tutorials/flash-create-a-full-streaming-flash-mp3-player-using-xml-pt-3/flash-mp3player-pause-button/#comment-30004</guid>
		<description>Thank you so much for these excellent tutorials. I am now creating my second website with your mp3 player and on this one I would love to have a play/pause toggle button. To this effect I have created and named 2 frames and have the text &#039;STOP&#039; in one frame and &#039;GO&#039; in the other. I have added the script &lt;code&gt;gotoAndPlay(&quot;goframe&quot;);&lt;/code&gt; to the actionscript coding for the pause button and the &lt;code&gt;gotoAndPlay(&quot;pauseframe&quot;);&lt;/code&gt; to the play button actionscript. I have also added the actionscript &lt;code&gt;stop();&lt;/code&gt; to frame2 (named goframe).
So far the &#039;button&#039; works when it reads STOP ie it will pause the sound and the text will be replaced with GO but then nothing happens when I press the word GO.
Is it possible you could help me get this working or point me in a direction elsewhere on the net.
Thank you so much.</description>
		<content:encoded><![CDATA[<p>Thank you so much for these excellent tutorials. I am now creating my second website with your mp3 player and on this one I would love to have a play/pause toggle button. To this effect I have created and named 2 frames and have the text &#8216;STOP&#8217; in one frame and &#8216;GO&#8217; in the other. I have added the script <code>gotoAndPlay("goframe");</code> to the actionscript coding for the pause button and the <code>gotoAndPlay("pauseframe");</code> to the play button actionscript. I have also added the actionscript <code>stop();</code> to frame2 (named goframe).<br />
So far the &#8216;button&#8217; works when it reads STOP ie it will pause the sound and the text will be replaced with GO but then nothing happens when I press the word GO.<br />
Is it possible you could help me get this working or point me in a direction elsewhere on the net.<br />
Thank you so much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marty</title>
		<link>http://blog.six4rty.ch/tutorials/flash-create-a-full-streaming-flash-mp3-player-using-xml-pt-3/flash-mp3player-pause-button/comment-page-1/#comment-20104</link>
		<dc:creator>Marty</dc:creator>
		<pubDate>Fri, 26 Oct 2007 08:39:51 +0000</pubDate>
		<guid isPermaLink="false">http://blog.six4rty.ch/tutorials/flash-create-a-full-streaming-flash-mp3-player-using-xml-pt-3/flash-mp3player-pause-button/#comment-20104</guid>
		<description>Just wanted to great tutorials,
I used your code for the pause button, but found that the stop button didn&#039;t reset the song, also similar probs if pressing rev or fwd. I added &#039;pause = false;&quot; code under all other buttons and now it works great. Only problem, which would be awesome if you could solve, is that if a track is playing then i would like the play button to do nothing!! currently it seems to restart the track which could be annoying for users. Thanks for help! ps.</description>
		<content:encoded><![CDATA[<p>Just wanted to great tutorials,<br />
I used your code for the pause button, but found that the stop button didn&#8217;t reset the song, also similar probs if pressing rev or fwd. I added &#8216;pause = false;&#8221; code under all other buttons and now it works great. Only problem, which would be awesome if you could solve, is that if a track is playing then i would like the play button to do nothing!! currently it seems to restart the track which could be annoying for users. Thanks for help! ps.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tiago</title>
		<link>http://blog.six4rty.ch/tutorials/flash-create-a-full-streaming-flash-mp3-player-using-xml-pt-3/flash-mp3player-pause-button/comment-page-1/#comment-14628</link>
		<dc:creator>Tiago</dc:creator>
		<pubDate>Wed, 08 Aug 2007 21:02:45 +0000</pubDate>
		<guid isPermaLink="false">http://blog.six4rty.ch/tutorials/flash-create-a-full-streaming-flash-mp3-player-using-xml-pt-3/flash-mp3player-pause-button/#comment-14628</guid>
		<description>&lt;strong&gt;Linda:&lt;/strong&gt;
You just need to set random to 0 :)

&lt;strong&gt;Sanfly:&lt;/strong&gt; hmm.. looks like I missed a line of code in the tutorial.. As I mentioned before on your previous comment (part3) send me the fla file and I will have a look at it.
Regarding the upgrading to a newer flash version, definately a must ;)</description>
		<content:encoded><![CDATA[<p><strong>Linda:</strong><br />
You just need to set random to 0 <img src='http://blog.six4rty.ch/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><strong>Sanfly:</strong> hmm.. looks like I missed a line of code in the tutorial.. As I mentioned before on your previous comment (part3) send me the fla file and I will have a look at it.<br />
Regarding the upgrading to a newer flash version, definately a must <img src='http://blog.six4rty.ch/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
</channel>
</rss>
