1 Reply Latest reply on Jun 2, 2006 11:25 AM by Newsgroup_User

    Classes may only be defined in external ActionScript 2.0 class scripts

    m.dugan Level 1
      Ok I'm getting this when I try and publish my FLVPlayer:

      **Error** C:\Documents and Settings\mdugan\My Documents\FLVPlayer\FLVPlayerTester.as: Line 14: Classes may only be defined in external ActionScript 2.0 class scripts.
      class FLVPlayer extends MovieClip

      Total ActionScript Errors: 1 Reported Errors: 1

      The problem is, my class IS defined in an external ActionScript 2.0 class script. So I don't know why this error is coming up, check the code. Anyone help would be greatly appreciated.

        • 1. Re: Classes may only be defined in external ActionScript 2.0 class scripts
          Level 7
          m.dugan,

          > Ok I'm getting this when I try and publish my FLVPlayer:

          Checking ...

          > **Error** C:\Documents and Settings\mdugan\My
          > Documents\FLVPlayer\FLVPlayerTester.as: Line 14: Classes
          > may only be defined in external ActionScript 2.0 class scripts.
          > class FLVPlayer extends MovieClip

          Aha. Well, in your class itself, you've written this:

          class FLVPlayer extends MovieClip { // etc.

          ... but your file name appears to be FLVPlayerTester (visible in the error
          message). So the compiler is looking for a file named FLVPlayer and doesn't
          find one; hence, classes may only be defined in external scripts.

          Change the name of your file, or change the name of the class.


          David
          stiller (at) quip (dot) net
          Dev essays: http://www.quip.net/blog/
          "Luck is the residue of good design."