Things You'll Need
Instructions
Purchase Adobe Flash CS5 Professional from Adobe's website or your favorite retailer.
Install Flash using the instructions provided with the software.
Download the source code for a simple platform game available from kirupa.com. Open the .fla file and re-save it with a title of your choice. This is your "Yoshi's Island" levels game file.
Use Microsoft Paint or another graphics editing program to create your own Yoshi's Island sprites. If you own the original cartridge, you can use Snes9x or other emulation software to extract sprites from a ROM image of "Yoshi's Island." Import these sprites into your "Yoshi's Island" levels game file.
Place movement and jumping code in your "Yoshi's Island" game. Open the actions menu for your Yoshi sprite and paste the following code to make Yoshi move:
onClipEvent (load) {
speed = 0;
maxmove = 15;
}
onClipEvent (enterFrame) {
if (_root.dead) {
this.gotoAndStop("dead");
} else {
speed *= .85;
if (speed>0) {
dir = "right";
} else if (speed<0) {
dir = "left";
}
if (dir == "right"){
this._x += speed;
_root._x -= speed;
}
if (dir == "left") {
this._x += speed;
_root._x -= speed;
}
if (Key.isDown(Key.LEFT)) {
if (speed>-maxmove) {
speed--;
}
this.gotoAndStop("run");
this._xscale = -100;
} else if (Key.isDown(Key.RIGHT)) {
if (speed<maxmove) {
speed++;
}
this._xscale = 100;
this.gotoAndStop("run");
}
if (speed<1 &&speed>-1 &&!attacking) {
speed = 0;
this.gotoAndStop("idle");
}
}
}
Paste the following code to put gravity in the game and enable Yoshi to jump:
if (speed<1 &&speed>-1 &&!attacking) {
speed = 0;
this.gotoAndStop("idle");
}
if (Key.isDown(Key.UP) &&!jumping) {
jumping = true;
}
if (jumping) {
this.gotoAndStop("jump");
this._y -= jump;
jump -= .5;
if (jump<0) {
falling = true;
}
if (jump<-15) {
jump = -15;
}
}