2 Replies Latest reply on Jul 19, 2009 7:56 AM by Sampad123

    currentFrame detection


      Hello, I have an if statement set up for the rollout on a button:


      on (rollOut) {


      if (_root.mb == false) {

              } else if (copymb._currentframe == '3') {
                  trace ('copymb at frame3')
              } else {


      Where the var mb tells the button if a movie is loaded.
      If it is not loaded then (i.e var = false) then the mclip 'copymb' which is the copy associated with this loaded movie, should be off.


      if the movie is loaded then the associated mclip 'copymb' should go to the frame 'on' (to display associated copy)


      however, the loaded movie has more than one frame. I need the 'else if' state to tell the mclip 'copymb' to go to a different frame if the loaded movie is not on the first frame.


      The else state is working - sending 'copymb' to the frame 'on' when the movie is loaded (i.e var = true), but the if else state is not. It can't see that the loaded movie has moved on to a different frame.


      The rollover state of the button turns the mclip 'copymb' off, and the rollout state sends it back to the 'on' frame (if movie is loaded), but not the current frame.


      on (rollOver) {


      The basic idea is that the copy associated with the buttons (on rollover) doesn't overlap with the copy associated with the loaded movies (i.e it defaults back to copy associated with loaded movie on rollout).


      Can anyone help. Thanks.