<?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: _root, Evil _root</title>
	<atom:link href="http://www.nunomira.com/blog/2007/04/_root-evil-_root/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nunomira.com/blog/2007/04/_root-evil-_root/</link>
	<description>Nuno Mira&#039;s Flash Blog</description>
	<lastBuildDate>Thu, 10 Jun 2010 18:56:37 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: Jack</title>
		<link>http://www.nunomira.com/blog/2007/04/_root-evil-_root/comment-page-1/#comment-148877</link>
		<dc:creator>Jack</dc:creator>
		<pubDate>Tue, 31 Jul 2007 21:28:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.nunomira.com/blog/?p=337#comment-148877</guid>
		<description>I am running into the Evil Absolute problem.  I have 4 frames.  Each frame has 3 sliders.  Each slider comes from a single movie clip with the AS2 below.  My problem is that the frames have a &quot;Previous&quot; button.  When you click on it, it resets the values.  I try to remove the first line of my code below and use _root.perc.  It works when I click previous - except it sets all the values to all the sliders to the initial value.

SLIDER_MC:

//this.perc = 0;
rail.onPress = function() {
	handle._x = _xmouse;
	handle.onEnterFrame = function() {
		_root.perc = Math.abs(handle._x*4/rail._width);
	};
};
handle.onPress = function() {
	this.startDrag(true, 0, 0, rail._width, 0);
	this.onEnterFrame = function() {
		_root.perc = Math.abs(this._x*4/rail._width);
	};
};
handle.onRelease = stopDrag;
handle.onReleaseOutside = stopDrag;



The code on each frame is similar to this.  You can see where I have been playing with the _root.perc.

FRAME 3 ActionScript:

// Get the values of the sliders 
this.onEnterFrame = function():Number  {
	total3.text = 0;
	sliderValue9.text = 1+slider9_mc._root.perc;
	sliderValue8.text = 1+slider8_mc._root.perc;
	sliderValue7.text = 1+slider7_mc._root.perc;
};
stop();
// Next Page Button
nextPage3_btn.onPress = function():Void  {
};
nextPage3_btn.onRelease = function() {
	gotoAndPlay(&quot;Screen4&quot;);
};
// Previous Page Button
prevPage3_btn.onPress = function():Void  {
};
prevPage3_btn.onRelease = function() {
	gotoAndPlay(&quot;Screen2&quot;);
};</description>
		<content:encoded><![CDATA[<p>I am running into the Evil Absolute problem.  I have 4 frames.  Each frame has 3 sliders.  Each slider comes from a single movie clip with the AS2 below.  My problem is that the frames have a &#8220;Previous&#8221; button.  When you click on it, it resets the values.  I try to remove the first line of my code below and use _root.perc.  It works when I click previous &#8211; except it sets all the values to all the sliders to the initial value.</p>
<p>SLIDER_MC:</p>
<p>//this.perc = 0;<br />
rail.onPress = function() {<br />
	handle._x = _xmouse;<br />
	handle.onEnterFrame = function() {<br />
		_root.perc = Math.abs(handle._x*4/rail._width);<br />
	};<br />
};<br />
handle.onPress = function() {<br />
	this.startDrag(true, 0, 0, rail._width, 0);<br />
	this.onEnterFrame = function() {<br />
		_root.perc = Math.abs(this._x*4/rail._width);<br />
	};<br />
};<br />
handle.onRelease = stopDrag;<br />
handle.onReleaseOutside = stopDrag;</p>
<p>The code on each frame is similar to this.  You can see where I have been playing with the _root.perc.</p>
<p>FRAME 3 ActionScript:</p>
<p>// Get the values of the sliders<br />
this.onEnterFrame = function():Number  {<br />
	total3.text = 0;<br />
	sliderValue9.text = 1+slider9_mc._root.perc;<br />
	sliderValue8.text = 1+slider8_mc._root.perc;<br />
	sliderValue7.text = 1+slider7_mc._root.perc;<br />
};<br />
stop();<br />
// Next Page Button<br />
nextPage3_btn.onPress = function():Void  {<br />
};<br />
nextPage3_btn.onRelease = function() {<br />
	gotoAndPlay(&#8220;Screen4&#8243;);<br />
};<br />
// Previous Page Button<br />
prevPage3_btn.onPress = function():Void  {<br />
};<br />
prevPage3_btn.onRelease = function() {<br />
	gotoAndPlay(&#8220;Screen2&#8243;);<br />
};</p>
]]></content:encoded>
	</item>
</channel>
</rss>
