<?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 for Ryan Welcher</title>
	<atom:link href="http://www.ryanwelcher.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ryanwelcher.com</link>
	<description>Web Developer</description>
	<lastBuildDate>Sun, 23 Sep 2012 16:00:26 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
	<item>
		<title>Comment on getDefinitionByName by Ryan</title>
		<link>http://www.ryanwelcher.com/getdefinitionbyname/#comment-3270</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Sun, 23 Sep 2012 16:00:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.ryanwelcher.com/?p=662#comment-3270</guid>
		<description><![CDATA[Erik,

Thanks for taking the time to explain all that! It absolutely makes sense that the compiler wouldn&#039;t include non-referenced items. Otherwise our swf&#039;s would be huge.

Cheers,

Ryan]]></description>
		<content:encoded><![CDATA[<p>Erik,</p>
<p>Thanks for taking the time to explain all that! It absolutely makes sense that the compiler wouldn&#8217;t include non-referenced items. Otherwise our swf&#8217;s would be huge.</p>
<p>Cheers,</p>
<p>Ryan</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on getDefinitionByName by John</title>
		<link>http://www.ryanwelcher.com/getdefinitionbyname/#comment-1182</link>
		<dc:creator>John</dc:creator>
		<pubDate>Tue, 11 Sep 2012 12:27:43 +0000</pubDate>
		<guid isPermaLink="false">http://www.ryanwelcher.com/?p=662#comment-1182</guid>
		<description><![CDATA[You saved my ass dude,   i cant beleive we have to put the literal path
getDefinitionByName(&quot;StartScreen&quot;) as Class;

its serious BS, but i&#039;m glad there was a solution. Your a champ mate, long live AS3]]></description>
		<content:encoded><![CDATA[<p>You saved my ass dude,   i cant beleive we have to put the literal path<br />
getDefinitionByName(&#8220;StartScreen&#8221;) as Class;</p>
<p>its serious BS, but i&#8217;m glad there was a solution. Your a champ mate, long live AS3</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on getDefinitionByName by Joshua (LaughingLeader)</title>
		<link>http://www.ryanwelcher.com/getdefinitionbyname/#comment-9</link>
		<dc:creator>Joshua (LaughingLeader)</dc:creator>
		<pubDate>Thu, 26 Jul 2012 22:10:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.ryanwelcher.com/?p=662#comment-9</guid>
		<description><![CDATA[Thanks for taking the time to right this post! I&#039;ve been running into the same problem for months now. 

A few months ago, I had stored Inventory data (for a game I&#039;m developing) by storing the name of the item in an object (then created a save file from that). I ran into the problem with getDefinitionByName() described here. I just decided to just save the whole Inventory class I made instead, which worked. 

Then here I was today, running into the same problem as I try to create classes for my Levels (and add them into an Array) by pulling the Level Class names from an external XML file (and create new classes using getDefinitionByName()). I ran into that whole &quot;Variable is not defined&quot; problem. I wasn&#039;t sure what to do, as I hadn&#039;t found a solution for this problem before, so thank you again for posting a fix for this error. 

I wish there was a way to get Flash to just automatically include the definitions of my level classes (without me having to make a reference for each class), but this will work well enough for now.]]></description>
		<content:encoded><![CDATA[<p>Thanks for taking the time to right this post! I&#8217;ve been running into the same problem for months now. </p>
<p>A few months ago, I had stored Inventory data (for a game I&#8217;m developing) by storing the name of the item in an object (then created a save file from that). I ran into the problem with getDefinitionByName() described here. I just decided to just save the whole Inventory class I made instead, which worked. </p>
<p>Then here I was today, running into the same problem as I try to create classes for my Levels (and add them into an Array) by pulling the Level Class names from an external XML file (and create new classes using getDefinitionByName()). I ran into that whole &#8220;Variable is not defined&#8221; problem. I wasn&#8217;t sure what to do, as I hadn&#8217;t found a solution for this problem before, so thank you again for posting a fix for this error. </p>
<p>I wish there was a way to get Flash to just automatically include the definitions of my level classes (without me having to make a reference for each class), but this will work well enough for now.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on getDefinitionByName by Erik</title>
		<link>http://www.ryanwelcher.com/getdefinitionbyname/#comment-8</link>
		<dc:creator>Erik</dc:creator>
		<pubDate>Thu, 12 Jul 2012 18:44:52 +0000</pubDate>
		<guid isPermaLink="false">http://www.ryanwelcher.com/?p=662#comment-8</guid>
		<description><![CDATA[Hello.

This happens because the flash compiler does not compile classes into the SWF that it doesn&#039;t think are being used. This is a space and time saving measure. It does not anticipate that you will try to retrieve the non-referenced classes via a getDefinitionByName call, however. So you need to reference the class somewhere in the application, anywhere in the application, which is being compiled.

I&#039;ve found the cleanest solution to this is to make a class, say called IterativeClasses, and make a reference to any class which might only be instantiated after a getDefinitionByName call. Then make a reference to this inside your main document class. So for example, my IterableClasses class:

package ws.wild 
{
	import ws.wild.display.modules.CalendarDisplay;
	import ws.wild.display.modules.CollectionsDisplay;
	import ws.wild.display.modules.ContainerDisplay;
	import ws.wild.display.modules.HomeDisplay;
	import ws.wild.display.modules.MapDisplay;
	import ws.wild.display.modules.MenuDisplay;
	import ws.wild.display.modules.SettingDisplay;
	import ws.wild.display.modules.StripDisplay;
	import ws.wild.display.modules.WorldDisplay;
	
	public class IterableClasses 
	{
		public function IterableClasses() 
		{
			HomeDisplay;
			WorldDisplay;
			ContainerDisplay;
			SettingDisplay;
			StripDisplay;
			MapDisplay;
			MenuDisplay;
			CalendarDisplay;
			CollectionsDisplay;
		}
	}
}


and inside Main.as:


		public function Main() 
		{
			IterableClasses;
			...
		}

And then all of those classes will work fine with getDefinitionByName.]]></description>
		<content:encoded><![CDATA[<p>Hello.</p>
<p>This happens because the flash compiler does not compile classes into the SWF that it doesn&#8217;t think are being used. This is a space and time saving measure. It does not anticipate that you will try to retrieve the non-referenced classes via a getDefinitionByName call, however. So you need to reference the class somewhere in the application, anywhere in the application, which is being compiled.</p>
<p>I&#8217;ve found the cleanest solution to this is to make a class, say called IterativeClasses, and make a reference to any class which might only be instantiated after a getDefinitionByName call. Then make a reference to this inside your main document class. So for example, my IterableClasses class:</p>
<p>package ws.wild<br />
{<br />
	import ws.wild.display.modules.CalendarDisplay;<br />
	import ws.wild.display.modules.CollectionsDisplay;<br />
	import ws.wild.display.modules.ContainerDisplay;<br />
	import ws.wild.display.modules.HomeDisplay;<br />
	import ws.wild.display.modules.MapDisplay;<br />
	import ws.wild.display.modules.MenuDisplay;<br />
	import ws.wild.display.modules.SettingDisplay;<br />
	import ws.wild.display.modules.StripDisplay;<br />
	import ws.wild.display.modules.WorldDisplay;</p>
<p>	public class IterableClasses<br />
	{<br />
		public function IterableClasses()<br />
		{<br />
			HomeDisplay;<br />
			WorldDisplay;<br />
			ContainerDisplay;<br />
			SettingDisplay;<br />
			StripDisplay;<br />
			MapDisplay;<br />
			MenuDisplay;<br />
			CalendarDisplay;<br />
			CollectionsDisplay;<br />
		}<br />
	}<br />
}</p>
<p>and inside Main.as:</p>
<p>		public function Main()<br />
		{<br />
			IterableClasses;<br />
			&#8230;<br />
		}</p>
<p>And then all of those classes will work fine with getDefinitionByName.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Blackberry Playbook OS 2.0 by Ryan</title>
		<link>http://www.ryanwelcher.com/blackberry-playbook-os-2-0/#comment-11</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Tue, 12 Jun 2012 14:25:36 +0000</pubDate>
		<guid isPermaLink="false">http://www.ryanwelcher.com/?p=771#comment-11</guid>
		<description><![CDATA[Debra - thanks for the comment. I agree that it is very frustrating. There is a free e-pub reader that I have ( I can&#039;t remember the name off hand ) and I download the e-pub version from Kobo onto Playbook and use it to read them.]]></description>
		<content:encoded><![CDATA[<p>Debra &#8211; thanks for the comment. I agree that it is very frustrating. There is a free e-pub reader that I have ( I can&#8217;t remember the name off hand ) and I download the e-pub version from Kobo onto Playbook and use it to read them.</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Blackberry Playbook OS 2.0 by Debra Tremblay</title>
		<link>http://www.ryanwelcher.com/blackberry-playbook-os-2-0/#comment-10</link>
		<dc:creator>Debra Tremblay</dc:creator>
		<pubDate>Sun, 27 May 2012 15:47:57 +0000</pubDate>
		<guid isPermaLink="false">http://www.ryanwelcher.com/?p=771#comment-10</guid>
		<description><![CDATA[I got a Playbook with Kobo for my birthday in Feb. and have been trying to transfer my sisters Kobo books to it ever since.  Everything I or any of my friends have tried, failed.  I was able to transfer the PDF books from my computer to the Playbook, but cannot get them into Kobo.  I can read the books in PDF, but it doesn&#039;t register where I was in the book when I leave the book to do something else, contrary to the Kobo books.  I am frustrated.  All the Kobo books I have on my computer do not transfer at all to the Playbook, only the PDF files.  These are two different things. It is frustrating!!!!!]]></description>
		<content:encoded><![CDATA[<p>I got a Playbook with Kobo for my birthday in Feb. and have been trying to transfer my sisters Kobo books to it ever since.  Everything I or any of my friends have tried, failed.  I was able to transfer the PDF books from my computer to the Playbook, but cannot get them into Kobo.  I can read the books in PDF, but it doesn&#8217;t register where I was in the book when I leave the book to do something else, contrary to the Kobo books.  I am frustrated.  All the Kobo books I have on my computer do not transfer at all to the Playbook, only the PDF files.  These are two different things. It is frustrating!!!!!</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on getDefinitionByName by Ryan</title>
		<link>http://www.ryanwelcher.com/getdefinitionbyname/#comment-7</link>
		<dc:creator>Ryan</dc:creator>
		<pubDate>Sat, 05 May 2012 12:53:44 +0000</pubDate>
		<guid isPermaLink="false">http://www.ryanwelcher.com/?p=662#comment-7</guid>
		<description><![CDATA[@Andrew

Glad to help! I know that this one has gotten me a few times. Source order can definitely come into play depending on how the application is put together. 

I have gotten into the habit of declaring the variables inside the method that actually makes the GetDefinitionByName() call which would eliminate the issue of where the variables are declared.

As to whether it&#039;s a bug - I would have to agree. There is no mention of this gotcha (that I can find anyway) in the documentation and as you know it seems to be a bit of voodoo as to why things work the way they do.

Thanks for the comment and I&#039;d love to see what the finished product is!

Ryan]]></description>
		<content:encoded><![CDATA[<p>@Andrew</p>
<p>Glad to help! I know that this one has gotten me a few times. Source order can definitely come into play depending on how the application is put together. </p>
<p>I have gotten into the habit of declaring the variables inside the method that actually makes the GetDefinitionByName() call which would eliminate the issue of where the variables are declared.</p>
<p>As to whether it&#8217;s a bug &#8211; I would have to agree. There is no mention of this gotcha (that I can find anyway) in the documentation and as you know it seems to be a bit of voodoo as to why things work the way they do.</p>
<p>Thanks for the comment and I&#8217;d love to see what the finished product is!</p>
<p>Ryan</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on getDefinitionByName by Andrew Riddell</title>
		<link>http://www.ryanwelcher.com/getdefinitionbyname/#comment-6</link>
		<dc:creator>Andrew Riddell</dc:creator>
		<pubDate>Sat, 05 May 2012 04:33:26 +0000</pubDate>
		<guid isPermaLink="false">http://www.ryanwelcher.com/?p=662#comment-6</guid>
		<description><![CDATA[Thanks!

I have been using getDefinitionByName to make an instance of a class that is defined in a package - very much like your getDefinitionByName(&quot;screens.StartScreen&quot;) example, and it has been workeding just fine.

Then suddenly it just stopped working, for no reason that I could find.

After some hair-tearing, I found your article here.

Then, I realised that, by chance, I had always been declaring a variable of the type that I was instantiating before I made the call to getDefinitionByName(). But, I had rearranged code, so that variable was no longer being declared before the call to getDefinitionByName().

By re-instating a decalraration of a dummy vraible of this type, the call to getDefinitionByName() has started being successful again.

So, I am very grateful for your help.

Methinks this is a bit of a bug in AS3 (well... at least an &quot;unexpected limitation&quot;).]]></description>
		<content:encoded><![CDATA[<p>Thanks!</p>
<p>I have been using getDefinitionByName to make an instance of a class that is defined in a package &#8211; very much like your getDefinitionByName(&#8220;screens.StartScreen&#8221;) example, and it has been workeding just fine.</p>
<p>Then suddenly it just stopped working, for no reason that I could find.</p>
<p>After some hair-tearing, I found your article here.</p>
<p>Then, I realised that, by chance, I had always been declaring a variable of the type that I was instantiating before I made the call to getDefinitionByName(). But, I had rearranged code, so that variable was no longer being declared before the call to getDefinitionByName().</p>
<p>By re-instating a decalraration of a dummy vraible of this type, the call to getDefinitionByName() has started being successful again.</p>
<p>So, I am very grateful for your help.</p>
<p>Methinks this is a bit of a bug in AS3 (well&#8230; at least an &#8220;unexpected limitation&#8221;).</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Compiler Error 1046 by Error 1180 &#124; Ryan Welcher</title>
		<link>http://www.ryanwelcher.com/error-1046/#comment-5</link>
		<dc:creator>Error 1180 &#124; Ryan Welcher</dc:creator>
		<pubDate>Thu, 30 Sep 2010 16:21:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.ryanwelcher.com/?p=205#comment-5</guid>
		<description><![CDATA[[...] error is commonly seen with Error 1046 when you forget to import a class [...]]]></description>
		<content:encoded><![CDATA[<p>[...] error is commonly seen with Error 1046 when you forget to import a class [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comment on Getter ready, get Setter, Go! by What the Function!? &#124; Ryan Welcher</title>
		<link>http://www.ryanwelcher.com/getter-ready-get-setter-go/#comment-4</link>
		<dc:creator>What the Function!? &#124; Ryan Welcher</dc:creator>
		<pubDate>Thu, 30 Sep 2010 14:57:11 +0000</pubDate>
		<guid isPermaLink="false">http://www.ryanwelcher.com/?p=160#comment-4</guid>
		<description><![CDATA[[...] first item is the access modifier (for more details on access modifiers go here). If you&#8217;re writing functions on the timeline of an FLA. Defining an access modifier for your [...]]]></description>
		<content:encoded><![CDATA[<p>[...] first item is the access modifier (for more details on access modifiers go here). If you&#8217;re writing functions on the timeline of an FLA. Defining an access modifier for your [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
