<?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: Custom scroll box with mouse wheel scroll (AS2)</title>
	<atom:link href="http://blog.flashweb.org/archives/6/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.flashweb.org/archives/6</link>
	<description>just sharing my work</description>
	<lastBuildDate>Mon, 23 Jan 2012 17:39:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: mr meo</title>
		<link>http://blog.flashweb.org/archives/6/comment-page-1#comment-496</link>
		<dc:creator>mr meo</dc:creator>
		<pubDate>Wed, 05 Jan 2011 06:30:29 +0000</pubDate>
		<guid isPermaLink="false">http://flashweb.org/wp/?p=6#comment-496</guid>
		<description>Thanks for this code, I&#039;m like this scrollbar and used it. Then I try to change the position of scrollface from the top to bottom. The condition is when I click the button, the movieclip like a chart goes down so at the same time the scrollface also start from the bottom and scroll to up. How to change the code. TQ</description>
		<content:encoded><![CDATA[<p>Thanks for this code, I&#8217;m like this scrollbar and used it. Then I try to change the position of scrollface from the top to bottom. The condition is when I click the button, the movieclip like a chart goes down so at the same time the scrollface also start from the bottom and scroll to up. How to change the code. TQ</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: scuty</title>
		<link>http://blog.flashweb.org/archives/6/comment-page-1#comment-351</link>
		<dc:creator>scuty</dc:creator>
		<pubDate>Wed, 24 Jun 2009 11:25:44 +0000</pubDate>
		<guid isPermaLink="false">http://flashweb.org/wp/?p=6#comment-351</guid>
		<description>I am glad that was helpful.</description>
		<content:encoded><![CDATA[<p>I am glad that was helpful.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ac1</title>
		<link>http://blog.flashweb.org/archives/6/comment-page-1#comment-350</link>
		<dc:creator>ac1</dc:creator>
		<pubDate>Wed, 24 Jun 2009 02:04:08 +0000</pubDate>
		<guid isPermaLink="false">http://flashweb.org/wp/?p=6#comment-350</guid>
		<description>I have to sheepishly admit that I was simply rushing through this and messed up some rather basic math.

Still a great component!

Thank you, again.</description>
		<content:encoded><![CDATA[<p>I have to sheepishly admit that I was simply rushing through this and messed up some rather basic math.</p>
<p>Still a great component!</p>
<p>Thank you, again.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ac1</title>
		<link>http://blog.flashweb.org/archives/6/comment-page-1#comment-349</link>
		<dc:creator>ac1</dc:creator>
		<pubDate>Wed, 24 Jun 2009 01:57:11 +0000</pubDate>
		<guid isPermaLink="false">http://flashweb.org/wp/?p=6#comment-349</guid>
		<description>One other question, when setting up your scrollbar component, do I need to set the component MC dimensions as well as the content MC dimensions?  Currently my scrollbar MC is the size I would like, where I would like it but not seeing to the bottom of the nested content MC.</description>
		<content:encoded><![CDATA[<p>One other question, when setting up your scrollbar component, do I need to set the component MC dimensions as well as the content MC dimensions?  Currently my scrollbar MC is the size I would like, where I would like it but not seeing to the bottom of the nested content MC.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: scuty</title>
		<link>http://blog.flashweb.org/archives/6/comment-page-1#comment-348</link>
		<dc:creator>scuty</dc:creator>
		<pubDate>Mon, 22 Jun 2009 11:54:53 +0000</pubDate>
		<guid isPermaLink="false">http://flashweb.org/wp/?p=6#comment-348</guid>
		<description>You are welcome!

To create a custom scroll like the scroll component it&#039;s hard. But as you say, you could just skin the scroll component.</description>
		<content:encoded><![CDATA[<p>You are welcome!</p>
<p>To create a custom scroll like the scroll component it&#8217;s hard. But as you say, you could just skin the scroll component.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ac1</title>
		<link>http://blog.flashweb.org/archives/6/comment-page-1#comment-347</link>
		<dc:creator>ac1</dc:creator>
		<pubDate>Mon, 22 Jun 2009 02:09:35 +0000</pubDate>
		<guid isPermaLink="false">http://flashweb.org/wp/?p=6#comment-347</guid>
		<description>resolved it enough now to work with.  (now I just need to skin the component).

Here&#039;s what I did (my movieClip in question is 800px wide and I have it centered dynamically on the screen.  I wanted the scrollbar aligned screenRight)

var sw:Number = Stage.width;
var swr:Number = sw-800;
var swrr:Number = swr/2;
var nw:Number = swrr+780;

** I set the width of sc1 to &#039;nw&#039;.

thanks again for the script(s)!</description>
		<content:encoded><![CDATA[<p>resolved it enough now to work with.  (now I just need to skin the component).</p>
<p>Here&#8217;s what I did (my movieClip in question is 800px wide and I have it centered dynamically on the screen.  I wanted the scrollbar aligned screenRight)</p>
<p>var sw:Number = Stage.width;<br />
var swr:Number = sw-800;<br />
var swrr:Number = swr/2;<br />
var nw:Number = swrr+780;</p>
<p>** I set the width of sc1 to &#8216;nw&#8217;.</p>
<p>thanks again for the script(s)!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ac1</title>
		<link>http://blog.flashweb.org/archives/6/comment-page-1#comment-346</link>
		<dc:creator>ac1</dc:creator>
		<pubDate>Mon, 22 Jun 2009 01:48:53 +0000</pubDate>
		<guid isPermaLink="false">http://flashweb.org/wp/?p=6#comment-346</guid>
		<description>... I would have edited my last comment ...

Is there a way to detach the scrollbar in your example so I could give it it&#039;s own _x and _y properties?

Maybe house it in another emptyMovieClip?</description>
		<content:encoded><![CDATA[<p>&#8230; I would have edited my last comment &#8230;</p>
<p>Is there a way to detach the scrollbar in your example so I could give it it&#8217;s own _x and _y properties?</p>
<p>Maybe house it in another emptyMovieClip?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ac1</title>
		<link>http://blog.flashweb.org/archives/6/comment-page-1#comment-345</link>
		<dc:creator>ac1</dc:creator>
		<pubDate>Mon, 22 Jun 2009 01:40:58 +0000</pubDate>
		<guid isPermaLink="false">http://flashweb.org/wp/?p=6#comment-345</guid>
		<description>I&#039;m pretty much in the same boat as vinod, I am working off of the same tut found on Kirupa and would like to allow mouseWheel interactivity.  

In other words be able to click and slide the scrollbar or use the mouseWheel-- with the scrollbar adjusting as I scroll with the mouseWheel.

I am toying around with your above example and it&#039;s great.  Thank you for that.

I am actually trying to go a step further than my issue described above (mouseWheel) by dynamically placing both the scrollbar movieClip and the content movieClip on the stage....</description>
		<content:encoded><![CDATA[<p>I&#8217;m pretty much in the same boat as vinod, I am working off of the same tut found on Kirupa and would like to allow mouseWheel interactivity.  </p>
<p>In other words be able to click and slide the scrollbar or use the mouseWheel&#8211; with the scrollbar adjusting as I scroll with the mouseWheel.</p>
<p>I am toying around with your above example and it&#8217;s great.  Thank you for that.</p>
<p>I am actually trying to go a step further than my issue described above (mouseWheel) by dynamically placing both the scrollbar movieClip and the content movieClip on the stage&#8230;.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: scuty</title>
		<link>http://blog.flashweb.org/archives/6/comment-page-1#comment-344</link>
		<dc:creator>scuty</dc:creator>
		<pubDate>Thu, 18 Jun 2009 10:58:30 +0000</pubDate>
		<guid isPermaLink="false">http://flashweb.org/wp/?p=6#comment-344</guid>
		<description>So all you want is a box and you can scroll the content inside the box.</description>
		<content:encoded><![CDATA[<p>So all you want is a box and you can scroll the content inside the box.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: vinod</title>
		<link>http://blog.flashweb.org/archives/6/comment-page-1#comment-343</link>
		<dc:creator>vinod</dc:creator>
		<pubDate>Thu, 18 Jun 2009 04:17:20 +0000</pubDate>
		<guid isPermaLink="false">http://flashweb.org/wp/?p=6#comment-343</guid>
		<description>&lt;pre lang=&quot;actionscript&quot;&gt;
scrolling = function () {
	var scrollHeight:Number = scrollTrack._height;
	var contentHeight:Number = contentMain._height;
	var scrollFaceHeight:Number = scrollFace._height;
	var maskHeight:Number = maskedView._height;
	var initPosition:Number = scrollFace._y=scrollTrack._y;
	var initContentPos:Number = contentMain._y;
	var finalContentPos:Number = maskHeight-contentHeight+initContentPos;
	var left:Number = scrollTrack._x;
	var top:Number = scrollTrack._y;
	var right:Number = scrollTrack._x;
	var bottom:Number = scrollTrack._height-scrollFaceHeight+scrollTrack._y;
	var dy:Number = 0;
	var speed:Number = 10;
	var moveVal:Number = (contentHeight-maskHeight)/(scrollHeight-scrollFaceHeight);
	
	scrollFace.onPress = function() {
		var currPos:Number = this._y;
		startDrag(this, false, left, top, right, bottom);
		this.onMouseMove = function() {
			dy = Math.abs(initPosition-this._y);
			contentMain._y = Math.round(dy*-1*moveVal+initContentPos);
		};
	};
	scrollFace.onMouseUp = function() {
		stopDrag();
		delete this.onMouseMove;
	};
	btnUp.onPress = function() {
		this.onEnterFrame = function() {
			if (contentMain._y+speed&lt;maskedView._y) {
				if (scrollFace._yfinalContentPos) {
				if (scrollFace._y&gt;=bottom) {
					scrollFace._y = bottom;
				} else {
					scrollFace._y += speed/moveVal;
				}
				contentMain._y -= speed;
			} else {
				scrollFace._y = bottom;
				contentMain._y = finalContentPos;
				delete this.onEnterFrame;
			}
		};
	};
	btnDown.onRelease = function() {
		delete this.onEnterFrame;
	};
	btnDown.onDragOut = function() {
		delete this.onEnterFrame;
	};
	
	if (contentHeight&lt;maskHeight) {
		scrollFace._visible = false;
		btnUp.enabled = false;
		btnDown.enabled = false;
	} else {
		scrollFace._visible = true;
		btnUp.enabled = true;
		btnDown.enabled = true;
	}
};
scrolling();
&lt;/pre&gt;
Movie clips names: btnUp, scrollFace, scrollTrack, btnDown, contentMain.
contentMain is a movie clip which holds text content and pictures,
scrollFace is hold to drag up and down on scrollTrack.
from kirupa.com
I found this code for scroll content in flash for my presentaions
 I want to add scroll content on Mouse wheel can it be possible. if yes what would be the code and where in this script,

 I am not a programmer Iam a graphic designer can any folks help me out.</description>
		<content:encoded><![CDATA[
<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">scrolling = <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #000000; font-weight: bold;">var</span> scrollHeight:<span style="color: #0066CC;">Number</span> = scrollTrack.<span style="color: #0066CC;">_height</span>;
	<span style="color: #000000; font-weight: bold;">var</span> contentHeight:<span style="color: #0066CC;">Number</span> = contentMain.<span style="color: #0066CC;">_height</span>;
	<span style="color: #000000; font-weight: bold;">var</span> scrollFaceHeight:<span style="color: #0066CC;">Number</span> = scrollFace.<span style="color: #0066CC;">_height</span>;
	<span style="color: #000000; font-weight: bold;">var</span> maskHeight:<span style="color: #0066CC;">Number</span> = maskedView.<span style="color: #0066CC;">_height</span>;
	<span style="color: #000000; font-weight: bold;">var</span> initPosition:<span style="color: #0066CC;">Number</span> = scrollFace.<span style="color: #0066CC;">_y</span>=scrollTrack.<span style="color: #0066CC;">_y</span>;
	<span style="color: #000000; font-weight: bold;">var</span> initContentPos:<span style="color: #0066CC;">Number</span> = contentMain.<span style="color: #0066CC;">_y</span>;
	<span style="color: #000000; font-weight: bold;">var</span> finalContentPos:<span style="color: #0066CC;">Number</span> = maskHeight-contentHeight+initContentPos;
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">left</span>:<span style="color: #0066CC;">Number</span> = scrollTrack.<span style="color: #0066CC;">_x</span>;
	<span style="color: #000000; font-weight: bold;">var</span> top:<span style="color: #0066CC;">Number</span> = scrollTrack.<span style="color: #0066CC;">_y</span>;
	<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">right</span>:<span style="color: #0066CC;">Number</span> = scrollTrack.<span style="color: #0066CC;">_x</span>;
	<span style="color: #000000; font-weight: bold;">var</span> bottom:<span style="color: #0066CC;">Number</span> = scrollTrack._height-scrollFaceHeight+scrollTrack.<span style="color: #0066CC;">_y</span>;
	<span style="color: #000000; font-weight: bold;">var</span> dy:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">0</span>;
	<span style="color: #000000; font-weight: bold;">var</span> speed:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">10</span>;
	<span style="color: #000000; font-weight: bold;">var</span> moveVal:<span style="color: #0066CC;">Number</span> = <span style="color: #66cc66;">&#40;</span>contentHeight-maskHeight<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">/</span><span style="color: #66cc66;">&#40;</span>scrollHeight-scrollFaceHeight<span style="color: #66cc66;">&#41;</span>;
&nbsp;
	scrollFace.<span style="color: #0066CC;">onPress</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #000000; font-weight: bold;">var</span> currPos:<span style="color: #0066CC;">Number</span> = <span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">_y</span>;
		<span style="color: #0066CC;">startDrag</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">this</span>, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #0066CC;">left</span>, top, <span style="color: #0066CC;">right</span>, bottom<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">onMouseMove</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
			dy = <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">abs</span><span style="color: #66cc66;">&#40;</span>initPosition-<span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">_y</span><span style="color: #66cc66;">&#41;</span>;
			contentMain.<span style="color: #0066CC;">_y</span> = <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">round</span><span style="color: #66cc66;">&#40;</span>dy<span style="color: #66cc66;">*</span>-<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">*</span>moveVal+initContentPos<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>;
	<span style="color: #66cc66;">&#125;</span>;
	scrollFace.<span style="color: #0066CC;">onMouseUp</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">stopDrag</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #0066CC;">delete</span> <span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">onMouseMove</span>;
	<span style="color: #66cc66;">&#125;</span>;
	btnUp.<span style="color: #0066CC;">onPress</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">onEnterFrame</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>contentMain.<span style="color: #0066CC;">_y</span>+speed<span style="color: #66cc66;">&amp;</span>lt;maskedView.<span style="color: #0066CC;">_y</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>scrollFace._yfinalContentPos<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>scrollFace._y<span style="color: #66cc66;">&amp;</span>gt;=bottom<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
					scrollFace.<span style="color: #0066CC;">_y</span> = bottom;
				<span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span>
					scrollFace.<span style="color: #0066CC;">_y</span> += speed<span style="color: #66cc66;">/</span>moveVal;
				<span style="color: #66cc66;">&#125;</span>
				contentMain.<span style="color: #0066CC;">_y</span> -= speed;
			<span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span>
				scrollFace.<span style="color: #0066CC;">_y</span> = bottom;
				contentMain.<span style="color: #0066CC;">_y</span> = finalContentPos;
				<span style="color: #0066CC;">delete</span> <span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">onEnterFrame</span>;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>;
	<span style="color: #66cc66;">&#125;</span>;
	btnDown.<span style="color: #0066CC;">onRelease</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">delete</span> <span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">onEnterFrame</span>;
	<span style="color: #66cc66;">&#125;</span>;
	btnDown.<span style="color: #0066CC;">onDragOut</span> = <span style="color: #000000; font-weight: bold;">function</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">delete</span> <span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">onEnterFrame</span>;
	<span style="color: #66cc66;">&#125;</span>;
&nbsp;
	<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>contentHeight<span style="color: #66cc66;">&amp;</span>lt;maskHeight<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		scrollFace.<span style="color: #0066CC;">_visible</span> = <span style="color: #000000; font-weight: bold;">false</span>;
		btnUp.<span style="color: #0066CC;">enabled</span> = <span style="color: #000000; font-weight: bold;">false</span>;
		btnDown.<span style="color: #0066CC;">enabled</span> = <span style="color: #000000; font-weight: bold;">false</span>;
	<span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span>
		scrollFace.<span style="color: #0066CC;">_visible</span> = <span style="color: #000000; font-weight: bold;">true</span>;
		btnUp.<span style="color: #0066CC;">enabled</span> = <span style="color: #000000; font-weight: bold;">true</span>;
		btnDown.<span style="color: #0066CC;">enabled</span> = <span style="color: #000000; font-weight: bold;">true</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>;
scrolling<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>Movie clips names: btnUp, scrollFace, scrollTrack, btnDown, contentMain.<br />
contentMain is a movie clip which holds text content and pictures,<br />
scrollFace is hold to drag up and down on scrollTrack.<br />
from kirupa.com<br />
I found this code for scroll content in flash for my presentaions<br />
 I want to add scroll content on Mouse wheel can it be possible. if yes what would be the code and where in this script,</p>
<p> I am not a programmer Iam a graphic designer can any folks help me out.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

