

































<?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: How to Build a Basic Slider Widget (AS2)</title>
	<link>http://www.quip.net/blog/2007/flash/how-to-build-basic-slider-as2</link>
	<description>Luck is the residue of good design.</description>
	<pubDate>Tue, 07 Feb 2012 19:47:06 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.2</generator>

	<item>
		<title>by: mike simpson</title>
		<link>http://www.quip.net/blog/2007/flash/how-to-build-basic-slider-as2#comment-307156</link>
		<pubDate>Thu, 27 Nov 2008 22:00:58 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/how-to-build-basic-slider-as2#comment-307156</guid>
					<description>On Second thoughts....

the onMouseMove event is to make the volume &quot;knob&quot; appear at the correct position along the &quot;track&quot; - this needs to update whenever the &quot;knob&quot; moves so it seems logical to use the onMouseMove event...please correct me if i'm missing something here.

However - It appears that the mute button does work i.e. i have traced to see if it knows it has been clicked and it does. I'm gonna take a while to work out what it is that doesn't work though!

Mike</description>
		<content:encoded><![CDATA[<p>On Second thoughts&#8230;.</p>
<p>the onMouseMove event is to make the volume &#8220;knob&#8221; appear at the correct position along the &#8220;track&#8221; - this needs to update whenever the &#8220;knob&#8221; moves so it seems logical to use the onMouseMove event&#8230;please correct me if i&#8217;m missing something here.</p>
<p>However - It appears that the mute button does work i.e. i have traced to see if it knows it has been clicked and it does. I&#8217;m gonna take a while to work out what it is that doesn&#8217;t work though!</p>
<p>Mike
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: mike simpson</title>
		<link>http://www.quip.net/blog/2007/flash/how-to-build-basic-slider-as2#comment-307095</link>
		<pubDate>Thu, 27 Nov 2008 20:46:41 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/how-to-build-basic-slider-as2#comment-307095</guid>
					<description>HI David,

Thanks for taking a look at this and making me dig around a bit more...it's good to learn that way and i like the challenge.
I do know about the trace function and have used it in other parts of my code but hadn't actually thought of using it to check when the button had been pressed.

Also, thanks for the pointer on the onMouseMove event....makes perfect sense.

Sorry the code was so long but i just copied and pasted it as it stood and there's a lot of comments and old code in there for me to be able to see what's going on.

watch this space please and thanks again.

Mike</description>
		<content:encoded><![CDATA[<p>HI David,</p>
<p>Thanks for taking a look at this and making me dig around a bit more&#8230;it&#8217;s good to learn that way and i like the challenge.<br />
I do know about the trace function and have used it in other parts of my code but hadn&#8217;t actually thought of using it to check when the button had been pressed.</p>
<p>Also, thanks for the pointer on the onMouseMove event&#8230;.makes perfect sense.</p>
<p>Sorry the code was so long but i just copied and pasted it as it stood and there&#8217;s a lot of comments and old code in there for me to be able to see what&#8217;s going on.</p>
<p>watch this space please and thanks again.</p>
<p>Mike
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: David Stiller</title>
		<link>http://www.quip.net/blog/2007/flash/how-to-build-basic-slider-as2#comment-306573</link>
		<pubDate>Thu, 27 Nov 2008 02:10:42 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/how-to-build-basic-slider-as2#comment-306573</guid>
					<description>mike,

I read through the relevant parts of your code (at least, what I &lt;em&gt;thought&lt;/em&gt; would be relevant!), and it looks all right so far.  Granted, it's the end of a long day for me.  ;)  I do notice you have an &lt;code&gt;if&lt;/code&gt; statement in the mute button's event handler, so that means it isn't just a click-and-respond item:  there's some decision-making involved, and that might lead to what you're seeing.

Do you know about the &lt;code&gt;trace()&lt;/code&gt; function?  That might really come in handy for you, because it lets you see what's going on under the hood.  It's one of those very lightweight, but indispensable, tools that eventually become a consistent part of your everyday workflow.

The first thing you'll want to do, as you begin troubleshooting, is get into the habit of questioning your assumptions.  It seems like the button doesn't respond on the first click &amp;#8212; but are you sure?  (You might actually be right; if so, there's a reason for the necessary second click ... but you might just as well have misjudged something, and &lt;code&gt;trace()&lt;/code&gt; will help you track down whatever's unclear.

All &lt;code&gt;trace()&lt;/code&gt; does is send message to your Output panel, but that's a useful thing.  Pop that function into your event handler just prior to the &lt;code&gt;if&lt;/code&gt;:

&lt;pre&gt;&lt;code&gt;mute.onRelease = function():Void {
  trace(&amp;#34;mute button clicked&amp;#34;)
  if (isMuted) {
    isMuted = false;
    // ...&lt;/code&gt;&lt;/pre&gt;

... that'll tell you right off the bat if the button does (or does not) respond to the first click.  If it does, you'll see the phrase &quot;mute button clicked&quot; in the Output panel, even if nothing else seems to happen.  At that point, you can start tracing other values, such as variables like &lt;code&gt;isMuted&lt;/code&gt;, to start poking around even more.

I confess, I didn't pore through every line of your code carefully, but a couple probably unrelated things jumped out at me:  a) you probably don't want to send &lt;code&gt;mute&lt;/code&gt;'s timeline to a frame in response to an &lt;code&gt;onMouseMove&lt;/code&gt; event, simply because that event can fire hundreds of times in succession (seems like all you really need to do is invoke that &lt;code&gt;gotoAndStop()&lt;/code&gt; method once, during the course of the &lt;code&gt;onPress&lt;/code&gt; handler you're already in, and b) in one of your commented &lt;code&gt;mute&lt;/code&gt; button event handlers, you're checking of &lt;code&gt;so&lt;/code&gt;'s volume is greater than 100.  In theory, it should only ever fall between 0 and 100, so you might want an &lt;code&gt;&gt;=&lt;/code&gt; comparison there instead.</description>
		<content:encoded><![CDATA[<p>mike,</p>
<p>I read through the relevant parts of your code (at least, what I <em>thought</em> would be relevant!), and it looks all right so far.  Granted, it&#8217;s the end of a long day for me.  <img src='http://www.quip.net/blog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />   I do notice you have an <code>if</code> statement in the mute button&#8217;s event handler, so that means it isn&#8217;t just a click-and-respond item:  there&#8217;s some decision-making involved, and that might lead to what you&#8217;re seeing.</p>
<p>Do you know about the <code>trace()</code> function?  That might really come in handy for you, because it lets you see what&#8217;s going on under the hood.  It&#8217;s one of those very lightweight, but indispensable, tools that eventually become a consistent part of your everyday workflow.</p>
<p>The first thing you&#8217;ll want to do, as you begin troubleshooting, is get into the habit of questioning your assumptions.  It seems like the button doesn&#8217;t respond on the first click &mdash; but are you sure?  (You might actually be right; if so, there&#8217;s a reason for the necessary second click &#8230; but you might just as well have misjudged something, and <code>trace()</code> will help you track down whatever&#8217;s unclear.</p>
<p>All <code>trace()</code> does is send message to your Output panel, but that&#8217;s a useful thing.  Pop that function into your event handler just prior to the <code>if</code>:</p>
<pre><code>mute.onRelease = function():Void {
  trace(&quot;mute button clicked&quot;)
  if (isMuted) {
    isMuted = false;
    // ...</code></pre>
<p>&#8230; that&#8217;ll tell you right off the bat if the button does (or does not) respond to the first click.  If it does, you&#8217;ll see the phrase &#8220;mute button clicked&#8221; in the Output panel, even if nothing else seems to happen.  At that point, you can start tracing other values, such as variables like <code>isMuted</code>, to start poking around even more.</p>
<p>I confess, I didn&#8217;t pore through every line of your code carefully, but a couple probably unrelated things jumped out at me:  a) you probably don&#8217;t want to send <code>mute</code>&#8217;s timeline to a frame in response to an <code>onMouseMove</code> event, simply because that event can fire hundreds of times in succession (seems like all you really need to do is invoke that <code>gotoAndStop()</code> method once, during the course of the <code>onPress</code> handler you&#8217;re already in, and b) in one of your commented <code>mute</code> button event handlers, you&#8217;re checking of <code>so</code>&#8217;s volume is greater than 100.  In theory, it should only ever fall between 0 and 100, so you might want an <code>>=</code> comparison there instead.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: mike simpson</title>
		<link>http://www.quip.net/blog/2007/flash/how-to-build-basic-slider-as2#comment-304244</link>
		<pubDate>Sun, 23 Nov 2008 11:17:18 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/how-to-build-basic-slider-as2#comment-304244</guid>
					<description>I forgot to add...

my mute button has four different state with frame labels for each and a stop action in frame 1. labels are as follows:
on, onOver, mute and muteOver

i would like to be able to control the playhead for the mute movieclip position via the AS. I hope that makes sense and sorry for not mentioning the movieclip  before, (although i guess you may have spotted what i was doing/trying to do.)

Thanks in advance for any help,

Mike</description>
		<content:encoded><![CDATA[<p>I forgot to add&#8230;</p>
<p>my mute button has four different state with frame labels for each and a stop action in frame 1. labels are as follows:<br />
on, onOver, mute and muteOver</p>
<p>i would like to be able to control the playhead for the mute movieclip position via the AS. I hope that makes sense and sorry for not mentioning the movieclip  before, (although i guess you may have spotted what i was doing/trying to do.)</p>
<p>Thanks in advance for any help,</p>
<p>Mike
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: mike simpson</title>
		<link>http://www.quip.net/blog/2007/flash/how-to-build-basic-slider-as2#comment-304239</link>
		<pubDate>Sun, 23 Nov 2008 11:10:09 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/how-to-build-basic-slider-as2#comment-304239</guid>
					<description>Because i'm very new to AS i have found this blog to be an incredible source of knowledge so firstly thank you to David.

I'm surprised i can't find the answer to my issue here already.

I've been using this blog/thread to work out how to control a volume knob for my FLV player and to work out how to control a mute button.
Thanks to this thread and others i have a working fader and had managed to have a mute button that toggles on and off and puts the fader knob back to the correct place when toggled back off etc...

If i mute my audio then i drag the slider the audio responds as i would like HOWEVER...my mute button does not respond on the first click but does if it is clicked a second time.

I'm guessing this is because i have some code in the wrong place or just got something horribly wrong!

I'd really appreciate some help and expect this to be useful for others too if they are having the same problem.

hers my code i hope:

// sound control starts here
_root.createEmptyMovieClip(&quot;vSound&quot;,_root.getNextHighestDepth());
vSound.attachAudio(ns);

var so:Sound = new Sound(vSound);

so.setVolume(50);
// set initial volumeknob position to half way along track
// ****
volumeknob._x = track._x + (track._width/2)
volumeknob._y = track._y

// trace various positions to check position of volumeknob compared to track
trace(track._x);
var trackpositionr:Number
trackpositionr = (track._x + track._width);
trace(trackpositionr);
// trace the sidth of track and store in var
trace(trackpositionr - track._x);
var trackwidth = (trackpositionr - track._x);
// these next two values should be the same if all is well
trace(track._x + trackwidth/4);
trace(volumeknob._x);
// ****

// slider sound controls start here i hope
var ratio:Number = track._width / 100;


volumeknob.onPress = function():Void {
 var vertical:Number = track._y + (track._height / 2);
 this.startDrag(
  true,
  track._x,
  vertical,
  track._x + track._width,
  vertical
 
 );
 this.onMouseMove = updateKnobOutput;
// make &quot;mute&quot; state display the not muted position because the volumeknob as ben moved
 mute.gotoAndStop(&quot;on&quot;);
}

volumeknob.onRelease = function():Void {
 this.stopDrag();
 delete this.onMouseMove;

// set preVolume to equal the volumeknob current position value so that
// if &quot;mute&quot; is depressed again the volumeknob doesn't get altered
// not sure if this is the correct way of implementing but it seems to work
 prevVolume = volumeknob._x;
}

volumeknob.onReleaseOutside = knob.onRelease;

function updateKnobOutput():Void {
 so.setVolume((volumeknob._x - track._x) / ratio);
 
}
// slider sound controls end here

// ****
// new mute on or off starts here

var isMuted:Boolean = false;
var prevVolume:Number = 0;
mute.onRelease = function():Void {
  if (isMuted) {
    isMuted = false;
    volumeknob._x = prevVolume;
	so.setVolume((volumeknob._x - track._x) / ratio);
	mute.gotoAndStop(&quot;on&quot;);
	
  }
  else {
    isMuted = true;
    prevVolume = volumeknob._x;
    volumeknob._x = track._x;
	so.setVolume((volumeknob._x - track._x) / ratio);
	mute.gotoAndStop(&quot;mute&quot;);
	}
}


// me trying to get the rollover states of mute working again
// ****
// this was the code for the mute prior to having a volume slider
// with code that automatically turned the mute on or off and
// reset the position of the volumeknob when pressed
// ****
//mute.onRollOver = function() {
//	if(so.getVolume()== 100) {
//		this.gotoAndStop(&quot;onOver&quot;);
//	}
//	else {
//		this.gotoAndStop(&quot;muteOver&quot;);
//	}
//}

//mute.onRollOut = function() {
//	if(so.getVolume()&amp;#62; 100) {
//		this.gotoAndStop(&quot;on&quot;);
//	}
//	else {
//		this.gotoAndStop(&quot;mute&quot;);
//	}
//}
//
//mute.onRelease = function() {
//	if(so.getVolume()== 100) {
//		so.setVolume(0);
//		this.gotoAndStop(&quot;muteOver&quot;);
//	}
//	else {
//		so.setVolume(100);
//		this.gotoAndStop(&quot;onOver&quot;);
//	}
//}
// ****

// mute on or off ends here
// ****
// Still need to check when mute is on so that if it is and the volumeslider is moved
// the &quot;mute&quot; button movie clip moves to the &quot;on&quot; label therefore displaying
// the mute off state
// ****</description>
		<content:encoded><![CDATA[<p>Because i&#8217;m very new to AS i have found this blog to be an incredible source of knowledge so firstly thank you to David.</p>
<p>I&#8217;m surprised i can&#8217;t find the answer to my issue here already.</p>
<p>I&#8217;ve been using this blog/thread to work out how to control a volume knob for my FLV player and to work out how to control a mute button.<br />
Thanks to this thread and others i have a working fader and had managed to have a mute button that toggles on and off and puts the fader knob back to the correct place when toggled back off etc&#8230;</p>
<p>If i mute my audio then i drag the slider the audio responds as i would like HOWEVER&#8230;my mute button does not respond on the first click but does if it is clicked a second time.</p>
<p>I&#8217;m guessing this is because i have some code in the wrong place or just got something horribly wrong!</p>
<p>I&#8217;d really appreciate some help and expect this to be useful for others too if they are having the same problem.</p>
<p>hers my code i hope:</p>
<p>// sound control starts here<br />
_root.createEmptyMovieClip(&#8221;vSound&#8221;,_root.getNextHighestDepth());<br />
vSound.attachAudio(ns);</p>
<p>var so:Sound = new Sound(vSound);</p>
<p>so.setVolume(50);<br />
// set initial volumeknob position to half way along track<br />
// ****<br />
volumeknob._x = track._x + (track._width/2)<br />
volumeknob._y = track._y</p>
<p>// trace various positions to check position of volumeknob compared to track<br />
trace(track._x);<br />
var trackpositionr:Number<br />
trackpositionr = (track._x + track._width);<br />
trace(trackpositionr);<br />
// trace the sidth of track and store in var<br />
trace(trackpositionr - track._x);<br />
var trackwidth = (trackpositionr - track._x);<br />
// these next two values should be the same if all is well<br />
trace(track._x + trackwidth/4);<br />
trace(volumeknob._x);<br />
// ****</p>
<p>// slider sound controls start here i hope<br />
var ratio:Number = track._width / 100;</p>
<p>volumeknob.onPress = function():Void {<br />
 var vertical:Number = track._y + (track._height / 2);<br />
 this.startDrag(<br />
  true,<br />
  track._x,<br />
  vertical,<br />
  track._x + track._width,<br />
  vertical</p>
<p> );<br />
 this.onMouseMove = updateKnobOutput;<br />
// make &#8220;mute&#8221; state display the not muted position because the volumeknob as ben moved<br />
 mute.gotoAndStop(&#8221;on&#8221;);<br />
}</p>
<p>volumeknob.onRelease = function():Void {<br />
 this.stopDrag();<br />
 delete this.onMouseMove;</p>
<p>// set preVolume to equal the volumeknob current position value so that<br />
// if &#8220;mute&#8221; is depressed again the volumeknob doesn&#8217;t get altered<br />
// not sure if this is the correct way of implementing but it seems to work<br />
 prevVolume = volumeknob._x;<br />
}</p>
<p>volumeknob.onReleaseOutside = knob.onRelease;</p>
<p>function updateKnobOutput():Void {<br />
 so.setVolume((volumeknob._x - track._x) / ratio);</p>
<p>}<br />
// slider sound controls end here</p>
<p>// ****<br />
// new mute on or off starts here</p>
<p>var isMuted:Boolean = false;<br />
var prevVolume:Number = 0;<br />
mute.onRelease = function():Void {<br />
  if (isMuted) {<br />
    isMuted = false;<br />
    volumeknob._x = prevVolume;<br />
	so.setVolume((volumeknob._x - track._x) / ratio);<br />
	mute.gotoAndStop(&#8221;on&#8221;);</p>
<p>  }<br />
  else {<br />
    isMuted = true;<br />
    prevVolume = volumeknob._x;<br />
    volumeknob._x = track._x;<br />
	so.setVolume((volumeknob._x - track._x) / ratio);<br />
	mute.gotoAndStop(&#8221;mute&#8221;);<br />
	}<br />
}</p>
<p>// me trying to get the rollover states of mute working again<br />
// ****<br />
// this was the code for the mute prior to having a volume slider<br />
// with code that automatically turned the mute on or off and<br />
// reset the position of the volumeknob when pressed<br />
// ****<br />
//mute.onRollOver = function() {<br />
//	if(so.getVolume()== 100) {<br />
//		this.gotoAndStop(&#8221;onOver&#8221;);<br />
//	}<br />
//	else {<br />
//		this.gotoAndStop(&#8221;muteOver&#8221;);<br />
//	}<br />
//}</p>
<p>//mute.onRollOut = function() {<br />
//	if(so.getVolume()&gt; 100) {<br />
//		this.gotoAndStop(&#8221;on&#8221;);<br />
//	}<br />
//	else {<br />
//		this.gotoAndStop(&#8221;mute&#8221;);<br />
//	}<br />
//}<br />
//<br />
//mute.onRelease = function() {<br />
//	if(so.getVolume()== 100) {<br />
//		so.setVolume(0);<br />
//		this.gotoAndStop(&#8221;muteOver&#8221;);<br />
//	}<br />
//	else {<br />
//		so.setVolume(100);<br />
//		this.gotoAndStop(&#8221;onOver&#8221;);<br />
//	}<br />
//}<br />
// ****</p>
<p>// mute on or off ends here<br />
// ****<br />
// Still need to check when mute is on so that if it is and the volumeslider is moved<br />
// the &#8220;mute&#8221; button movie clip moves to the &#8220;on&#8221; label therefore displaying<br />
// the mute off state<br />
// ****
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: David Stiller</title>
		<link>http://www.quip.net/blog/2007/flash/how-to-build-basic-slider-as2#comment-138468</link>
		<pubDate>Sat, 23 Feb 2008 02:35:13 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/how-to-build-basic-slider-as2#comment-138468</guid>
					<description>shrikant,

Someone else recently asked me the same question, and it's a good one.  I told the other reader I would add this question to my to-do list (and I have!), but I don't know when I'll get the chance to write about that particular one.  I'm in the middle of a new book for O'Reilly (as of Feb 2008) and have been falling behind on everything else!</description>
		<content:encoded><![CDATA[<p>shrikant,</p>
<p>Someone else recently asked me the same question, and it&#8217;s a good one.  I told the other reader I would add this question to my to-do list (and I have!), but I don&#8217;t know when I&#8217;ll get the chance to write about that particular one.  I&#8217;m in the middle of a new book for O&#8217;Reilly (as of Feb 2008) and have been falling behind on everything else!
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: shrikant</title>
		<link>http://www.quip.net/blog/2007/flash/how-to-build-basic-slider-as2#comment-135875</link>
		<pubDate>Mon, 18 Feb 2008 11:10:37 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/how-to-build-basic-slider-as2#comment-135875</guid>
					<description>Hi David,

I am beginner in flash, i am working on one flash video player. In that i want to run 10 flv on one same seek bar continually like one FLV. Is there any solution?

can i join the 10 flv to produce one flv as a result, if yes please help me</description>
		<content:encoded><![CDATA[<p>Hi David,</p>
<p>I am beginner in flash, i am working on one flash video player. In that i want to run 10 flv on one same seek bar continually like one FLV. Is there any solution?</p>
<p>can i join the 10 flv to produce one flv as a result, if yes please help me
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: David Stiller</title>
		<link>http://www.quip.net/blog/2007/flash/how-to-build-basic-slider-as2#comment-120720</link>
		<pubDate>Tue, 15 Jan 2008 02:10:24 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/how-to-build-basic-slider-as2#comment-120720</guid>
					<description>Chris,

The &lt;code&gt;SharedObject&lt;/code&gt; class is exactly the solution I was going to suggest!  :)  Have you made a few small tests first, just to make sure you've got the hang of how it works?  You can use &lt;code&gt;SharedObject&lt;/code&gt; to carry over whatever data you want, but because you're also dealing with FLVPlayback and other ActionScript, there might simply be too much going on for you to see clearly what you're dealing with.  (I do this all the time!  Then I have to remind myself to slow down, isolate the new idea in a completely new FLA [or set of FLAs] and take small steps until I understand exactly what the new code does.)

You might very well be carrying over the volume, but not retrieving it correctly from the next page &amp;#8212; or maybe you're not carrying it over, and the 100% winds up occurring because it's default.

For every page that has this slider, you're going to want to:  a) use &lt;code&gt;ShareObject.getLocal()&lt;/code&gt; to check for the existence of your &quot;Flash cookie&quot;; b) &lt;em&gt;if&lt;/em&gt; a cookie exists, use the volume setting from that or an arbitrary default; and c) in addition, use the same &lt;code&gt;getLocal()&lt;/code&gt; method whenever the slider &lt;em&gt;sets&lt;/em&gt; the volume, then follow that with &lt;code&gt;flush()&lt;/code&gt;, to make sure the cookie does get created and set immediately.</description>
		<content:encoded><![CDATA[<p>Chris,</p>
<p>The <code>SharedObject</code> class is exactly the solution I was going to suggest!  <img src='http://www.quip.net/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />   Have you made a few small tests first, just to make sure you&#8217;ve got the hang of how it works?  You can use <code>SharedObject</code> to carry over whatever data you want, but because you&#8217;re also dealing with FLVPlayback and other ActionScript, there might simply be too much going on for you to see clearly what you&#8217;re dealing with.  (I do this all the time!  Then I have to remind myself to slow down, isolate the new idea in a completely new FLA [or set of FLAs] and take small steps until I understand exactly what the new code does.)</p>
<p>You might very well be carrying over the volume, but not retrieving it correctly from the next page &mdash; or maybe you&#8217;re not carrying it over, and the 100% winds up occurring because it&#8217;s default.</p>
<p>For every page that has this slider, you&#8217;re going to want to:  a) use <code>ShareObject.getLocal()</code> to check for the existence of your &#8220;Flash cookie&#8221;; b) <em>if</em> a cookie exists, use the volume setting from that or an arbitrary default; and c) in addition, use the same <code>getLocal()</code> method whenever the slider <em>sets</em> the volume, then follow that with <code>flush()</code>, to make sure the cookie does get created and set immediately.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Chris</title>
		<link>http://www.quip.net/blog/2007/flash/how-to-build-basic-slider-as2#comment-119721</link>
		<pubDate>Fri, 11 Jan 2008 18:05:37 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/how-to-build-basic-slider-as2#comment-119721</guid>
					<description>Hi again Dave-

I have successfully implemented the volume slider on my page with your suggestions, thanks again!  Works great on a single HTML page.

I've encountered a situation in my application where my SWF needs to be loaded into a sequence of HTML pages, and the volume slider value is getting reset to 100% with each new load.  I currently have a single SWF that has an FLV component (plus the slider code), the FLV file name itself is set via a variable so the name of the file is called inside the HTML page.

I need to find a way to have the slider value carry from page to page as the SWF is loaded and show the slider in that &quot;variable&quot; position.

I've looked into using a shared object but I am unable to have it affect the volume slider.  It keeps setting the volume to 100% when it's loaded.  Any suggestions, or is the shared object not the way to go?

Thanks!!  Chris

I will need to carry over the current volume setting and slider position</description>
		<content:encoded><![CDATA[<p>Hi again Dave-</p>
<p>I have successfully implemented the volume slider on my page with your suggestions, thanks again!  Works great on a single HTML page.</p>
<p>I&#8217;ve encountered a situation in my application where my SWF needs to be loaded into a sequence of HTML pages, and the volume slider value is getting reset to 100% with each new load.  I currently have a single SWF that has an FLV component (plus the slider code), the FLV file name itself is set via a variable so the name of the file is called inside the HTML page.</p>
<p>I need to find a way to have the slider value carry from page to page as the SWF is loaded and show the slider in that &#8220;variable&#8221; position.</p>
<p>I&#8217;ve looked into using a shared object but I am unable to have it affect the volume slider.  It keeps setting the volume to 100% when it&#8217;s loaded.  Any suggestions, or is the shared object not the way to go?</p>
<p>Thanks!!  Chris</p>
<p>I will need to carry over the current volume setting and slider position
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: David Stiller</title>
		<link>http://www.quip.net/blog/2007/flash/how-to-build-basic-slider-as2#comment-113078</link>
		<pubDate>Tue, 18 Dec 2007 19:48:05 +0000</pubDate>
		<guid>http://www.quip.net/blog/2007/flash/how-to-build-basic-slider-as2#comment-113078</guid>
					<description>Melissa,

If you're seeing something about the &lt;code&gt;on&lt;/code&gt; event handler, my guess is that you've placed your code on the buttons themselves, rather than in a timeline keyframe.  The Actions panel updates its focus depending on what you've selected when you start typing.  In pre-AS3 documents, you can select objects (buttons, movie clips, components) and add code directly to the object &amp;#8212; in which case you don't need instance names because Flash already knows which object(s) you mean.

Because you're using instance names (the more modern, and Adobe-recommended, approach), you'll need to remove that code from the buttons.  See if my &lt;a href=&quot;http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent&quot; target=&quot;_blank&quot; rel=&quot;nofollow&quot;&gt;museum pieces&lt;/a&gt; article helps you out.  Chin up!</description>
		<content:encoded><![CDATA[<p>Melissa,</p>
<p>If you&#8217;re seeing something about the <code>on</code> event handler, my guess is that you&#8217;ve placed your code on the buttons themselves, rather than in a timeline keyframe.  The Actions panel updates its focus depending on what you&#8217;ve selected when you start typing.  In pre-AS3 documents, you can select objects (buttons, movie clips, components) and add code directly to the object &mdash; in which case you don&#8217;t need instance names because Flash already knows which object(s) you mean.</p>
<p>Because you&#8217;re using instance names (the more modern, and Adobe-recommended, approach), you&#8217;ll need to remove that code from the buttons.  See if my <a href="http://www.quip.net/blog/2006/flash/museum-pieces-on-and-onclipevent" target="_blank" rel="nofollow">museum pieces</a> article helps you out.  Chin up!
</p>
]]></content:encoded>
				</item>
</channel>
</rss>

