3 Replies Latest reply on Jun 24, 2013 9:16 PM by kglad

    currentframe inside onRollOver not working

    Cool Colors

      I have the following script:

       

                          my_movieclip.onRollOver = function() {

                             _root.animated_mc.play();

                             for (var i:Number = 0; i < 35 ; i++) {

                                           if (_root.animated_mc._currentframe == 15) {  //

                                                     // even thought the animated_mc has 100 frames any code inserted here never gets executed

                                                   _root.animated_mc["ball" + i.toString()]["image" + i.toString()].nextFrame();

                                                     // e.g. I've put here the following and nothing is outputed

                                                      x=20;

                                                      trace(x);

                                                     }

                                }

                           }

      Why is that if condition never true? Any alternatives to this code?