so i have a project for school that i am trying to get the “wow” effect for, im trying to make a virtual poster board with movies and sound files and all, but the real problem (at least for now) is to get the google earth. i used the distance formula and the calculating distance tutorial. i used the Pythagorean thyreom and for some reason it still does not work, i know the x and y axis is different in flash, and that is seriously throwing me off also, im confused a little bit on the fact that when im testing the movie, shouldnt by default _root._x and _root._y be the center? so anyways here is the script, if someone wouldnt mind helping it would be greatly appreciated.
onClipEvent (enterFrame) {
xdist = (_root._x - _root.cir2._x)
ydist = (_root._y - _root.cir2._y)
totaldistance = Math.round(Math.sqrt((xdist*xdist) + (ydist*ydist)))
}
onClipEvent (enterFrame) {
if (_root._x - _root.cir2._x < 0) {this._x += totaldistance/35} else
(_root._x -= totaldistance/35)
{
if (this._y - _root.cir2._y < 0) {this._x += totaldistance/70} else
(this._y -= totaldistance/35)
}
}