<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: More on preloaders: passing the loaderInfo</title>
	<atom:link href="http://www.zedia.net/2010/more-on-preloaders-passing-the-loaderinfo/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.zedia.net/2010/more-on-preloaders-passing-the-loaderinfo/</link>
	<description>Flash, ActionScript, SEO and everything in between</description>
	<lastBuildDate>Fri, 30 Jul 2010 20:58:17 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Øyvind Nordhagen</title>
		<link>http://www.zedia.net/2010/more-on-preloaders-passing-the-loaderinfo/comment-page-1/#comment-5054</link>
		<dc:creator>Øyvind Nordhagen</dc:creator>
		<pubDate>Thu, 06 May 2010 02:57:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.zedia.net/?p=533#comment-5054</guid>
		<description>What I do is I&#039;ll use a singleton FlashVars class that defines all the vars I&#039;m expecting with their types. When root.loaderinfo completes in the preloader, I populate this FlashVars instance. (I actually use a generic FlashVarsImporter class that types the vars for me).

Then I load the main movie, which upon initialization references the same FlashVars instance. The instance raised by the preloader will always shadow the instance created in the loaded movie, so I know I&#039;m using updated values. In the case of using the movie without the preloader, I can always have that run on the dummy/default values assigned to the properties in FlashVars.</description>
		<content:encoded><![CDATA[<p>What I do is I&#8217;ll use a singleton FlashVars class that defines all the vars I&#8217;m expecting with their types. When root.loaderinfo completes in the preloader, I populate this FlashVars instance. (I actually use a generic FlashVarsImporter class that types the vars for me).</p>
<p>Then I load the main movie, which upon initialization references the same FlashVars instance. The instance raised by the preloader will always shadow the instance created in the loaded movie, so I know I&#8217;m using updated values. In the case of using the movie without the preloader, I can always have that run on the dummy/default values assigned to the properties in FlashVars.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Preloaders: The best way of doing it &#8211; Confessions of an Flash Addict</title>
		<link>http://www.zedia.net/2010/more-on-preloaders-passing-the-loaderinfo/comment-page-1/#comment-4976</link>
		<dc:creator>Preloaders: The best way of doing it &#8211; Confessions of an Flash Addict</dc:creator>
		<pubDate>Fri, 09 Apr 2010 12:16:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.zedia.net/?p=533#comment-4976</guid>
		<description>[...] and let that file load in the main site/application. (As described here) - Passing the losderinfo (As described here) And there is the &#8216;frame two compiler&#8217; method. Let me be clear, this is not something I [...]</description>
		<content:encoded><![CDATA[<p>[...] and let that file load in the main site/application. (As described here) &#8211; Passing the losderinfo (As described here) And there is the &#8216;frame two compiler&#8217; method. Let me be clear, this is not something I [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: And now an AS3 Project - Robotlegs project template for FlashDevelop &#124; zedia flash blog</title>
		<link>http://www.zedia.net/2010/more-on-preloaders-passing-the-loaderinfo/comment-page-1/#comment-4824</link>
		<dc:creator>And now an AS3 Project - Robotlegs project template for FlashDevelop &#124; zedia flash blog</dc:creator>
		<pubDate>Tue, 23 Feb 2010 18:06:35 +0000</pubDate>
		<guid isPermaLink="false">http://www.zedia.net/?p=533#comment-4824</guid>
		<description>[...] added the Preload.fla because has explained in this post, I pass the loaderInfo(I do this to pass the flashvars) from the preloader to the loaded Main so I [...]</description>
		<content:encoded><![CDATA[<p>[...] added the Preload.fla because has explained in this post, I pass the loaderInfo(I do this to pass the flashvars) from the preloader to the loaded Main so I [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: b.</title>
		<link>http://www.zedia.net/2010/more-on-preloaders-passing-the-loaderinfo/comment-page-1/#comment-4798</link>
		<dc:creator>b.</dc:creator>
		<pubDate>Fri, 12 Feb 2010 20:30:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.zedia.net/?p=533#comment-4798</guid>
		<description>That&#039;s interesting: should get the job done!
Of course, dragging the main.swf file to your standalone Flash Player would still hang the app.

I just found this to be working too:

public function Main()
{
if (this.parent) { init(); }
}

if loaded directly, this.parent returns the Stage object,
if loaded from the loader, this.parent returns null.</description>
		<content:encoded><![CDATA[<p>That&#8217;s interesting: should get the job done!<br />
Of course, dragging the main.swf file to your standalone Flash Player would still hang the app.</p>
<p>I just found this to be working too:</p>
<p>public function Main()<br />
{<br />
if (this.parent) { init(); }<br />
}</p>
<p>if loaded directly, this.parent returns the Stage object,<br />
if loaded from the loader, this.parent returns null.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zedia.net</title>
		<link>http://www.zedia.net/2010/more-on-preloaders-passing-the-loaderinfo/comment-page-1/#comment-4797</link>
		<dc:creator>zedia.net</dc:creator>
		<pubDate>Fri, 12 Feb 2010 15:17:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.zedia.net/?p=533#comment-4797</guid>
		<description>It&#039;s funny because I stumbled on the solution for this just yesterday. If you check for Capabilities.playerType == &quot;StandAlone&quot; you will know that you are testing locally so you can call the init function. That way you don&#039;t have to change code to release.</description>
		<content:encoded><![CDATA[<p>It&#8217;s funny because I stumbled on the solution for this just yesterday. If you check for Capabilities.playerType == &#8220;StandAlone&#8221; you will know that you are testing locally so you can call the init function. That way you don&#8217;t have to change code to release.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: b.</title>
		<link>http://www.zedia.net/2010/more-on-preloaders-passing-the-loaderinfo/comment-page-1/#comment-4795</link>
		<dc:creator>b.</dc:creator>
		<pubDate>Fri, 12 Feb 2010 11:21:23 +0000</pubDate>
		<guid isPermaLink="false">http://www.zedia.net/?p=533#comment-4795</guid>
		<description>Great approach: One thing bugs me though, hopefully you have an insight:

During development, every time you test your movie, the Main class will &#039;hang&#039; since the init-method isn&#039;t called (gets only called by the preloader).
Ofcourse, you can bypass this (during development) by calling init() in the constructor of Main, but that means code-changing every time you want to make a release version (with preloader) and a development version (without preloader)

I&#039;ve been checking, but haven&#039;t found an elegant solution: It would be great if in Mains constructor, you could write something like:

public function Main()
{
if (!loadedByPreloader) { init(); }
}

Question is, how can the &#039;loadedByPreloader&#039; variable be defined?

thanks for any insights.</description>
		<content:encoded><![CDATA[<p>Great approach: One thing bugs me though, hopefully you have an insight:</p>
<p>During development, every time you test your movie, the Main class will &#8216;hang&#8217; since the init-method isn&#8217;t called (gets only called by the preloader).<br />
Ofcourse, you can bypass this (during development) by calling init() in the constructor of Main, but that means code-changing every time you want to make a release version (with preloader) and a development version (without preloader)</p>
<p>I&#8217;ve been checking, but haven&#8217;t found an elegant solution: It would be great if in Mains constructor, you could write something like:</p>
<p>public function Main()<br />
{<br />
if (!loadedByPreloader) { init(); }<br />
}</p>
<p>Question is, how can the &#8216;loadedByPreloader&#8217; variable be defined?</p>
<p>thanks for any insights.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sharedtut</title>
		<link>http://www.zedia.net/2010/more-on-preloaders-passing-the-loaderinfo/comment-page-1/#comment-4755</link>
		<dc:creator>sharedtut</dc:creator>
		<pubDate>Thu, 21 Jan 2010 19:12:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.zedia.net/?p=533#comment-4755</guid>
		<description>thank you for showing the source code</description>
		<content:encoded><![CDATA[<p>thank you for showing the source code</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Steve Kudirka</title>
		<link>http://www.zedia.net/2010/more-on-preloaders-passing-the-loaderinfo/comment-page-1/#comment-4752</link>
		<dc:creator>Steve Kudirka</dc:creator>
		<pubDate>Wed, 20 Jan 2010 22:43:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.zedia.net/?p=533#comment-4752</guid>
		<description>Hmmm.  Does look a little awkward at first, and felt the same way you did. I usually pass the FlashVars via an interface as well. But this seems to make things easier and less of a hassle when adding or removing a FlashVar without having to update the interface.  May have to implement this on the next project.  Thanks for sharing.</description>
		<content:encoded><![CDATA[<p>Hmmm.  Does look a little awkward at first, and felt the same way you did. I usually pass the FlashVars via an interface as well. But this seems to make things easier and less of a hassle when adding or removing a FlashVar without having to update the interface.  May have to implement this on the next project.  Thanks for sharing.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
