I just started creating "Yoshi Flash" game. Its made with Flash CS3. And has so far 79 lines of scripting.. Its not done yet.
Here is a small example of the scripting i used while programming the game..
onClipEvent (enterFrame) { //This makes sure that the following actions will be repeated every time the game enters the frame this character is on.
_root.tiredness -= 0.01; //so, every time the game hits this frame the tiredness variable wil be reduced with 0,01.
_root.hunger -= 0.02; //and this variable will be reduced with 0,02
}//end of onClipEvent's block.
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) { //when right key is pressed
this._x += 5; //this movieClip will move 5 pixels to the right.
}
if (Key.isDown(Key.LEFT)) { //when left key is pressed
this._x -= 5; //this movieClip will move 5 pixels to the left.
}
if (Key.isDown(Key.UP)) { //when up key is pressed
this._y -= 5; //this movieClip will move up 5 pixels.
}
if (Key.isDown(Key.DOWN)) { //when down key is pressed
this._y += 5; //this movieClip will move down 5 pixels.
}
}
onClipEvent (enterFrame) { //This makes sure that the following actions will be repeated every time the game enters the frame this character is on.
_root.tiredness -= 0.01; //so, every time the game hits this frame the tiredness variable wil be reduced with 0,01.
_root.hunger -= 0.02; //and this variable will be reduced with 0,02
}//end of onClipEvent's block.
onClipEvent (enterFrame) {
if (Key.isDown(Key.RIGHT)) { //when right key is pressed
this._x += 5; //this movieClip will move 5 pixels to the right.
}
if (Key.isDown(Key.LEFT)) { //when left key is pressed
this._x -= 5; //this movieClip will move 5 pixels to the left.
}
if (Key.isDown(Key.UP)) { //when up key is pressed
this._y -= 5; //this movieClip will move up 5 pixels.
}
if (Key.isDown(Key.DOWN)) { //when down key is pressed
this._y += 5; //this movieClip will move down 5 pixels.
}
}
Thats is only 1 quarter of it... NOT EVEN..
// The game is about, 2 young yoshis wake up, and find themselves in a different galaxy.
You have to adventure the different planets, and fight the evil Browser.
Its like Mario Galaxy for Wii.
Its a really fun game so far, and i hope u guys like it more than i do.