7 Replies Latest reply on Mar 11, 2011 1:49 PM by Kwangle

    Delay Between Loading a Movie and Being Able to Call its Functions

    Kwangle Level 1

      Hi All,


      I've written some code that ads a number of movie clips from the library to the stage with a loop. Each clip has a function that makes the clips visible and animates them in. Previously this works fine, I add the clips which sit on screen invisible until the activate function is called - it works fine. However, if I add the clip dynamically and call the function in the same block of code it doesn't work. I've added 'trace' code to the function being called to see if it activates but it doesn't.


      I'm guessing the function doesn't become available immediately, perhaps not until the next frame and I've also noticed this problem with timeline based graphics - they have to be added a frame earlier than when a function they contain is called. Any ideas how I can solve these issues?


      Here's my code:



      for (i=0; i<4; i++) {


        targ = eval("tCir"+i);

        with(targ) {

          _x = 100*i;

          _y = 200;

          _xscale = 200;

          _yscale = 200;

          //function that makes the movie clip display - NOT WORKING






      Any help would be greatly appreciated - thanks!