# Pong game - move slider

**URL:** <https://forum.kirupa.com/t/pong-game-move-slider/191558>\
**Category:** Uncategorized\
**Created:** [June 21, 2006, 9:51am UTC](https://forum.kirupa.com/t/pong-game-move-slider/191558 "2006-06-21T09:51:53Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dirksmith](https://avatars.discourse-cdn.com/v4/letter/d/47e85d/32.png) [@dirksmith](https://forum.kirupa.com/u/dirksmith)\
**Post date:** [June 21, 2006, 9:51am UTC](https://forum.kirupa.com/t/pong-game-move-slider/191558/1 "2006-06-21T09:51:53Z")

</div>

Hi

I’m adapting a pong flash game.

I’m having trouble moving a slider that controls the speed that the ball travels at - as soon as I move the slider (to the bottom  
of the game rather than the current right hand position) - and update the startDrag coordinates - the computer’s pong racket movement  
becomes erratic.

You can see the demo game here: [http://www.dirksmith.com/pong/pongTest.html](http://www.dirksmith.com/pong/pongTest.html)

Grateful for any help.

.fla attached

Dirk

The scripts are:

slider actionscript on main timeline

onClipEvent (enterFrame) {  
/:drag = Math.round(\_root.diff.\_y - this.\_y)/ -10 ;

slider mc actionscript:

on (press) {  
startDrag(\_root.setter, false, 26, 65, 26, 140);  
}  
on (release) {  
stopDrag();
