Weve all seen and done them Shoot the stormtrooper and win and xbox, lasso the donkey and win an ipod
And with this simple tutorial you can make one to!!!
Requirments: Flash
Levelast/Medium [little flash knowledge required]
http://www.nintendo.slyhost.be/Balloon.html
On the first frame enter this code into the actions panel [If its not up push F9]
stop();
Next create the object you want to be in control of and then press F8 and convert it into a movie clip called Hero
Click on ‘Hero’ and open up the actions panel [If its not there push F9]
And paste this code
onClipEvent (load) {
speed = 4;
}
onClipEvent (enterFrame) {
if (Key.isDown(Key.LEFT)) {
_x -= speed;
}
if (Key.isDown(Key.RIGHT)) {
_x += speed;
}
if (Key.isDown(Key.UP)) {
_y -= speed;
}
if (Key.isDown(Key.DOWN)) {
_y += speed;
}
}
Which basically lets your object move
Push ctrl+enter to test it
In the properties at the bottom give it the instance name hero
Now we will move on to making the gold
Create it then push F8 and convert it into a movie clip called gold
Make sure it is selected and in the actions panel copy and paste
onClipEvent (enterFrame) {
if (this.hitTest(_root.hero)) {
this.gotoAndstop(2);
_root.restart();
_root.nextFrame();
}
}
Which says if it collides with the ‘hero’ it will go to the second frame
Now create a second frame make sure its selected and paste this into the actions panel
getURL('http://www.Yoursite.com');
Now test it and when your ‘hero’ touches the gold it should go to the second frame and open your site
Finally we will create the enemy.
Copy and paste it in, convert it to a movie clip and call it enemy
Copy and paste this code into its actions panel
onClipEvent (enterFrame) {
if (this.hitTest(_root.hero)) {
this.gotoAndstop(3);
_root.restart();
_root.gotoAndStop(3);
}
}
Then create a 3rd frame which says Game over in the centre
Then create something which says Retry push F8 and convert it into a button and in the actions panel write
on (press) {
gotoAndStop(1);
}
Now place these enemies wherever you want you can make them move using motion tweens or you can make them still like a maze its your choice.





ast/Medium [little flash knowledge required]
Reply With Quote

