3 Replies Latest reply on Aug 27, 2008 3:34 PM by evrardBlom

    Placing a clip on stage at runtime

    evrardBlom Level 1

      I have a movie clip in library i named bleu, with linkage identifier bleu. I want to place it on stage at runtime using AS 2.0, here is the code i type:

      var depth:Number = 1000;
      _root.attachMovie("bleu", "bleu_mc", depth);
      bleu_mc._x = bleu_mc._y = 0;

      Flash gives me error message:

      "Statement must appear within on/onClipEvent handler"

      This Three times on each of the three lines of codes.

      What am i doing wrong? What should i type?

      Thanks for helping