3 Replies Latest reply on Jul 26, 2008 12:38 PM by kglad

    Question about "this". Scope problem?

    AntifreezeDesign
      Hi there. I don't understand what's not working correctly when I try to dynamically call a movie clip from a function. For example, this doesn't work: (see first attached code).

      I'm guessing the "this" in the call to play is getting stuck referring to the function, instead of the timeline. But it works if I have a leading _mc in the call, such as
      graphics["b"+count].gotoAndPlay("intro");

      How do I refer to the timeline where this code is by using [ ] ? Should I be using eval instead? Should I always send out to a new function? What's the best practice?

      I've figured out workarounds, like calling a new function and passing the reference (see second code block), but I'd like to know if there's a best way to do this.

      Thanks for the help,
      Greg Neumayer
      Antifreeze Design