[SE|PY-macdev] Re: sepy-macdev digest, Vol 1 #105 - 9 msgs
Brought to you by:
sephiroth_tmm
From: Loren G. <se...@in...> - 2005-07-09 04:21:07
|
The first of your files is a class, the second is not, if you were to put "var myTest:test = new test();" within a class method, mtasc should valiadate it. eg. class MyOtherTestClass(){ function MyOtherTestClass(){ var myTest:test = new test(); } } If you are using "var myTest:test = new test();" as an entry point (something to kick start the program), there is not reason to validate this in SEPY, just do it in Flash. If you are trying to compile with mtasc and not use Flash at all , I believe you have to enable entry point usage with mtasc, there is a good GUI that makes it easy. I've not really bothered with this though since most people using AS 2.0 also have the Flash authoring enviroment. To re-cap: 1. mtasc is telling you that the keyword var is unexpected because it doesn't exist within a class. 2. Use mtasc to valiadate your classes 3. Use flash to validate non-class code Hope this answers your query. Loren Greenfield On 9/07/2005, at 3:36 PM, sep...@li... wrote: > sorry, what i mean is that this file can be passed to mtasc without > problems: > ----- > > class Test(){ > function Test(){ > // my code..... > } > } > > ----- > > > this file, instead, cannot be passed to mtasc: > ----- > > var myTest:test = new test(); > > ----- |