4 Replies Latest reply on Jul 9, 2008 2:18 PM by kglad

    Pull Library Object to Stage via ActionScript 2.0 (k)

    Level 7
      I'm trying to pull library objects(MovieClips)to the stage via
      ActionScript 2.0.

      I have clicked on the MovieClip in the library selected Linkage... and
      then clicked on Export for ActionScript. I have the Identifier as the
      name of the MovieClip (3_50Percent) as it appears in the library and the
      AS 2.0 Class as the name of the MovieClip as it appears in the library.

      On the first frame of the Scene I have this code:

      var Button01_ToStage:3_50Percent = new 3_50Percent();
      Button01_ToStage.x = 100;
      Button01_ToStage.y = 100;
      addChild(Button01_ToStage);

      I get an error:

      **Error** Scene=Scene 1, layer=Actions, frame=1:Line 25: A type
      identifier is expected after the ':'.
      var Button01_ToStage:3_50Percent = new 3_50Percent();

      Total ActionScript Errors: 1 Reported Errors: 1



      Not sure what I am doing wrong. Something in the syntax. I downloaded
      the original code from something I found on the web and modified it for
      my needs(changed the names). The original downloaded code also give this
      error.

      -Kirk