1 person found this helpful
Put the code you have on the timeline, not on the movieclip, and it should work (though you have a typo....that first If should be if )
Thanks for the help that did it.
Didn't want to creat a hole new thread since I'm stuck on the same tutorial. This time though it has to do with making the ball move this is the code:
var ballXSpeed : Number = 10;
var ballYSpeed : Numbet = 10;
mcBall._x += ballXSpeed;
mcBall._x += ballYSpeed;
Now the problem is the author of the tutorial did not explain were this code goes. I tried adding it to the circle itself then to the timeline with the other code I created in the first step but the ball doesn't move anywere. And judgeing by the comments on each page of this web tutorial there seems to be a pattern of one crutial bit of info missing each step so does anyone know of a tutorial site similar to how this ones set with the mind set of teaching flash game creation starting from simple games to complex like this site but without the constent lappses of info? If not then I'll have to warren you this thread most likely will grow plus looking at the comments for the other tutorials I will most likely hit a rut when working though them.
Any help to those two questions would be appeseated.
According to the tutorial those pieces of code go in two different places...
Add the following code to the very beginning (line 1) of your code. I like to organize all my variables so that they are all in the same place.
//These variables are needed for moving the ball var ballXSpeed:Number = 10; //X Speed of the Ball var ballYSpeed:Number = 10; //Y Speed of the Ball
You can change these values if you want, but this is what I’m going to use. Now, we have to use these variables to make the ball move. We should now add the following code to the onEnterFrame() function:
//MOVING THE BALL mcBall._x += ballXSpeed; mcBall._y += ballYSpeed;
The last one is probably why you aren't seeing anything moving.
The tutorial author has provided the source files, so you should be able to refer to those without having to ask anyone where it goes.
I don't know of any game tutorials, so you may have to grin and bear it and try to develop an understanding of the coding and techniques so that you can create your own. Understanding the code is more important than having the code.
Thanks again Ned now that I reread it after taking a breather I had to smack my self for not looking at the source code. I think I gona take a break from this to finish a project that I thinks stressin me out causing me to skip over these steps without thinking. Hopefully then I wont fill the blog with such noob questions.
Thanks again Ned.