<?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 - 00000327.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-25T11:06:39</dc:date>
		<dc:language>en-us</dc:language>
		<items>
			<rdf:Seq>
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/main/00000327.html#88720" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/main/00000327.html#79298" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/main/00000327.html#79293" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/main/00000327.html#76382" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/main/00000327.html#73486" />
				<rdf:li rdf:resource="http://livedocs.adobe.com/flash/9.0/main/00000327.html#69069" />
			</rdf:Seq>
		</items>
	</channel>
	
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/main/00000327.html#88720">
		<title>flash/9.0/main/00000327.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/main/00000327.html#88720</link>
		<description>getDefinition requires a full qualified classname (e.g: &quot;classes.Test&quot; instead of &quot;Test&quot;)&lt;br /&gt;&lt;br /&gt;Might help someone.</description>
		<dc:creator>cheesewiz1982</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2008-10-19T08:25:09</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/main/00000327.html#79298">
		<title>flash/9.0/main/00000327.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/main/00000327.html#79298</link>
		<description>Here's a simple example of the Greeting.as file. This should be the Document class of the Greeting.fla file. Make sure to compile this class before compiling and running the main fla file with the code shown above.&lt;br /&gt;&lt;br /&gt;//////////////////////////////////////////////////////////////////////////////&lt;br /&gt;package&lt;br /&gt;{&lt;br /&gt;	import flash.display.Sprite;&lt;br /&gt;	&lt;br /&gt;	public class Greeter extends Sprite&lt;br /&gt;	{&lt;br /&gt;		public function Greeter(o:Object = null)&lt;br /&gt;		{&lt;br /&gt;			trace(&quot;inside Greeter(&quot; + o + &quot;)&quot;);&lt;br /&gt;		}&lt;br /&gt;		&lt;br /&gt;		public function welcome(s:String)&lt;br /&gt;		{&lt;br /&gt;			trace(&quot;inside welcome(s=&quot; + s + &quot;)&quot; );&lt;br /&gt;			return &quot;Hello&quot; + s;&lt;br /&gt;		}&lt;br /&gt;	}&lt;br /&gt;}&lt;br /&gt;//////////////////////////////////////////////////////////////////////&lt;br /&gt;Vinny</description>
		<dc:creator>vinnyguido</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2008-01-08T07:13:47</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/main/00000327.html#79293">
		<title>flash/9.0/main/00000327.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/main/00000327.html#79293</link>
		<description>Accessing the variables and methods of a loaded swf.&lt;br /&gt;I don't know if this is the correct place for this or not, but here is a simple example of one swf file loading in another swf file and then accessing the second swf's content.&lt;br /&gt;The first class/package listing below is the Document Class of the Main swf and the second class/package listing is the Document Class of the Secondary swf file. Make sure you compile the secondary swf before you compile and run the main application.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/////////////////////////////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;package&lt;br /&gt;{&lt;br /&gt;	import flash.display.Sprite;&lt;br /&gt;	import flash.events.*;&lt;br /&gt;	import flash.net.URLRequest;&lt;br /&gt;	import flash.display.Loader;&lt;br /&gt;	&lt;br /&gt;	public class MainApp extends Sprite&lt;br /&gt;	{&lt;br /&gt;		public var url:URLRequest;&lt;br /&gt;		public var ldr:Loader;&lt;br /&gt;		&lt;br /&gt;		public function MainApp()&lt;br /&gt;		{&lt;br /&gt;			trace(&quot;inside MainApp()&quot;);&lt;br /&gt;			&lt;br /&gt;			url = new URLRequest(&quot;SecondarySWF.swf&quot;);&lt;br /&gt;			ldr = new Loader();&lt;br /&gt;			configureListeners(ldr.contentLoaderInfo);&lt;br /&gt;&lt;br /&gt;			ldr.load(url);&lt;br /&gt;			addChild(ldr);&lt;br /&gt;		}&lt;br /&gt;		&lt;br /&gt;		private function configureListeners(dispatcher:IEventDispatcher):void {&lt;br /&gt;            dispatcher.addEventListener(Event.COMPLETE, completeHandler);&lt;br /&gt;            dispatcher.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private function completeHandler(event:Event):void {&lt;br /&gt;            trace(&quot;completeHandler: &quot; + event);&lt;br /&gt;			event.target.content.init_map();&lt;br /&gt;			trace(&quot;title = [&quot; + event.target.content.title + &quot;]&quot; );&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        private function ioErrorHandler(event:IOErrorEvent):void {&lt;br /&gt;            trace(&quot;ioErrorHandler: &quot; + event);&lt;br /&gt;        }&lt;br /&gt;	}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/////////////////////////////////////////////////////////////////////////////////////////////////////////&lt;br /&gt;package&lt;br /&gt;{&lt;br /&gt;	import flash.display.Sprite;&lt;br /&gt;	import flash.display.Shape;&lt;br /&gt;	&lt;br /&gt;	public class TheMap extends Sprite&lt;br /&gt;	{&lt;br /&gt;		public var title:String;&lt;br /&gt;		public var shp:Shape;&lt;br /&gt;		&lt;br /&gt;		public function TheMap(t:String = &quot;TITLE&quot;)&lt;br /&gt;		{&lt;br /&gt;			trace(&quot;inside TheMap()&quot;);&lt;br /&gt;			title = t;&lt;br /&gt;			&lt;br /&gt;			shp = new Shape();&lt;br /&gt;			shp.graphics.beginFill(0xaaaaff);&lt;br /&gt;			shp.graphics.drawRect(10,10, 400, 400);&lt;br /&gt;			shp.graphics.endFill();&lt;br /&gt;			addChild(shp);&lt;br /&gt;		}&lt;br /&gt;		&lt;br /&gt;		public function init_map()&lt;br /&gt;		{&lt;br /&gt;			trace(&quot;inside init_map()&quot;);&lt;br /&gt;		}&lt;br /&gt;	}&lt;br /&gt;}&lt;br /&gt;/////////////////////////////////////////////////////&lt;br /&gt;Good luck,&lt;br /&gt;Vinny</description>
		<dc:creator>vinnyguido</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2008-01-08T05:55:57</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/main/00000327.html#76382">
		<title>flash/9.0/main/00000327.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/main/00000327.html#76382</link>
		<description>When I access the event.content.taget I get a SystemManager for the flex application which I am loading, but inside the application is null and there are no usable children.  How can I access the child application?</description>
		<dc:creator>DaddyDog1</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2007-11-08T22:10:38</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/main/00000327.html#73486">
		<title>flash/9.0/main/00000327.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/main/00000327.html#73486</link>
		<description>// child SWF uses parent domain definitions&lt;br /&gt;// if defined there, otherwise its own&lt;br /&gt;var childDefinitions:LoaderContext = new LoaderContext();&lt;br /&gt;childDefinitions.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);&lt;br /&gt;&lt;br /&gt;// child SWF adds its unique definitions to&lt;br /&gt;// parent SWF; both SWFs share the same domain&lt;br /&gt;// child SWFs definitions do not overwrite parents&lt;br /&gt;var addedDefinitions:LoaderContext = new LoaderContext();&lt;br /&gt;addedDefinitions.applicationDomain = ApplicationDomain.currentDomain;&lt;br /&gt;&lt;br /&gt;// child SWF domain is completely separate and&lt;br /&gt;// each SWF uses its own definitions&lt;br /&gt;var separateDefinitions:LoaderContext = new LoaderContext();&lt;br /&gt;separateDefinitions.applicationDomain = new ApplicationDomain();&lt;br /&gt;&lt;br /&gt;// set loader context in load()&lt;br /&gt;myLoader.load(request, separateDefinitions);&lt;br /&gt;&lt;br /&gt;c/o senocular</description>
		<dc:creator></dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2007-09-10T18:42:41</dc:date>
	</item>
	<item rdf:about="http://livedocs.adobe.com/flash/9.0/main/00000327.html#69069">
		<title>flash/9.0/main/00000327.html</title>
		<link>http://livedocs.adobe.com/flash/9.0/main/00000327.html#69069</link>
		<description>What does the code for the Greeter.swf file look like?  That would make it clear why you have to pass the content pointer from the loader, and what type that content object is.</description>
		<dc:creator>greg_spencer</dc:creator>
		<dc:type>0 0</dc:type>
		<dc:date>2007-06-26T12:31:17</dc:date>
	</item>
	</rdf:RDF>

