Forum Topic: As Mouse Avoider Tutorial

(468 views • 10 replies)

This topic is 1 page long.

<< < > >>
None

scrimpy

Reply To Post Reply & Quote

Posted at: 2/5/06 02:48 PM

scrimpy NEUTRAL LEVEL 18

Sign-Up: 08/26/05

Posts: 303

http://img157.images..ge=mousething7rb.swf

You ever wanted to make a mouse avoider game?
Well here is the script

First put a stop(); action in every frame.

Make a cursor (you can let the old one, but it looks better). Convert it into a movieclip, give it the instance name cursor and the folowing script :

onClipEvent (load)
{startDrag("_root.CURSOR", true);
Mouse.hide();
}

Then the walls (I made it so that you are going into the previous frame if you are touching the walls) : Draw them (use thick lines for Mouse Lag Cheater) and convert them into a button and give them the following script :
on (rollOver) {
prevFrame();
}

And now the moving objects :
Draw the objects and convert them into movieclips
on (rollOver) {
_root.prevFrame();
}

Now, let's go to the buttons which you must touch to start and go out of the level. I used a 2 Frame System. In one Frame is nothing except Background and Start Button in the second frame are walls and enemies. The Start button is in the nothing-frame and the next button is in the game frame.

Put the start button in the nothing-frame (the next frame is the game frame) and give it the following script :

on(rollOver) {
nextFrame();
}

If you want to press the button until the game starts replace the rollOver with the thing you like (press or release). Give the next-button the same script but do it in the game frame.

I didn't add some graphical stuff but you can do it. Add blends, backgrounds etc.

I hope this helped


None

citricsquid

Reply To Post Reply & Quote

Posted at: 2/5/06 02:49 PM

citricsquid DARK LEVEL 23

Sign-Up: 06/25/05

Posts: 13,470

it was ok thanks :)

rm -rf home/citricsquid/penis

BBS Signature

None

Creepy

Reply To Post Reply & Quote

Posted at: 2/5/06 03:01 PM

Creepy EVIL LEVEL 07

Sign-Up: 11/28/04

Posts: 1,241

it was so buggy!
you could just move your mouse very fast over the walls or i could use the mouse wheel!


None

Inglor

Reply To Post Reply & Quote

Posted at: 2/5/06 03:04 PM

Inglor NEUTRAL LEVEL 17

Sign-Up: 01/26/03

Posts: 10,957

At 2/5/06 03:01 PM, Creeepy wrote: it was so buggy!
you could just move your mouse very fast over the walls

add

onMouseMove=updateAfterEvent;

to _root and it'll fix it

or i could use the mouse wheel!

or rightclick


None

Jindo

Reply To Post Reply & Quote

Posted at: 2/5/06 03:05 PM

Jindo LIGHT LEVEL 22

Sign-Up: 08/30/05

Posts: 1,790

fairly buggy, but good :).

someone already did a mouse avoider tut but i don't think it matters.

Good job :D!


None

GustTheASGuy

Reply To Post Reply & Quote

Posted at: 2/5/06 03:08 PM

GustTheASGuy LIGHT LEVEL 08

Sign-Up: 11/02/05

Posts: 9,716

Make a 7 point perspective API-based 3D mouse avoider game tutorial and I won't hate you.

Yes, it's possible.

haXe AliceML Box2dLite Learn AS
#ngprogramming at irc.freenode.net
OVER NINE THOUSAAAAND!!!


None

Inglor

Reply To Post Reply & Quote

Posted at: 2/5/06 03:10 PM

Inglor NEUTRAL LEVEL 17

Sign-Up: 01/26/03

Posts: 10,957

At 2/5/06 03:08 PM, -Gust- wrote: Make a 7 point perspective API-based 3D mouse avoider game tutorial and I won't hate you.
Yes, it's possible.

no it's not because the mouse only moves on two axises, x, and y, if you want to do that you'll need a 3d mouse first


None

GustTheASGuy

Reply To Post Reply & Quote

Posted at: 2/5/06 03:12 PM

GustTheASGuy LIGHT LEVEL 08

Sign-Up: 11/02/05

Posts: 9,716

There's the mouse wheel listener.

haXe AliceML Box2dLite Learn AS
#ngprogramming at irc.freenode.net
OVER NINE THOUSAAAAND!!!


None

AtomicTerrorist

Reply To Post Reply & Quote

Posted at: 2/5/06 03:33 PM

AtomicTerrorist DARK LEVEL 35

Sign-Up: 08/13/04

Posts: 3,126

Im a noobie at this. I tried to make the game like you said. But the curser that i made did not work, the mouse did not even show up on the screen.
Probably some stupid mistake a newbie does...
Your game was pretty good, it was pretty easy and its really easy to cheat. But it was a job well done.


None

RyanPridgeon

Reply To Post Reply & Quote

Posted at: 2/18/06 05:27 AM

RyanPridgeon LIGHT LEVEL 11

Sign-Up: 12/07/05

Posts: 1,947

ggeeeze this is darn embarrassing, but i've been doing AS four years and still dont know how to use the mouse wheel xP#

any help :)

I make flashes because I can.
PM me for anything flash or web related or visit my blog here on NG!
Also, here's my DICK

BBS Signature

None

Vengeance

Reply To Post Reply & Quote

Posted at: 2/18/06 05:37 AM

Vengeance EVIL LEVEL 28

Sign-Up: 03/18/05

Posts: 5,049

click my sig, it links to AS:Main then go into intermediate. then click the link to AS: Mouse wheel.

========|| WWWWWWWW>[-[Blog] - [Audio] - [Userpage] - [Flash] - [Last.fm]-]<WWWWWWWW ||========

BBS Signature

All times are Eastern Standard Time (GMT -5) | Current Time: 12:43 PM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!