2

I am trying to create this very simple hello world kind of application . And no matter what I try I am getting this error . Here is Error and Defination of class in TheSimplestPlayer.as file .

VerifyError: Error #1079: Native methods are not allowed in loaded code.
ReferenceError: Error #1065: Variable TheSimplestPlayer is not defined.

package
{
    import flash.display.Sprite;
    public class TheSimplestPlayer extends Sprite
    {
        public function TheSimplestPlayer()
        {
        }
    }
}

enter image description here

enter image description here

Pit Digger
  • 9,618
  • 23
  • 78
  • 122
  • When you click on the edit icon (the one next to the Class name with the pencil) does the AS editor open the file for editing? If not, what does it say? – robertp Nov 29 '12 at 19:27
  • Do you have someting on the timeline? I mean, do you instantiate that class on the timeline? – nycynik Nov 29 '12 at 19:27
  • @heartcode YEs it opens my .as file with the same name as class. – Pit Digger Nov 29 '12 at 19:29
  • @nycynik I dont have anything on timeline . This is just a simple player I am trying to create . But even at 1st step it doesnt work . – Pit Digger Nov 29 '12 at 19:30
  • Don't worry. What happens, if you remove the document class and just put this line: trace('Hello World!'); on the first frame of the timeline, and compile the SWF? – robertp Nov 29 '12 at 19:33

2 Answers2

0

Are the flash file and the AS file in the same directory?

Zecrow
  • 233
  • 3
  • 8
0

Its silly I am answering my own question . But I added playerglobal.swc file under lib and thats how it stopped working , I removed all additional swc files and that fixed the issue .

Thanks for all your help .

Pit Digger
  • 9,618
  • 23
  • 78
  • 122