Getting problem in my code Help me

Hi guys

i am new in Action Scripting Kindly guide me.

  1. I have Main movie 24 fps.
  2. There is one movie clip contain 185 frames animation.
  3. Another Movie clip have one slider with (slide._x = 0).

Kindly guide me how can i move my slide._x till 41 when (another Movie clip which have 185 frame animation) will reach on frame no 185. Still i have done this:

var limit1 = 41;
if (c == undefined){
a = 1;
if (a = 1){
for (i=0 ;i<= limit1; i++){
_root.slide.handle._x = i;

}

    trace (_root.slide.handle._x);
  }
};

Question: slide._x will animate from 0 to 41 when another movie clip moves from 1 to 185. Thanks.