Recently, my 30 day trial of Adobe Flash CS5 ended.
All I've got to show for it is a (very) simple game.
In it, a ball bounces around and you have to click on it. When you do, you get 1 point and the ball teleports to a new location.
A lot of my 30 days was spent hunting books and internet resources to make it. I think that if I made a tutorial for the ball bouncing thing, then other people on the trial wouldn't have to hunt everywhere.
BUT... I'm not sure if the code I'm using is the best way to do it. So I'm asking the awesome people at AG to look at my code and see if it can be improved, so that I don't end up teaching bad practices in the tutorial.
The ball is called button. The text box containing the score is called scoreBox.
var score:Number = 0; var hdirect:Number = Math.random()*10; var vdirect:Number = 10-hdirect; trace("Horizontal direction: " + hdirect); trace("Vertical direction: " + vdirect);
In the mouse event. I'm not sure if its better but i usually put that in an enter frame event so that it refreshes the score faster. It might not be useful in this case but its nice to know.
Nice tut, completely worthless to me, but nice tut.
I look forward to you buying flash. Otherwise that 30 days of searching for tut's and reading books would have been a waste. Buy it. You can profit from it with the games you make
I only have to make another $529 until I profit from buying flash, at this rate I'll be there in only 20 years!