I just had a breakthrough.
It isn't much, but I've been wondering about this for the past, what, 5 months?
So I'm really happy I finally figured it out.
I guess I'll explain what I found out :3
When making a flash game, you can move a movieclip with the < and > buttons.
Now with a circle as your main character that wouldn't be a problem, but once you use an actual character with a walking animation, you'll notice that the movieclip won't change directions if you walk left or right. So your main character would use the same animation for walking left and right.
The normal code for moving a character would be:
if(Key.isDown(Key.RIGHT)){
this._x += speed;
}
if(Key.isDown(Key.LEFT)){
this._x -= speed;
}
Now finally!
After a lot of stupid research and mistakes, I found out!
Next to the functions of x and y, you also have xscale and yscale.
I never knew D:
So yah, if you put
if(Key.isDown(Key.RIGHT)){
this._x += speed;
this._xscale = -100;
}
if(Key.isDown(Key.LEFT)){
this._x -= speed;
this._xscale = 100;
}
The character suddenly turns around when you press the other button.
Tiny discovery, but I am really happy.
And I also have a journal now that isn't completely random.







--
I'm a lover
Not a fighter
But I'll fight
For what I love
[link]
The Skunk fu message board! Come join us!
[link]
I just saw it and I couldn't say nothing! Its just too awesome!!!
--
I'm a lover
Not a fighter
But I'll fight
For what I love
[link]
The Skunk fu message board! Come join us!
[link]
--
It's nothing really.
--
Anyways, no problem.
Huge fan of the movie, and I loved your sculpture
--
Don't act like you dont want it!
--
[link]
--
Every artist dips his brush in his own soul, and paints his own nature into his pictures.
~ Henry Ward Beecher
999 wouldve been cooler tho xD
Or 1337!
But thanks alot anyways!
Yay, 1000.
But I'll definitely be on the lookout for 1337. And your game of ballz is very, very addictive.
--
Every artist dips his brush in his own soul, and paints his own nature into his pictures.
~ Henry Ward Beecher
Atm im trying to fix some majorrrr glitches. (apparantly white blocks only keep you back if you come from up or down, not from the left or right >< ..)
Previous Page12345...Next Page