Monday 5th March 2012 Conclusion part 2
Also during the Tutorial i learnt about using Variables and how they can be public or they can be public and they can also be private as well. the following points will explain what they both mean.
- Public Variable: this is a variable that can be accessed by anyone when playing the game for example when playing the game online and they open the game in flash they can then look at the coding and edit the parts that they wanted to move an object from one side of the screen to the other. The image below shows the Public variable.
- Private Variable: this is a Variable that is private to one person and that piece of code. this is good for placing the code for the score with because then when you send your game out and people try and edit the game they wont be able to edit the score of the game as it would be a private variable. The image below shows the Private Variable
No comments:
Post a Comment