Okay I understand. So, I can never declare my method as public at the package level, right?
But what do you understand when reading the doc??? "If you do declare variables, functions, or namespaces at the top level of a package, the only attributes available at that level are public and internal, and only one package-level declaration per file can use the public attribute, whether that declaration is a class, variable, function, or namespace." Rgds, Olivier :) -----Original Message----- From: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of Tom Chiverton Sent: Friday, February 02, 2007 12:11 PM To: [email protected] Subject: Re: [flexcoders] AS variables at the top level of a package On Friday 02 Feb 2007, Stembert Olivier (BIL) wrote: > Sorry but it's 7AM here in Luxembourg and I don't see... Okay, try it this way: > > package > > { > > class Test > > { > > } > > } You have created an object called Test. You can only have one public object in a package (even if your package has no name). Only public objects can have public methods (because methods must belong to an object, and if external classes can't see the object, they can't invoke the method [what would they invoke it on ?]). > > public function dummy():void{} This public method is not part of an object, so it will break. -- Tom Chiverton Helping to proactively aggregate end-to-end interfaces **************************************************** This email is sent for and on behalf of Halliwells LLP. Halliwells LLP is a limited liability partnership registered in England and Wales under registered number OC307980 whose registered office address is at St James's Court Brown Street Manchester M2 2JF. A list of members is available for inspection at the registered office. Any reference to a partner in relation to Halliwells LLP means a member of Halliwells LLP. Regulated by the Law Society. CONFIDENTIALITY This email is intended only for the use of the addressee named above and may be confidential or legally privileged. If you are not the addressee you must not read it and must not use any information contained in nor copy it nor inform any person other than Halliwells LLP or the addressee of its existence or contents. If you have received this email in error please delete it and notify Halliwells LLP IT Department on 0870 365 8008. For more information about Halliwells LLP visit www.halliwells.com. -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links --------------------- An electronic message is not binding on its sender. Any message referring to a binding engagement must be confirmed in writing and duly signed. --------------------- --------------------- An electronic message is not binding on its sender. Any message referring to a binding engagement must be confirmed in writing and duly signed. ---------------------

