I have written a formula to calculate the x and y speed of an object following another object given that I want speed to = 5.
Perhaps I am just being and idiot and my working is incorrect but when I try to run the flash game it compiles but gets a run time error:
TypeError: Error #1006: value is not a function.
at avoiderv2_fla::MainTimeline/anenemyMovement()
This is the calculation I am using (yes I have defiantly tracked the issue back to this particular line)
e.target.ndx = (Math.sin((Math.asin(e.target.dx(Math.sin(90)/e.target.speed)))*180/Math.PI)*(e.target.speed/Math.sin(90)))
Any idea why I am getting this error? Cheers