<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.2.1" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Embedding assets from SWF files</title>
	<link>http://blog.flexexamples.com/2007/07/25/embedding-assets-from-swf-files/</link>
	<description>A bunch of examples for Adobe Flex and ActionScript</description>
	<pubDate>Wed, 19 Nov 2008 23:41:46 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.2.1</generator>

	<item>
		<title>By: Phil</title>
		<link>http://blog.flexexamples.com/2007/07/25/embedding-assets-from-swf-files/#comment-16785</link>
		<author>Phil</author>
		<pubDate>Wed, 19 Nov 2008 00:40:35 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/07/25/embedding-assets-from-swf-files/#comment-16785</guid>
		<description>Im hoping someone can help me on this, I have been using the SWF files as asset libraries, these are dynamically loaded from an XML datasource that is passed to the app, now everone of them works fine.....apart from the thumbSkin for a vertical scroll bar? if i use images from a folder it works fine, but once I use the SWF the thumbSkin appears 5px or so to the right, or with a restricted width, any ideas on this? could it be a registration point? I checked that but it didnt seem to make any difference, any help would be greatly appreciated, and kudos on a great site!</description>
		<content:encoded><![CDATA[<p>Im hoping someone can help me on this, I have been using the SWF files as asset libraries, these are dynamically loaded from an XML datasource that is passed to the app, now everone of them works fine&#8230;..apart from the thumbSkin for a vertical scroll bar? if i use images from a folder it works fine, but once I use the SWF the thumbSkin appears 5px or so to the right, or with a restricted width, any ideas on this? could it be a registration point? I checked that but it didnt seem to make any difference, any help would be greatly appreciated, and kudos on a great site!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bcedergren</title>
		<link>http://blog.flexexamples.com/2007/07/25/embedding-assets-from-swf-files/#comment-12707</link>
		<author>bcedergren</author>
		<pubDate>Thu, 15 May 2008 16:41:02 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/07/25/embedding-assets-from-swf-files/#comment-12707</guid>
		<description>Is it possible to access the variables from the embedded swf?</description>
		<content:encoded><![CDATA[<p>Is it possible to access the variables from the embedded swf?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: priya</title>
		<link>http://blog.flexexamples.com/2007/07/25/embedding-assets-from-swf-files/#comment-12542</link>
		<author>priya</author>
		<pubDate>Wed, 07 May 2008 11:59:55 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/07/25/embedding-assets-from-swf-files/#comment-12542</guid>
		<description>IS Flex supports templates(framework) to develop Assessments?Could any one please tell me?</description>
		<content:encoded><![CDATA[<p>IS Flex supports templates(framework) to develop Assessments?Could any one please tell me?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cdude</title>
		<link>http://blog.flexexamples.com/2007/07/25/embedding-assets-from-swf-files/#comment-11325</link>
		<author>cdude</author>
		<pubDate>Wed, 09 Apr 2008 02:42:55 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/07/25/embedding-assets-from-swf-files/#comment-11325</guid>
		<description>nevermind... I forgot to put the import for the class there - now it shows up in code completion - DOH!

One other question though - how come I can't stretch the vector symbol when used in this fashion?  I mean, having a width and height attribute works if they are both the same value - then it scales the symbol - however, having a larger width (i.e. changing its aspect ratio) than height will not stretch the symbol at all??</description>
		<content:encoded><![CDATA[<p>nevermind&#8230; I forgot to put the import for the class there - now it shows up in code completion - DOH!</p>
<p>One other question though - how come I can&#8217;t stretch the vector symbol when used in this fashion?  I mean, having a width and height attribute works if they are both the same value - then it scales the symbol - however, having a larger width (i.e. changing its aspect ratio) than height will not stretch the symbol at all??</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: cdude</title>
		<link>http://blog.flexexamples.com/2007/07/25/embedding-assets-from-swf-files/#comment-11324</link>
		<author>cdude</author>
		<pubDate>Wed, 09 Apr 2008 02:18:28 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/07/25/embedding-assets-from-swf-files/#comment-11324</guid>
		<description>Hi, 

If I am using the Flexbuilder plugin in MyEclipse, can this method you mention here work with code  completion in the mxml files?

I mean, if I set up the class and package like that, will the constants/swf library symbols appear in dropdown code complete popups while editing the mxml files?

thanks :)</description>
		<content:encoded><![CDATA[<p>Hi, </p>
<p>If I am using the Flexbuilder plugin in MyEclipse, can this method you mention here work with code  completion in the mxml files?</p>
<p>I mean, if I set up the class and package like that, will the constants/swf library symbols appear in dropdown code complete popups while editing the mxml files?</p>
<p>thanks :)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rconceiver</title>
		<link>http://blog.flexexamples.com/2007/07/25/embedding-assets-from-swf-files/#comment-7309</link>
		<author>rconceiver</author>
		<pubDate>Mon, 03 Mar 2008 06:50:07 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/07/25/embedding-assets-from-swf-files/#comment-7309</guid>
		<description>Thanks a lot Peter!

Problem solved with your solution! using the embed directive!

thanks once again...</description>
		<content:encoded><![CDATA[<p>Thanks a lot Peter!</p>
<p>Problem solved with your solution! using the embed directive!</p>
<p>thanks once again&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/07/25/embedding-assets-from-swf-files/#comment-7245</link>
		<author>peterd</author>
		<pubDate>Fri, 29 Feb 2008 22:20:02 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/07/25/embedding-assets-from-swf-files/#comment-7245</guid>
		<description>OK, I posted the full example at &lt;a href="http://blog.flexexamples.com/2008/02/29/setting-a-button-controls-icon-to-an-asset-from-a-swf-file-in-flex/" rel="nofollow"&gt;"Setting a Button control's icon to an asset from a SWF file in Flex"&lt;/a&gt;.

Peter</description>
		<content:encoded><![CDATA[<p>OK, I posted the full example at <a href="http://blog.flexexamples.com/2008/02/29/setting-a-button-controls-icon-to-an-asset-from-a-swf-file-in-flex/" rel="nofollow">&#8220;Setting a Button control&#8217;s icon to an asset from a SWF file in Flex&#8221;</a>.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/07/25/embedding-assets-from-swf-files/#comment-7242</link>
		<author>peterd</author>
		<pubDate>Fri, 29 Feb 2008 21:11:44 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/07/25/embedding-assets-from-swf-files/#comment-7242</guid>
		<description>rconceiver,

I don't believe you can use the Embed directive in ActionScript. You'd need to  use the [Embed] metadata to embed your desired icon.
Then, once the asset is embedded, you can do something like the following:

&lt;pre class="code"&gt;
[Bindable]
[Embed("icons.swf#bullet_star")]
public var bulletStarIcon:Class;

private function init():void {			
	var button:Button = new Button();
	button.label = "Star";
	button.setStyle("icon", bulletStarIcon);
	addChild(button);
}
&lt;/pre&gt;

I'll try and post a new example later today showing the full code, but this should be enough to get you started.

Peter</description>
		<content:encoded><![CDATA[<p>rconceiver,</p>
<p>I don&#8217;t believe you can use the Embed directive in ActionScript. You&#8217;d need to  use the [Embed] metadata to embed your desired icon.<br />
Then, once the asset is embedded, you can do something like the following:</p>
<pre class="code">
[Bindable]
[Embed("icons.swf#bullet_star")]
public var bulletStarIcon:Class;

private function init():void {
	var button:Button = new Button();
	button.label = "Star";
	button.setStyle("icon", bulletStarIcon);
	addChild(button);
}
</pre>
<p>I&#8217;ll try and post a new example later today showing the full code, but this should be enough to get you started.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: rconceiver</title>
		<link>http://blog.flexexamples.com/2007/07/25/embedding-assets-from-swf-files/#comment-7238</link>
		<author>rconceiver</author>
		<pubDate>Fri, 29 Feb 2008 15:25:02 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/07/25/embedding-assets-from-swf-files/#comment-7238</guid>
		<description>thanks for the information.

I have a query! 
If I want to use flash movieclip in flex as button then it gives error.

for example:
&lt;pre class="code"&gt;
var sample_btn:Button = new Button()
sample_btn.icon = Embed('assets/icons.swf', symbol='bulletWarning')
&lt;/pre&gt;

it gives error any suggestion please!</description>
		<content:encoded><![CDATA[<p>thanks for the information.</p>
<p>I have a query!<br />
If I want to use flash movieclip in flex as button then it gives error.</p>
<p>for example:</p>
<pre class="code">
var sample_btn:Button = new Button()
sample_btn.icon = Embed('assets/icons.swf', symbol='bulletWarning')
</pre>
<p>it gives error any suggestion please!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2007/07/25/embedding-assets-from-swf-files/#comment-2703</link>
		<author>peterd</author>
		<pubDate>Fri, 21 Sep 2007 03:46:33 +0000</pubDate>
		<guid>http://blog.flexexamples.com/2007/07/25/embedding-assets-from-swf-files/#comment-2703</guid>
		<description>brian,

Are you using one of the snippets from above? If you can post some code (or a link to the code on your server -- sometimes my comment form eats HTMLy syntax), I can take a look.

Peter</description>
		<content:encoded><![CDATA[<p>brian,</p>
<p>Are you using one of the snippets from above? If you can post some code (or a link to the code on your server &#8212; sometimes my comment form eats HTMLy syntax), I can take a look.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
</channel>
</rss>
