How to link a slider bar to content?

Hi! I am sure this is a super easy thing to do, but as I am clueless, I am needing help!
I am using Flash MX. I have created a slider with a line and dragger, I followed the tutorial from
http://www.kirupa.com/developer/mx/slider.htm
except mine is vertical instead of horizontal.

Here is the code I have in frame 1 of the movie clip that is my slider:

this.ratio=0 ;
dragger.onPress=function(){
      this.startDrag(true,0,0,0,((line._height)-120));
      this.onEnterFrame=function(){
            ratio=Math.round(this._y*100/line._height) ;
      }
}
dragger.onRelease=dragger.onreleaseOutside=stopDrag;

And here is the code I have in frame 1 of the movie it appears in:

this.onEnterFrame=function(){
   ratio.text=mySlider.ratio;
}

So, that works slick, EXCEPT for the fact that I have no clue how to actually link it to the content that I want it to scroll, which is really the important part!

I just have a movie clip that I would like to move up and down as the user drags my slider. Seems simple, but I have no clue, so any help would be greatly appreciated! Hopefully I have explained myself enough, but if not just ask for clarification and I will do my best. Thanks!
plundquistAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Aneesh ChopraCTOCommented:
Hi,
I assume your movieClip instnacename is "myMovie".

just replace ur following code;
-------------
this.onEnterFrame=function(){
   ratio.text=mySlider.ratio;
}
----------

replace it with the following:
-----------
this.onEnterFrame = function() {
      if (myMovie.initY == undefined) {
            myMovie.initY = myMovie._y;
      }
      myMovie._y = myMovie.initY-(myMovie._height-mySlider._height)*mySlider.ratio/100;
};
---------

Rgds
Aneesh

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Aneesh ChopraCTOCommented:
I have also done a sample for your reference..

download it here:
http://www.4shared.com/file/3681880/825f31b3/slider_sample.html

Rgds
Aneesh
plundquistAuthor Commented:
Awesome! I will give it a try here tonight and let you know!
Exploring SharePoint 2016

Explore SharePoint 2016, the web-based, collaborative platform that integrates with Microsoft Office to provide intranets, secure document management, and collaboration so you can develop your online and offline capabilities.

plundquistAuthor Commented:
The code you had me substitute in worked wonderfully! I couldn't get the sample work, kept saying "unexpected file format" when I tried to open it, but your first suggestion linked them right up!

The only other little issue I am having with it now is, the movie clip I am scrolling (myMovie) uses a mask, the content is a long list-type thing which I want to show within a certain rectangular area. Right now the part that is un-masked, I guess you would say, when the page loads just scrolls up to the top of the page and it never reveals the content below. I guess what I am asking is, how do you use the scroll and make the content that is being scrolled only be revealed within a "window"? Sorry if this is going out of the realm of my original question!

Thanks so much for your expertise!
Aneesh ChopraCTOCommented:
here is the updated version,,
only masked area is visible during scrolling...

download link: http://www.4shared.com/file/3710682/183fab24/slider_sample.html


Rgds
Aneesh
plundquistAuthor Commented:
I get the "Unexpected File Format" with this one, too. I am not sure what I am doing wrong. I hit "Download" at the bottom of the page, then once it downloads, I right-click and open Properties where I Unblock it. Then I try every way possible to open it, to no avail. Is there something else I should be doing?

Thanks!
Aneesh ChopraCTOCommented:
You must be having Flash mx2004,
I have uploaded the FLash 8 file..

Ok,
here I have uploaded the Flash MX2004 version
http://www.4shared.com/file/3751294/a2725629/slider_sample.html


Rgds
Aneesh
plundquistAuthor Commented:
Yes, I am using MX. I redownloaded and tried it again, and the same thing happened. Sorry!
Aneesh ChopraCTOCommented:
Oh,
you are using MX which is even older version than MX2004.
I dont use MX anymore..

You need atleast Flash MX2004 to open this file..
plundquistAuthor Commented:
Okay, sorry! Thanks for trying! I know you have already spent a ton of time on this question, but if you have time, would you want to walk me through the mask issue? Thanks so much for all of your help!!
plundquistAuthor Commented:
My original question has been answered, and I think I branched out into another question altogether, so I will close this question, and see if I can get part 2 handled in a different question. Thanks so much for your quick response and expertise!!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.