<?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: Runtime font loading with AS3 / Flash CS3 (not Flex!)</title>
	<atom:link href="http://www.betriebsraum.de/blog/2007/06/22/runtime-font-loading-with-as3-flash-cs3-not-flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.betriebsraum.de/blog/2007/06/22/runtime-font-loading-with-as3-flash-cs3-not-flex/</link>
	<description>Rich Internet Applications, Software Development, Human-Computer Interaction</description>
	<lastBuildDate>Tue, 15 Nov 2011 08:03:44 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3</generator>
	<item>
		<title>By: Seshadri@MF</title>
		<link>http://www.betriebsraum.de/blog/2007/06/22/runtime-font-loading-with-as3-flash-cs3-not-flex/comment-page-2/#comment-323386</link>
		<dc:creator>Seshadri@MF</dc:creator>
		<pubDate>Thu, 18 Aug 2011 11:09:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.betriebsraum.de/blog/2007/06/22/runtime-font-loading-with-as3-flash-cs3-not-flex/#comment-323386</guid>
		<description>@santoshs: you need to have a mechanism to set the text format for the static text  when the loading is over. And you have to take care that the fonts are already loaded in the main , before you try to access it. 
What I used to do is , Load the fonts intially and when they are loaded save them in an class as static variable.Then I used to wait for the intial assets to be laoded(like font and child .swf), and when they are laoded, I call a method(s) in the child swf(s) to set the text format according to the loaded font in the staic variable. All other assets loaded afterwards will be using the staic variable text format to set their text after they are laoded. In this way you can get both your staic and dynamic text hold the loaded font.</description>
		<content:encoded><![CDATA[<p>@santoshs: you need to have a mechanism to set the text format for the static text  when the loading is over. And you have to take care that the fonts are already loaded in the main , before you try to access it.<br />
What I used to do is , Load the fonts intially and when they are loaded save them in an class as static variable.Then I used to wait for the intial assets to be laoded(like font and child .swf), and when they are laoded, I call a method(s) in the child swf(s) to set the text format according to the loaded font in the staic variable. All other assets loaded afterwards will be using the staic variable text format to set their text after they are laoded. In this way you can get both your staic and dynamic text hold the loaded font.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: santoshs</title>
		<link>http://www.betriebsraum.de/blog/2007/06/22/runtime-font-loading-with-as3-flash-cs3-not-flex/comment-page-2/#comment-319700</link>
		<dc:creator>santoshs</dc:creator>
		<pubDate>Wed, 25 May 2011 12:17:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.betriebsraum.de/blog/2007/06/22/runtime-font-loading-with-as3-flash-cs3-not-flex/#comment-319700</guid>
		<description>Hi Felix, your article is really helpful but I think there is at least one use case which it doesn&#039;t address. And that case is: using the run-time loaded font on a manually placed TextField inside a run-time loaded swf which is I&#039;m suffering at the moment. 

More info:
Fonts.swf: It has the font symbols embedded and exported for ActionScript.
Child.swf: It has text fields placed on stage. Fonts are not embedded.
Main.swf: Main application. It loads Fonts.swf, registers the fonts inside it and uses the font throughout the application. Child.swf is a typical external swf loaded by Main.swf

Requirement:
Set the texts of text fields inside Child.swf once both Child.swf and Fonts.swf are loaded by the Main.swf AND the fonts in the Fonts.swf are registered by the Main.swf

Problem:
None of the texts in the Child.swf are visible when the text is set by the Main.swf even after registering the fonts of Fonts.swf. But when a dynamic text field is created by using new TextField() it works perfectly fine

If you or anyone else has a solution for this problem please do share.</description>
		<content:encoded><![CDATA[<p>Hi Felix, your article is really helpful but I think there is at least one use case which it doesn&#8217;t address. And that case is: using the run-time loaded font on a manually placed TextField inside a run-time loaded swf which is I&#8217;m suffering at the moment. </p>
<p>More info:<br />
Fonts.swf: It has the font symbols embedded and exported for ActionScript.<br />
Child.swf: It has text fields placed on stage. Fonts are not embedded.<br />
Main.swf: Main application. It loads Fonts.swf, registers the fonts inside it and uses the font throughout the application. Child.swf is a typical external swf loaded by Main.swf</p>
<p>Requirement:<br />
Set the texts of text fields inside Child.swf once both Child.swf and Fonts.swf are loaded by the Main.swf AND the fonts in the Fonts.swf are registered by the Main.swf</p>
<p>Problem:<br />
None of the texts in the Child.swf are visible when the text is set by the Main.swf even after registering the fonts of Fonts.swf. But when a dynamic text field is created by using new TextField() it works perfectly fine</p>
<p>If you or anyone else has a solution for this problem please do share.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Fonts einbetten... - Flashforum</title>
		<link>http://www.betriebsraum.de/blog/2007/06/22/runtime-font-loading-with-as3-flash-cs3-not-flex/comment-page-1/#comment-309148</link>
		<dc:creator>Fonts einbetten... - Flashforum</dc:creator>
		<pubDate>Wed, 03 Nov 2010 13:22:40 +0000</pubDate>
		<guid isPermaLink="false">http://www.betriebsraum.de/blog/2007/06/22/runtime-font-loading-with-as3-flash-cs3-not-flex/#comment-309148</guid>
		<description>[...]  [...]</description>
		<content:encoded><![CDATA[<p>[...]  [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Poznámky &#171; web-goodies</title>
		<link>http://www.betriebsraum.de/blog/2007/06/22/runtime-font-loading-with-as3-flash-cs3-not-flex/comment-page-1/#comment-303200</link>
		<dc:creator>Poznámky &#171; web-goodies</dc:creator>
		<pubDate>Wed, 31 Mar 2010 09:03:59 +0000</pubDate>
		<guid isPermaLink="false">http://www.betriebsraum.de/blog/2007/06/22/runtime-font-loading-with-as3-flash-cs3-not-flex/#comment-303200</guid>
		<description>[...] http://www.betriebsraum.de/blog/2007/06/22/runtime-font-loading-with-as3-flash-cs3-not-flex/ [...]</description>
		<content:encoded><![CDATA[<p>[...] <a href="http://www.betriebsraum.de/blog/2007/06/22/runtime-font-loading-with-as3-flash-cs3-not-flex/" rel="nofollow">http://www.betriebsraum.de/blog/2007/06/22/runtime-font-loading-with-as3-flash-cs3-not-flex/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.betriebsraum.de/blog/2007/06/22/runtime-font-loading-with-as3-flash-cs3-not-flex/comment-page-1/#comment-301961</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Sat, 13 Feb 2010 00:48:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.betriebsraum.de/blog/2007/06/22/runtime-font-loading-with-as3-flash-cs3-not-flex/#comment-301961</guid>
		<description>Ah Ha!

I read &quot;If you additionally place a static textfield onto the stage with the same font, the text in the dynamic textfield isn’t shown anymore.&quot; to mean you cannot have them on stage at the same time, on the same keyframe. It really means anywhere in the movie! And not just static textfields, don&#039;t select the same font as the one you are embedding for any type field. If you have to place a dynamic text field on the stage manually instead of using AS to create, make sure to select a font that is not being embedded. Then in AS apply the style sheet.
For other things, like UI components, say the label on a radio button, 
the work-around for I found is to use the transform method of the styleSheet and then the setStyle  or setTextFormat method depending on where the text is (in a UI component or a textfield).

var style:Object = sheet.getStyle(&quot;.myStyle&quot;);//note the . 
var cssFormat = sheet.transform(style);
myRadioButton.setStyle(&quot;disabledTextFormat&quot;, cssFormat);</description>
		<content:encoded><![CDATA[<p>Ah Ha!</p>
<p>I read &#8220;If you additionally place a static textfield onto the stage with the same font, the text in the dynamic textfield isn’t shown anymore.&#8221; to mean you cannot have them on stage at the same time, on the same keyframe. It really means anywhere in the movie! And not just static textfields, don&#8217;t select the same font as the one you are embedding for any type field. If you have to place a dynamic text field on the stage manually instead of using AS to create, make sure to select a font that is not being embedded. Then in AS apply the style sheet.<br />
For other things, like UI components, say the label on a radio button,<br />
the work-around for I found is to use the transform method of the styleSheet and then the setStyle  or setTextFormat method depending on where the text is (in a UI component or a textfield).</p>
<p>var style:Object = sheet.getStyle(&#8220;.myStyle&#8221;);//note the .<br />
var cssFormat = sheet.transform(style);<br />
myRadioButton.setStyle(&#8220;disabledTextFormat&#8221;, cssFormat);</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.betriebsraum.de/blog/2007/06/22/runtime-font-loading-with-as3-flash-cs3-not-flex/comment-page-1/#comment-301958</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Fri, 12 Feb 2010 20:40:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.betriebsraum.de/blog/2007/06/22/runtime-font-loading-with-as3-flash-cs3-not-flex/#comment-301958</guid>
		<description>pretty sure
 .bodyText{font-family: Verdana;
	font-size: 14px;
	color:#000000;
}</description>
		<content:encoded><![CDATA[<p>pretty sure<br />
 .bodyText{font-family: Verdana;<br />
	font-size: 14px;<br />
	color:#000000;<br />
}</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: felix</title>
		<link>http://www.betriebsraum.de/blog/2007/06/22/runtime-font-loading-with-as3-flash-cs3-not-flex/comment-page-1/#comment-301916</link>
		<dc:creator>felix</dc:creator>
		<pubDate>Wed, 10 Feb 2010 20:09:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.betriebsraum.de/blog/2007/06/22/runtime-font-loading-with-as3-flash-cs3-not-flex/#comment-301916</guid>
		<description>Hi Chris,

are you sure you&#039;ve correctly declared your styles in the css file?</description>
		<content:encoded><![CDATA[<p>Hi Chris,</p>
<p>are you sure you&#8217;ve correctly declared your styles in the css file?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.betriebsraum.de/blog/2007/06/22/runtime-font-loading-with-as3-flash-cs3-not-flex/comment-page-1/#comment-301904</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Wed, 10 Feb 2010 14:51:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.betriebsraum.de/blog/2007/06/22/runtime-font-loading-with-as3-flash-cs3-not-flex/#comment-301904</guid>
		<description>Great it does not display the code. let me try again:

This works great on formatting text within tags like &lt;h1&gt;, but it does not seem to work when using tags with a class parameter, like &lt;p class=&quot;bodyText&quot;&gt;

Any Ideas?

Thanks</description>
		<content:encoded><![CDATA[<p>Great it does not display the code. let me try again:</p>
<p>This works great on formatting text within tags like &lt;h1&gt;, but it does not seem to work when using tags with a class parameter, like &lt;p class=&quot;bodyText&quot;&gt;</p>
<p>Any Ideas?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Chris</title>
		<link>http://www.betriebsraum.de/blog/2007/06/22/runtime-font-loading-with-as3-flash-cs3-not-flex/comment-page-1/#comment-301903</link>
		<dc:creator>Chris</dc:creator>
		<pubDate>Wed, 10 Feb 2010 14:49:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.betriebsraum.de/blog/2007/06/22/runtime-font-loading-with-as3-flash-cs3-not-flex/#comment-301903</guid>
		<description>Thanks for this, it has been very helpful. 

I have found one issue. This works great on formatting text within tags like , but it does not seem to work when using tags with a class parameter, like .

Any ideas?

Thanks</description>
		<content:encoded><![CDATA[<p>Thanks for this, it has been very helpful. </p>
<p>I have found one issue. This works great on formatting text within tags like , but it does not seem to work when using tags with a class parameter, like .</p>
<p>Any ideas?</p>
<p>Thanks</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peter</title>
		<link>http://www.betriebsraum.de/blog/2007/06/22/runtime-font-loading-with-as3-flash-cs3-not-flex/comment-page-1/#comment-301211</link>
		<dc:creator>peter</dc:creator>
		<pubDate>Sat, 23 Jan 2010 02:27:54 +0000</pubDate>
		<guid isPermaLink="false">http://www.betriebsraum.de/blog/2007/06/22/runtime-font-loading-with-as3-flash-cs3-not-flex/#comment-301211</guid>
		<description>there is a way to register the fonts without setting a class name in the swf. then you dont need a fonts object. you just use the original name in the textfield.</description>
		<content:encoded><![CDATA[<p>there is a way to register the fonts without setting a class name in the swf. then you dont need a fonts object. you just use the original name in the textfield.</p>
]]></content:encoded>
	</item>
</channel>
</rss>

