<?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: Embed Assets in Flash Project</title>
	<atom:link href="http://blog.betabong.com/2009/02/13/embed-assets-in-flash-project/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.betabong.com/2009/02/13/embed-assets-in-flash-project/</link>
	<description></description>
	<lastBuildDate>Sun, 22 Jan 2012 17:41:27 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: Markavian</title>
		<link>http://blog.betabong.com/2009/02/13/embed-assets-in-flash-project/comment-page-1/#comment-64</link>
		<dc:creator>Markavian</dc:creator>
		<pubDate>Thu, 27 Aug 2009 16:42:08 +0000</pubDate>
		<guid isPermaLink="false">http://blog.betabong.com/?p=190#comment-64</guid>
		<description>I&#039;ve been a flash develop for some 8 years now, and I&#039;m constantly reviewing the way I work between the Flash IDE and pure AS3 to simplifying and separate layouts from code without causing myself too much work.

On the whole, its a hassle, with me ending up with named definitions in Flash IDE, the Flash Library and duplicate references in my code. As much as I&#039;d like to create purely code based apps, some layouts are just impossible to reason about.

I like the look of above solution because it faithfully reproduces a flash layout in a purely AS3 program independent of the Flash IDE compiler. I shall investigate and see if it works for my current project.

At the moment I&#039;m struggling because I don&#039;t think the Flash IDE Compiler understands:
	[Embed(source=&quot;GameAssets.swf&quot;, symbol=&quot;character_john&quot;)]
	public static var John:Class;
And so, this is a bit useless to me at the moment.</description>
		<content:encoded><![CDATA[<p>I&#8217;ve been a flash develop for some 8 years now, and I&#8217;m constantly reviewing the way I work between the Flash IDE and pure AS3 to simplifying and separate layouts from code without causing myself too much work.</p>
<p>On the whole, its a hassle, with me ending up with named definitions in Flash IDE, the Flash Library and duplicate references in my code. As much as I&#8217;d like to create purely code based apps, some layouts are just impossible to reason about.</p>
<p>I like the look of above solution because it faithfully reproduces a flash layout in a purely AS3 program independent of the Flash IDE compiler. I shall investigate and see if it works for my current project.</p>
<p>At the moment I&#8217;m struggling because I don&#8217;t think the Flash IDE Compiler understands:<br />
	[Embed(source="GameAssets.swf", symbol="character_john")]<br />
	public static var John:Class;<br />
And so, this is a bit useless to me at the moment.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Sev</title>
		<link>http://blog.betabong.com/2009/02/13/embed-assets-in-flash-project/comment-page-1/#comment-46</link>
		<dc:creator>Sev</dc:creator>
		<pubDate>Tue, 02 Jun 2009 08:39:01 +0000</pubDate>
		<guid isPermaLink="false">http://blog.betabong.com/?p=190#comment-46</guid>
		<description>Just to clarify, this really isn&#039;t some kind of standard method &quot;how you should do it&quot; or &quot;how I usually do it&quot;. It&#039;s just a technique, and like most techniques, this one can be useful too for specific needs (in my case it was for an easy conversion of an older fla-project into flex, without having to redesign too much).

Also I want to mention that, no, you don&#039;t need a class for each one of the loaded assets (for each button, graphic, movieclip etc.) That&#039;s the whole point: you instead embed the library, and then you&#039;re able to access any asset within that embedded library, as if you&#039;d loaded it dynamically into your Application Domain.</description>
		<content:encoded><![CDATA[<p>Just to clarify, this really isn&#8217;t some kind of standard method &#8220;how you should do it&#8221; or &#8220;how I usually do it&#8221;. It&#8217;s just a technique, and like most techniques, this one can be useful too for specific needs (in my case it was for an easy conversion of an older fla-project into flex, without having to redesign too much).</p>
<p>Also I want to mention that, no, you don&#8217;t need a class for each one of the loaded assets (for each button, graphic, movieclip etc.) That&#8217;s the whole point: you instead embed the library, and then you&#8217;re able to access any asset within that embedded library, as if you&#8217;d loaded it dynamically into your Application Domain.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Kirill</title>
		<link>http://blog.betabong.com/2009/02/13/embed-assets-in-flash-project/comment-page-1/#comment-45</link>
		<dc:creator>Kirill</dc:creator>
		<pubDate>Sat, 30 May 2009 12:06:23 +0000</pubDate>
		<guid isPermaLink="false">http://blog.betabong.com/?p=190#comment-45</guid>
		<description>One thing I don&#039;t like about this is that the code is tightly-bound to the graphics, which makes dynamic skinning somewhat of a pain. Imagine having several kinds of buttons in your application. Using this approach you have to create a class for each of them (at least to embed the swf, the main button logic can be put into the superclass). In terms of code having to create a subclass just to embed a different swf? Ehhh... 

What we ended up doing is having a pretty good asset loading engine take care of loading the required swfs at run time and then in the application logic pulling out the needed graphics from its ApplicationDomain. That way you only need one class for a button. The button skin is loaded dynamically at run time as opposed to be hardwired into it at compile time. This also allows for on the fly skinning of the button while the application is running. Another advantage of this is that we didn&#039;t make our framework+applications dependent on one kind of compiler. If somebody in the future makes a better compiler than mxmlc (and that&#039;s easily possibly with lack of some important compiler functionality on part of mxmlc) and decides to change the syntax of all those compiler directives or not implement them at all, then using your and Grant&#039;s approach you&#039;re out of luck and have to continue to use the crappy, old mxmlc compiler. As opposed to our approach with which the better compiler can be used instead and the application will still function like it did.</description>
		<content:encoded><![CDATA[<p>One thing I don&#8217;t like about this is that the code is tightly-bound to the graphics, which makes dynamic skinning somewhat of a pain. Imagine having several kinds of buttons in your application. Using this approach you have to create a class for each of them (at least to embed the swf, the main button logic can be put into the superclass). In terms of code having to create a subclass just to embed a different swf? Ehhh&#8230; </p>
<p>What we ended up doing is having a pretty good asset loading engine take care of loading the required swfs at run time and then in the application logic pulling out the needed graphics from its ApplicationDomain. That way you only need one class for a button. The button skin is loaded dynamically at run time as opposed to be hardwired into it at compile time. This also allows for on the fly skinning of the button while the application is running. Another advantage of this is that we didn&#8217;t make our framework+applications dependent on one kind of compiler. If somebody in the future makes a better compiler than mxmlc (and that&#8217;s easily possibly with lack of some important compiler functionality on part of mxmlc) and decides to change the syntax of all those compiler directives or not implement them at all, then using your and Grant&#8217;s approach you&#8217;re out of luck and have to continue to use the crappy, old mxmlc compiler. As opposed to our approach with which the better compiler can be used instead and the application will still function like it did.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced

Served from: blog.betabong.com @ 2012-02-05 08:03:05 -->
