But that would keep adding speed. I suggest you remove the button after you do that. Or you could go: on(release){ speed = (number of speed you want) trace("markzi is my hero ) // just in case }
I would suggest using two buttons, one to increase and one to decrease. I dislike onClipEvents, as they make debugging more difficult, but I will give you that method.
(Where int = interval by which to modify the variable) Up button: on(release){ _root.speed -= int }
What I did is created two new symbols - specifically buttons - called speedUp and speedDown and placed them on the screen. I then provided with the instance names speedUpButton and speedDownButton respectively.
Then in your actions for the player you can insert the following:
OMGGGGGG IT WORKED THXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
yes i did copy i only started lately and is trying to learn the language but don't know where to start so i went online and found codes for a game and thought i would start there if u could tell me a place to start i would be thankful