i made a rocket lancher that rotates and fires a rocket at the proper rotation but achieved this through motion tweening on the rockt_mc.
can someone please tell me how to achieve this with actionscript.
I am not able to imagine what you are trying to do… Maybe you can show us what you did with the tween to help me understand what you are trying to do???
Yeha man… Give us a little more explanation or maybe an image to help us understand what your needs are… Like are you looking at this from top perspective and so on and so forth.
youd create a rotation vector based on the rotation of the movieclip… a vector being a collection of 2 values, a movement value for _x and a movement value for _y, these commonly kept in an array like so:
vector = [x, y];
Though for sakes of ease, we can keep them as seperate values. The way to obtain these values is by using sine and cosine on the rotation value of the movieclip - but this rotation value has to be in terms of radians as thats how sine and cosine work… movieclips, however work in terms of degrees, ie 360 degrees of _rotation. Thats no matter though. It can be easily converted and your vector properly created. ex:
thanks every one. I didnt realize how quickly you all would respond.
the trig theory is what i needed. so now back to the books. i bought the flash mx , games demystified. so hopfully it will hold the keys to the kingdome. youll be hearing more from me.