<?xml version="1.0" encoding="utf-8"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:dc = "http://purl.org/dc/elements/1.1/" xmlns="http://purl.org/rss/1.0/">
	<channel rdf:about="http://livedocs.adobe.com/">
	<title>LiveDocs Comments - flash - 9.0 - main - 00000041.html</title>	
		<link>http://livedocs.adobe.com/</link>
		<description>Macromedia LiveDocs - online documentation with user feedback.</description>
		<copyright>Copyright 2009, Macromedia, Inc.</copyright>
		<dc:date>2009-11-24T22:16:46</dc:date>
		<dc:language>en-us</dc:language>
		<items>
			<rdf:Seq>
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/main/00000041.html#83591" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/main/00000041.html#82612" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/main/00000041.html#82264" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/main/00000041.html#81068" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/main/00000041.html#79290" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/main/00000041.html#74285" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/main/00000041.html#74224" />
			</rdf:Seq>
		</items>
	</channel>
	
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/main/00000041.html#83591">
		<title>flash/9.0/main/00000041.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/main/00000041.html#83591</link>
		<description>In the &quot;Creating packages&quot; section it states &quot;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.&quot;&lt;br /&gt;&lt;br /&gt;Actually it seems that only one package-level declaration can be made at all, whether public or internal</description>
		<dc:creator>unasuming_dave</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2008-04-30T15:27:57</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/main/00000041.html#82612">
		<title>flash/9.0/main/00000041.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/main/00000041.html#82612</link>
		<description>What isn't explicitly explained here (but is in the AS 2.0 documentation) is that:&lt;br /&gt; &lt;br /&gt;1) Each package class has to be in it's own .as file  and that file must be named after the one public class contained in that file (e.g., MyClass.as).&lt;br /&gt;&lt;br /&gt;2) The .as files for each class in a package must be stored in a folder that matches the package name.&lt;br /&gt;&lt;br /&gt;3) The folder containing the package folder must be in the ClassPath (either global or local).&lt;br /&gt;&lt;br /&gt;This information is covered in Programming ActionScript 2.0, but not really explained here (and so easily missed by someone new to ActionScript who starts with AS3).</description>
		<dc:creator>peterevensen</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2008-04-03T08:51:46</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/main/00000041.html#82264">
		<title>flash/9.0/main/00000041.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/main/00000041.html#82264</link>
		<description>Hello, another somewhat confused user here...&lt;br /&gt;&lt;br /&gt;I think I understand now. I'll give an example of my code, my conclusion from it, and my reflections on what that means:&lt;br /&gt;&lt;br /&gt;I have the following file structure:&lt;br /&gt;&lt;br /&gt;package/&lt;br /&gt;  package.as&lt;br /&gt;  Class.as&lt;br /&gt;&lt;br /&gt;my intention was to have simple service functions in package.as that will be accessed via package.function(). for example package.initialize().&lt;br /&gt;&lt;br /&gt;However, I kept getting compiler errors. I eventually tracked it down to this: you can only declare one public thing in a package - class, function whatever, and that something's name must correspond to the package name.&lt;br /&gt;&lt;br /&gt;So I stopped getting compiler errors when I change my files and code like so:&lt;br /&gt;&lt;br /&gt;package/&lt;br /&gt;  initialize.as - contains package.initialize()&lt;br /&gt;  Class.as - contains package.Class&lt;br /&gt;&lt;br /&gt;At this point things started working.&lt;br /&gt;&lt;br /&gt;However, you must realize this is less than desired. I don't want to be forced to breakdown a library of 10 small utility functions to 10 files. I could of course use static methods on a class, but that beats the whole point of using packages.</description>
		<dc:creator></dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2008-03-24T12:05:17</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/main/00000041.html#81068">
		<title>flash/9.0/main/00000041.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/main/00000041.html#81068</link>
		<description>I ve read the whole section but still can't get that packages can be created &lt;br /&gt;that does not reflect directory hierarchy. Could you please suggest some example code.</description>
		<dc:creator>tegnegi</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2008-02-23T10:55:26</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/main/00000041.html#79290">
		<title>flash/9.0/main/00000041.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/main/00000041.html#79290</link>
		<description>I'm a relative newcomer to Flash but if anyone's having trouble getting packages and package names working, you could do a lot worse than check out this tutorial: http://www.actionscript.org/resources/articles/698/1/Make-your-own-reusable-classes-using-Flash-and-AS3/Page1.html</description>
		<dc:creator></dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2008-01-08T03:07:28</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/main/00000041.html#74285">
		<title>flash/9.0/main/00000041.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/main/00000041.html#74285</link>
		<description>mgoodes,&lt;br&gt;&lt;br&gt;You're asking about several different documentation issues. So, in the order you asked:&lt;br&gt;&lt;br&gt;- This page in Using Flash should help:&lt;br&gt;http://livedocs.adobe.com/flash/9.0/UsingFlash/WS06D23361-54E6-4ac2-9D24-081C181BD2DF.html&lt;br&gt;&lt;br&gt;Keep in mind that AS3 classes and packages are compiled by the authoring tool (in this case, Flash CS3, not FlexBuilder). So, the information you want is in the Using Flash book.&lt;br&gt;&lt;br&gt;- Name them what you want, basically. Look through the AS3 Language Reference and don't name them the same as the ones included with Flash CS3. For simplicity, you can put all your classes at the &quot;top level&quot; as stated above. The names shouldn't spawn a compiler error unless your syntax is incorrect. It doesn't have anything to do with the names you use. This page may help:&lt;br&gt;http://livedocs.adobe.com/flash/9.0/main/00000028.html&lt;br&gt;&lt;br&gt;- The new operator is documented here:&lt;br&gt;http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/operators.html#new</description>
		<dc:creator>djtechwriter</dc:creator>
		<dc:type>1 1</dc:type>
		<dc:date>2007-10-01T10:42:59</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/main/00000041.html#74224">
		<title>flash/9.0/main/00000041.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/main/00000041.html#74224</link>
		<description>Hmm...I've read this twice now, and amidst all the extraneous information I cannot find the things I really need to know:&lt;br /&gt;- How do I name/organize my files and folders so that AS 3.0 can find them&lt;br /&gt;- How do I name my packages/classes to avoid compile errors&lt;br /&gt;- Where do I write the &quot;new&quot; statement - is it even possible to write a &quot;new&quot; statement in a frame without getting a compile time error?&lt;br /&gt;I'm sure all the Java programmers are happy with this documentation but as an AS programmer I'm stuck using frame code because I can't get my packages and classes to compile.</description>
		<dc:creator>mgoodes</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2007-09-29T19:35:22</dc:date>
	</item>
	</rdf:RDF>

