hello,
on (press) {
_root.star1._x = _root.star1._x-1;
// Slow down function here
help will be appreciated.
             
            
              
            
           
          
            
              
                system  
              
                  
                    July 25, 2004,  6:23pm
                   
                  2 
               
             
            
              it has to be something with setInterval… so maybe this works:
on (press) {
	setInterval(function() {
		enemmyX = this._x;
		enemmyY = this._y;
		for (starX=_root.star1._x; starX>enemmyX; starX--) {
			_root.star1._x = _root.star1._x-1;
			// Slow down function here
		}
	}, 1000);
}
maybe it doesn’t because i’m not very formiliar with the setInterval function, but im just trying to help
             
            
              
            
           
          
            
              
                system  
              
                  
                    July 25, 2004,  6:29pm
                   
                  3 
               
             
            
              or maybe this will work:
on (press) {
	function go() {
		enemmyX = this._x;
		enemmyY = this._y;
		for (starX=_root.star1._x; starX>enemmyX; starX--) {
			_root.star1._x = _root.star1._x-1;
		}
	}
  theinterval = setInterval(go, 1000);
}
 
            
              
            
           
          
            
              
                system  
              
                  
                    July 25, 2004,  7:03pm
                   
                  4 
               
             
            
              umm this wut i have now but it just kinda like freezes then gives me a messege.
on (press) {
starY = _root.star1._y;
starX = _root.star1._x;
while(starX>enemmyX || starY>enemmyY){
}
function movestar(){
	if(starX>enemmyX){
		_root.star1._x=_root.star1._x-1;	
		starX = _root.star1._x;
	}
	if(starY>enemmyY){
		_root.star1._y=_root.star1._y-1;	
		starY = _root.star1._y;
	}
	clearInterval(theinterval);
}
}
             
            
              
            
           
          
            
              
                system  
              
                  
                    July 25, 2004,  7:34pm
                   
                  5 
               
             
            
              could you explain what you want to happen when you click the button? because i don’t know why you want to use a interval, because the code will only be executed when the button is clicked… or maybe you can put the .fla online?
             
            
              
            
           
          
            
              
                system  
              
                  
                    July 25, 2004,  7:43pm
                   
                  6 
               
             
            
              ok i have a button inside a movie clip and thats wut this script is inside. and then i have a moveiclip called star. and when i pres this button i want the star to come to this objects coords but slowly and thats why i am using set interval.
             
            
              
            
           
          
            
              
                system  
              
                  
                    July 25, 2004,  7:55pm
                   
                  7 
               
             
            
              so you want movieclip star to slowly move to the button? maybe this tutorial will help you http://www.kirupa.com/developer/mx/ASmovement.htm 
             
            
              
            
           
          
            
              
                system  
              
                  
                    July 25, 2004,  8:14pm
                   
                  8 
               
             
            
              but thats only for entering the move i need on click.
             
            
              
            
           
          
            
              
                system  
              
                  
                    July 25, 2004,  8:49pm
                   
                  9 
               
             
            
              try this code:
on(press){
	star.endx = this._x;
	star.endy = this._y;
	star.onEnterFrame = function(){
		speed = 10;
		x = this.endx - this._x;
		this._x += x/speed;
		y = this.endy - this._y;
		this._y += y/speed;
	}
}
if it doesn’t work: check if the path for star is correct… or put the fla online…
             
            
              
            
           
          
            
              
                system  
              
                  
                    July 25, 2004,  9:08pm
                   
                  10 
               
             
            
              wow thanks alot man.  Thank you
             
            
              
            
           
          
            
              
                system  
              
                  
                    July 25, 2004,  9:33pm
                   
                  11 
               
             
            
              you’re welcome! i always like to help somebody