3dron  
                
                  
                    July 22, 2002,  7:58am
                   
                  1 
               
             
            
              onClipEvent (mouseMove) {
This works great for my needs.  But I want it to only run when mouse is over the movieclip that contains the above script.
I understood by putting the script into this movie clip that it would work this way, but the variables are updated whether I am over the movieclip or elsewhere.
I’ve tried on(rollover) as well.
Can I get the _mouse location of only this clip with something like this: _ClipName._xmouse ?
Please help.
Ron R.
             
            
              
            
           
          
            
              
                system  
              
                  
                    July 22, 2002,  8:15am
                   
                  2 
               
             
            
              Dynamic event handlers are so cool !
this.onRollOver = function ()
{ 
    this.onMouseMove = function ()
    {
        x_pos = _xmouse; 
        if (x_pos>x_old)
        { 
            _root.var_mov = 1; 
        } else
        { 
            _root.var_mov = -1; 
        } 
        x_old = x_pos; 
    }
}
this.onRollOut = function ()
{
    this.onMouseMove = null;
}
Nice, hue ? =)
pom :asian:
             
            
              
            
           
          
            
              
                system  
              
                  
                    July 22, 2002,  8:23am
                   
                  3 
               
             
            
              By the way, this code can be shortened… Yours:
onClipEvent (mouseMove) { 
    _root.var_mov = (_xmouse>x_old)?1:-1 ;
    x_old = _xmouse; 
}
And mine:
this.onRollOver = function ()
{ 
    this.onMouseMove = function ()
    {
        _root.var_mov = (x_pos>x_old)?1:-1;
        x_old = _xmouse; 
    }
}
this.onRollOut = function ()
{
    this.onMouseMove = null;
}
x?y:z; means if x is true then y else do z. Watch for an article about AS for further information.
pom :asian:
             
            
              
            
           
          
            
              
                system  
              
                  
                    July 22, 2002,  5:16pm
                   
                  4 
               
             
            
              This one works great:
onClipEvent (mouseMove) {
But neither works only when I am over their movie clip.  THey both are active even when I am out side of movie clip.
How can I get the script to only be called when I am rolled over the clip?
RR
             
            
              
            
           
          
            
              
                system  
              
                  
                    July 22, 2002,  5:36pm
                   
                  5 
               
             
            
              How can I implement this type of command in the short script form	
Also, when I debugged the top code pano_mov never changed beyond 1 or -1.  Why did it not grow 1,2,3,2,1,0,-1-2,etc
I tried
var_mov = (_xmouse>x_old)?+= 1:+= -1 ;
But it no like!!!
RR