Monster Racer Rush
Select between 5 monster racers, upgrade your monster skill and win the competition!
4.23 / 5.00 3,881 ViewsBuild and Base
Build most powerful forces, unleash hordes of monster and control your soldiers!
3.93 / 5.00 4,634 ViewsHey guys.
So I'm making a Flash Mario game, and I do not know how to make a moving sprite.
For example, if you press the Left key, Mario walks to the left as an animation.
I only know how to make a Grey square and it doesn't do anything...
Please help me!
-Insert Lame Ass Text Here Until Clever Enough To Make An Image-
You know how to make a grey square that doesn't do anything? Wow! You got a lot of potential m8!
You can solve pretty much any problem you may have with AS3 by consulting the AS3 Language reference.
At 3/21/10 01:44 PM, ProfessorFlash wrote: You know how to make a grey square that doesn't do anything? Wow! You got a lot of potential m8!
That's not how i meant. I mean it can move in all directions and jump and stuff, but it's still just a grey square that's stuck in one frame!
-Insert Lame Ass Text Here Until Clever Enough To Make An Image-
At 3/21/10 01:47 PM, Bjorvy wrote: That's not how i meant. I mean it can move in all directions and jump and stuff, but it's still just a grey square that's stuck in one frame!
Well, in the part where you tell the grey box to move, tell it to also go to the walking frame. Problem solved.
At 3/21/10 01:57 PM, 4urentertainment wrote:At 3/21/10 01:47 PM, Bjorvy wrote: That's not how i meant. I mean it can move in all directions and jump and stuff, but it's still just a grey square that's stuck in one frame!Well, in the part where you tell the grey box to move, tell it to also go to the walking frame. Problem solved.
First, it's supposed to be a Mario sprite. And second, stop goofing around! The square was just an example! Please can someone serious help me?
-Insert Lame Ass Text Here Until Clever Enough To Make An Image-
At 3/21/10 02:00 PM, Bjorvy wrote:At 3/21/10 01:57 PM, 4urentertainment wrote: Well, in the part where you tell the grey box to move, tell it to also go to the walking frame. Problem solved.First, it's supposed to be a Mario sprite. And second, stop goofing around! The square was just an example! Please can someone serious help me?
That was serious...
At 3/21/10 02:09 PM, Neo-13 wrote:At 3/21/10 02:00 PM, Bjorvy wrote:That was serious...At 3/21/10 01:57 PM, 4urentertainment wrote: Well, in the part where you tell the grey box to move, tell it to also go to the walking frame. Problem solved.First, it's supposed to be a Mario sprite. And second, stop goofing around! The square was just an example! Please can someone serious help me?
But what does he mean with "in the part where you tell the grey box to move, tell it to also go to the walking frame"?
-Insert Lame Ass Text Here Until Clever Enough To Make An Image-
At 3/21/10 02:10 PM, Bjorvy wrote: But what does he mean with "in the part where you tell the grey box to move, tell it to also go to the walking frame"?
In your code...that you apparently copied from a tutorial without learning what it does...
At 3/21/10 02:12 PM, 4urentertainment wrote:At 3/21/10 02:10 PM, Bjorvy wrote: But what does he mean with "in the part where you tell the grey box to move, tell it to also go to the walking frame"?In your code...that you apparently copied from a tutorial without learning what it does...
Hehe, yeah. That was what I thought you meant. But since I do not know this, can anybody of you guys help me out?
-Insert Lame Ass Text Here Until Clever Enough To Make An Image-
You can 'nest' MovieClips inside eachother. Your main MovieClip (the square atm) has two frames. On the first frame, you would place a MovieClip of mario standing. In the second frame you would place a MovieClip of him running, which is an animation and would contain multiple frames.
In your code, make the MovieClip go to and stop on frame 2 while you're pressing one of the directional buttons, and frame 1 when you're not.
At 3/21/10 02:27 PM, Drakenflight wrote: You can 'nest' MovieClips inside eachother. Your main MovieClip (the square atm) has two frames. On the first frame, you would place a MovieClip of mario standing. In the second frame you would place a MovieClip of him running, which is an animation and would contain multiple frames.
Great! Thanks a ton! That really helped! Now i can start working. :D
-Insert Lame Ass Text Here Until Clever Enough To Make An Image-
I'm gonna do a game called "A Grey square that doesn't do anything". It will be a physics game. So thanks for this idea :D.
You can solve pretty much any problem you may have with AS3 by consulting the AS3 Language reference.
If anybody knows, what do I type to make it go to the other frame? And how do I turn the sprite around, if i want Mario to go to the Left instead of Right for example.
-Insert Lame Ass Text Here Until Clever Enough To Make An Image-
At 3/21/10 02:38 PM, ProfessorFlash wrote: I'm gonna do a game called "A Grey square that doesn't do anything". It will be a physics game. So thanks for this idea :D.
Make sure you credit Bjork with the intelectual property.
At 3/21/10 02:38 PM, ProfessorFlash wrote: I'm gonna do a game called "A Grey square that doesn't do anything". It will be a physics game. So thanks for this idea :D.
Then you hafta credit me for inspiration! ;)
-Insert Lame Ass Text Here Until Clever Enough To Make An Image-
At 3/21/10 02:41 PM, Bjorvy wrote: If anybody knows, what do I type to make it go to the other frame? And how do I turn the sprite around, if i want Mario to go to the Left instead of Right for example.
mario.gotoAndStop(n);
where n is the frame you want it to go to.
To turn him around just multiply mario.scaleX by -1;
Do I name the Movieclip Mario instead of character?
-Insert Lame Ass Text Here Until Clever Enough To Make An Image-
At 3/21/10 02:56 PM, Bjorvy wrote: Do I name the Movieclip Mario instead of character?
You don't need to you replace mario by character using his code.
At 3/21/10 02:56 PM, Bjorvy wrote: Do I name the Movieclip Mario instead of character?
well yeah, I'm can't actually read your mind. I was just using 'mario' as an example of your object. name it whatever you want, but use whatever name you pick everytime you rever to that particular object.
Are you REALLY going to ask for every single line of code? or are you going to go and learn?!
At 3/21/10 01:44 PM, ProfessorFlash wrote: You know how to make a grey square that doesn't do anything? Wow! You got a lot of potential m8!
He totally stole that idea from me!
Here's the proof!
This is for your character movieclip. These are for the left and right movements. ground is the instance name your ground should have.
if (Key.isDown(Key.RIGHT)) {
_x += speed;
_xscale = scale;
if (_root.ground.hitTest(_x, _y+3, true)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
} else if (Key.isDown(Key.LEFT)) {
_x -= speed;
_xscale = -scale;
if (_root.ground.hitTest(_x, _y+3, true)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
On frame 2 of the movieclip (character you're playing), make the character a movieclip and make it a walking sprite.
At 3/21/10 08:06 PM, evibini wrote: This is for your character movieclip.
I'm Curious can you explain this line to me
if (_root.ground.hitTest(_x, _y+3, true)) {
At 3/21/10 08:16 PM, CrustySheet wrote:At 3/21/10 08:06 PM, evibini wrote: This is for your character movieclip.I'm Curious can you explain this line to me
if (_root.ground.hitTest(_x, _y+3, true)) {
That means if the character (Mario) is in fact touching the instance, ground, then a certain action will occur.
At 3/21/10 08:26 PM, evibini wrote:At 3/21/10 08:16 PM, CrustySheet wrote:That means if the character (Mario) is in fact touching the instance, ground, then a certain action will occur.At 3/21/10 08:06 PM, evibini wrote: This is for your character movieclip.I'm Curious can you explain this line to me
if (_root.ground.hitTest(_x, _y+3, true)) {
i c..
was wondering if you knew that you're using a shapeflag :P and not just a copy paste code.
At 3/21/10 08:45 PM, CrustySheet wrote: was wondering if you knew that you're using a shapeflag :P and not just a copy paste code.
The shapeflag allows you to put any shape of ground underneath the character, rather than splitting it into lots of rectangular blocks. You can put all the ground in the level together into one clip if you use shapeflag.
Song of the Firefly is on Steam Greenlight and Kickstarter. Give them a look and support the project!
------------------------------
At 3/22/10 03:15 AM, Hoeloe wrote: The shapeflag allows you to put any shape of ground underneath the character, rather than splitting it into lots of rectangular blocks. You can put all the ground in the level together into one clip if you use shapeflag.
This i know!! was wondering if he knew what he was pasting or just copy pasting from tutorials like so many here do then come ask for help cos they don't understand it
At 3/21/10 07:56 PM, Unknown999 wrote:At 3/21/10 01:44 PM, ProfessorFlash wrote: You know how to make a grey square that doesn't do anything? Wow! You got a lot of potential m8!He totally stole that idea from me!
Here's the proof!
Too Easy!!!
Here's the proof
At 3/22/10 03:34 AM, CrustySheet wrote: Too Easy!!!
Here's the proof
It's not easy!
You just haven't beaten level 26 and unlocked Super-Hardcore+++ mode where you, if you ever get that far, end up in fight to the death with the evil twin brother "Slightly Darker Shaded Grey Square That doesn't do Anything either%u2122".
At 3/21/10 08:06 PM, evibini wrote: This is for your character movieclip. These are for the left and right movements. ground is the instance name your ground should have.
if (Key.isDown(Key.RIGHT)) {
_x += speed;
_xscale = scale;
if (_root.ground.hitTest(_x, _y+3, true)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
} else if (Key.isDown(Key.LEFT)) {
_x -= speed;
_xscale = -scale;
if (_root.ground.hitTest(_x, _y+3, true)) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
I've inserted this in the movieclips actionscript, but I only get a bunch of errors... Is it something I've forgotten?
**Error** Scene=Scene 1, layer=Character, frame=1:Line 9: Statement block must be terminated by '}'
} else if (Key.isDown(Key.LEFT)) {
**Error** Scene=Scene 1, layer=Character, frame=1:Line 16: Syntax error.
}
**Error** Scene=Scene 1, layer=Character, frame=1:Line 1: Statement must appear within on/onClipEvent handler
if (Key.isDown(Key.RIGHT)) {
Total ActionScript Errors: 3 Reported Errors: 3
That's what it says.
-Insert Lame Ass Text Here Until Clever Enough To Make An Image-
At 3/21/10 02:38 PM, ProfessorFlash wrote: I'm gonna do a game called "A Grey square that doesn't do anything". It will be a physics game. So thanks for this idea :D.
Free blam point! YAY!