3 Replies Latest reply on Jul 13, 2006 8:24 AM by gryllsie

    Targetting mc not working

    gryllsie
      I have a movie clip, whose instance name is unique and is 'focusfacts'.
      I have a function:
      function scaledown() {
      this.focusfacts.gotoAndPlay(2);
      trace("I've found the scaledown function");
      }
      The function is called from a button elsewhere, and it can be found... I get the trace value popping up nice and clearly. BUT, for some reaon that absolutely bemuses me beyond belief, is that the gotoAndPlay(2) command on the movie clip (focusfacts) is quite simply not working. I have also tried naming the frame and telling gotoAndPlay command referencing the name - nothing.

      The only thing I can think of is that somehow the fact that I am using scenes (even though the code and the mc are on the same scene, in fact the same frame!), that maybe there's an issue with referencing the mc itself?

      All ideas welcome. BTW, except for the fact that the content is different I have virtually the same code working fine for other mcs in the scene. Weird.

      Cheers, Matt
        • 1. Re: Targetting mc not working
          seand03
          Matt-
          Have you tried tracing both this and this.focusfacts in your function call to see what the values are. This might help, because if they come up as undefined then it might just not be referencing your movie clip correctly. This can happen since scope is different from regular old flash buttons and button components.
          I am sure you have checked but is the content you want to play on frame 2 of the focusfacts movie clip?
          Let me know if you have any questions.
          Sean
          • 2. Re: Targetting mc not working
            gryllsie Level 1
            Thanks Sean,
            I've just tried that... I did think that trace would only display the value of variables, what would you expect to see if you traced a movie clip? It does come back 'undefined', but I would expect that as there is no variable called 'focusfacts'.
            Also, sorry for being not quite withit, but what do you mean by:
            This can happen since scope is different from regular old flash buttons and button components.

            Thanks for your help, Matt
            • 3. Re: Targetting mc not working
              gryllsie Level 1
              Sorry, just seen what happens if I trace the name of an mc... my mistake!
              So why would it not see the mc 'focusfacts'?
              Matt