iv been working with movieclips within movieclips for a while now but im confuzed why this wont work.
this code is on a mc within a mc that i want to be able to rotate in any direction and still have this code work. this code only works when the _parentclips rotation = 0
onClipEvent (enterFrame) {
adjside = _root.hero_mc._x-(_x + _parent._x);
oppside = -1*(_root.hero_mc._y-(_y + _parent._y));
angle = (Math.atan2(oppside, adjside) )
angle = Math.round(angle/Math.PI180)
if(angle - _parent._rotation > -130)if(angle - _parent._rotation < -52){
_rotation = ((angle-1) - 90) - _parent._rotation
}
}
if i should post the fla, just say so