Hello,
I am a first time user of this site and a novice with actionscript. I am currently attempting to create an interface that involves the flying in of birds from one point to another using programatic movement. So, to reduce the amount of coding I need to do I’ve attempted to create my own function, but have failed dismally. Here is what I currently have
//progmovement function for all birds
//handle onEnterFrame event
function birdFlight(){
var marker="";
var bird=""
if(_root.running && Math.abs(_root.marker._y-this._y)<1){
//set position and hang out
this._y = _root.marker._y;
_root.running = false;
} else if (_root.running){
this._y-=(this._y-_root.marker._y).5;
}
if(_root.running && Math.abs(_root.marker._x-this._x)<1){
//set position and hang out
this._x = _root.marker._x;
_root.running = false;
} else if (_root.running){
this._x-=(this._x-_root.marker._x).5;
} else {
//wait for button press
}
};
I have no idea what to do and I am really stuck. If anyone could help me I’d be extremely greatful.
Thanks!