Ball Movement
New month, new interesting stuff. I changed a little my previous Keys detection code. This time I wanted to see some movement. And It's quite easy. Code is absolutely same as ActionScript1.0.
Changes are: instead of mctxt now there is mcball. Also code is a bit different:
on(keyPress "<Left>")
{
_root.mcball._x-=10;
}
on(keyPress "<Right>")
{
_root.mcball._x+=10;
}
on(keyPress "<Up>")
{
_root.mcball._y-=10;
}
on(keyPress "<Down>")
{
_root.mcball._y+=10;
}
Document dimensions are same as in previous example, fps is 12. Test was ok on my phone and ball is moving. Monster is born :) Now I'll try to introduce gravity and speed variables. Will take code from some of my games and change it for Flash Lite.
Thanks to all who participated in my PR5 backlinks giveaway. I'm posting blogs on Sunday. I'm thinking about should I make this giveaway regular weekly thing?





