# Scroll actionScript using 2.0 in Flash CS2...Please Help

**URL:** https://forum.kirupa.com/t/scroll-actionscript-using-2-0-in-flash-cs2-please-help/276241
**Category:** flash
**Created:** [November 24, 2008, 8:51pm UTC](https://forum.kirupa.com/t/scroll-actionscript-using-2-0-in-flash-cs2-please-help/276241 "2008-11-24T20:51:26Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![skyblu263](https://avatars.discourse-cdn.com/v4/letter/s/6a8cbe/32.png) [@skyblu263](https://forum.kirupa.com/u/skyblu263)
#### Post date: [November 24, 2008, 8:51pm UTC](https://forum.kirupa.com/t/scroll-actionscript-using-2-0-in-flash-cs2-please-help/276241/1 "2008-11-24T20:51:26Z")

</div>

Hi everyone,

I would like to have a scrolling list to the right of the screen and I am having a hard time getting it to work.

Can someone tell me why this actionScript works when using y-axis positions: **[COLOR=blue]For scroll[/COLOR] ~ Upper 35.3, Lower 345.3 and [COLOR=blue]For Text[/COLOR] Upper 610.6, Lower -222.3**. but as soon as I plug in the numbers for the correct screen position (which is on the far right): **[COLOR=blue]For scroll[/COLOR] ~ Upper .601, Lower 2.921 [COLOR=blue]For Text[/COLOR] ~ Upper 8.592, Lower -5.089.**

It seems like when I move the text and scroll box from the center of the Flash screen to the far right of the screen (where I would like it) it doesn’t work any longer. What am I doing wrong?!

I got the tutorial for [LearnFlash.com](http://LearnFlash.com) ([http://www.entheosweb.com/Flash/video\_tutorials/custom\_scroller.asp](http://www.entheosweb.com/Flash/video_tutorials/custom_scroller.asp)). When I do it just like them, it works. But, again, as soon as I move it to the right of the screen, plug in the correct y-axis numbers, which is **smaller** in size than their example, it doesn’t work! This is so frustating! Below I have attached the actionScript (using 2.0). Please help me. Thanks 🙂

var scrollUpper:Number = 35.3;  
var scrollLower:Number = 345.3;  
var textLower:Number = -222.3  
var textUpper:Number = 610.6;  
var scrollRange:Number = scrollLower - scrollUpper;  
var scrollText:Number = textLower - textUpper;  
function scroll () {  
var moved:Number = scroller\_mc.\_y - scrollUpper;  
var pctMoved:Number = moved/scrollRange;  
var textMove:Number = pctMoved\*textRange;  
text\_mc.\_y = textLower - textMove;  
}  
scroller\_mc.onPress = function() {  
this.startDrag(false,this.\_x,scrollUpper,this.\_x,scrollLower);  
}
