1 Reply Latest reply on Jun 13, 2006 7:47 AM by ur_dtrain

    Package Compiler Issues

    firdosh
      Hey
      I am trying to compile a simple as3 file
      [code]
      package {

      import flash.display.MovieClip;

      class Test extends MovieClip{

      public function Test(){
      trace("Hello");
      }
      }
      }
      [/code]

      It compiles ( with a warning) but I get this runtime error

      TextReferenceError: Error #1065: Variable Test is not defined.


      The compile time warning was


      C:\Applications\AS3Examples\Test\tst\Test.as(5): col: 8 Warning: class 'Test' will be scoped to the default namespace: internal

      class Test extends MovieClip{


      So I decided to create a package
      I created a directory tst and put the class Test.as in that directory

      [code]
      package tst{

      import flash.display.MovieClip;

      class Test extends MovieClip{

      public function Test(){
      trace("Hello");
      }
      }
      }
      [/code]

      Now I try to compile using mxmlc

      mxmlc actionscript-classpath tst\ Test.as

      I get this

      Loading configuration file C:\Applications\Flex_sdk_2_0_beta3\frameworks\flex-config.xml, root element flex-config
      Error: unable to open 'Test.as'


      Can someone point out where I am going wrong ??

      thanks
      cheers :)
      firdosh