In a game, where you have a movie clip controlled with arrow keys, let’s say I would like a solid floor, so that the movie clip won’t go down and disappear. What would be the actionscript for that?
Go ahead and attempt it yourself, and when you hit a snag, let us know.
Try it yourself, think about x and y values of that movieclip… There are tutorials here at Kirupa too, you should go over them. Learning actionscript is SO cool, and so much cooler when you do something on your own, so ya.
No no, I know how to make the movieclip move, but how would you make something solid?
set boundaries by doing a hitTestObject, say if
yourObject.hitTestObject(floor_mc){ then do stuff}
[quote=RebuiltJorge;2328818]set boundaries by doing a hitTestObject, say if
yourObject.hitTestObject(floor_mc){ then do stuff}[/quote]
Hmm… I’m afraid I don’t quite understand… Is youObject where you put the name of your object. And the thing that you want to be the floor, do you make it a movieclip? And am I supposed to put something in for “then do stuff”(I thought as such).
I am sorry that I don’t understand much. I want to learn but I’m afraid I can’t do so very well on my own with just flash.
I use Macromedia Flash 8 (pro I think, although I am not sure) and Actionscript 2.
Then maybe ask in the as2 section not the as3? Google tonypa’s tutorials. They are pretty much the best as2 platformer tutorials i know of.
All right thank you very much I appreciate your halp.