pong game: move slider

  • dirksmith
  • Student
  • Student
  • dirksmith
  • Posts: 78

Post 3+ Months Ago

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



Grateful for any help.





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();
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • XLax
  • Novice
  • Novice
  • User avatar
  • Posts: 21

Post 3+ Months Ago

Seems like it's working fine... I don't see the problem
  • dirksmith
  • Student
  • Student
  • dirksmith
  • Posts: 78

Post 3+ Months Ago

yeah - it's getting there.

current problem is that u need to click the screen - then spacebar - to get the game going.

This is happening in Firefox - must be a script issue - as i thought it was just IE that was screwing up Flash movies.

d
  • XLax
  • Novice
  • Novice
  • User avatar
  • Posts: 21

Post 3+ Months Ago

I think that there is a way to set the focus on the flash movie with html or java script when the page loads, that way you wouldn't have to click the screen. An alternative would be to make the game start by clicking a button 'stead of using the spacebar
  • dirksmith
  • Student
  • Student
  • dirksmith
  • Posts: 78

Post 3+ Months Ago

thanx for that - will look at tomorrow - need to get my head around various scripts happening within the game - the version up now is really just a demo.

Post Information

  • Total Posts in this topic: 5 posts
  • Users browsing this forum: No registered users and 10 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.