<?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: Using an embedded font with the TextArea control in Flash with ActionScript 3.0</title>
	<atom:link href="http://actionscriptexamples.com/2008/11/26/using-an-embedded-font-with-the-textarea-control-in-flash-with-actionscript-30/feed/" rel="self" type="application/rss+xml" />
	<link>http://actionscriptexamples.com/2008/11/26/using-an-embedded-font-with-the-textarea-control-in-flash-with-actionscript-30/</link>
	<description>A bunch of ActionScript 2.0 and ActionScript 3.0 examples*</description>
	<lastBuildDate>Thu, 22 Jul 2010 14:13:10 -0700</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: daniel</title>
		<link>http://actionscriptexamples.com/2008/11/26/using-an-embedded-font-with-the-textarea-control-in-flash-with-actionscript-30/comment-page-1/#comment-596</link>
		<dc:creator>daniel</dc:creator>
		<pubDate>Mon, 05 Oct 2009 15:10:36 +0000</pubDate>
		<guid isPermaLink="false">http://actionscriptexamples.com/?p=70#comment-596</guid>
		<description>thank you so much.
works like a charm....:-)</description>
		<content:encoded><![CDATA[<p>thank you so much.<br />
works like a charm&#8230;.:-)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chichilatte</title>
		<link>http://actionscriptexamples.com/2008/11/26/using-an-embedded-font-with-the-textarea-control-in-flash-with-actionscript-30/comment-page-1/#comment-560</link>
		<dc:creator>chichilatte</dc:creator>
		<pubDate>Wed, 22 Jul 2009 13:48:47 +0000</pubDate>
		<guid isPermaLink="false">http://actionscriptexamples.com/?p=70#comment-560</guid>
		<description>@Bhavya
In Flash authortime, make sure you have the TextArea component in your library, stick this code on your main timeline and publish. Course you&#039;ll need a text file to load too.

&lt;pre lang=&quot;actionscript3&quot;&gt;
import flash.events.*;
import flash.net.URLLoader;
import flash.net.URLRequest;
import fl.controls.TextArea;

var fileLoader:URLLoader;
var yourTextArea:TextArea = new TextArea();
addChild(yourTextArea);

loadFile(&quot;your_text_file.txt&quot;);




function loadFile(url:String) {
	fileLoader = new URLLoader();
	fileLoader.addEventListener(IOErrorEvent.IO_ERROR , onFileLoadError);
	fileLoader.addEventListener(Event.COMPLETE, onFileLoadComplete);
	fileLoader.load(new URLRequest(url));
}

function onFileLoadComplete(event:Event):void {
	fileLoader.removeEventListener(Event.COMPLETE, onFileLoadComplete);
	fileLoader.removeEventListener(IOErrorEvent.IO_ERROR , onFileLoadError);
	yourTextArea.htmlText = event.target.data as String;
}

function onFileLoadError(event:IOErrorEvent):void {
	trace(&quot;Could not load text &quot;);
}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>@Bhavya<br />
In Flash authortime, make sure you have the TextArea component in your library, stick this code on your main timeline and publish. Course you&#8217;ll need a text file to load too.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.events</span>.<span style="color: #000000; font-weight: bold;">*</span>;
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.net</span>.<span style="color: #004993;">URLLoader</span>;
<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.net</span>.<span style="color: #004993;">URLRequest</span>;
<span style="color: #0033ff; font-weight: bold;">import</span> fl.controls.TextArea;
&nbsp;
<span style="color: #6699cc; font-weight: bold;">var</span> fileLoader<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">URLLoader</span>;
<span style="color: #6699cc; font-weight: bold;">var</span> yourTextArea<span style="color: #000000; font-weight: bold;">:</span>TextArea = <span style="color: #0033ff; font-weight: bold;">new</span> TextArea<span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #004993;">addChild</span><span style="color: #000000;">&#40;</span>yourTextArea<span style="color: #000000;">&#41;</span>;
&nbsp;
loadFile<span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;your_text_file.txt&quot;</span><span style="color: #000000;">&#41;</span>;
&nbsp;
&nbsp;
&nbsp;
&nbsp;
<span style="color: #339966; font-weight: bold;">function</span> loadFile<span style="color: #000000;">&#40;</span><span style="color: #004993;">url</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span><span style="color: #000000;">&#41;</span> <span style="color: #000000;">&#123;</span>
	fileLoader = <span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">URLLoader</span><span style="color: #000000;">&#40;</span><span style="color: #000000;">&#41;</span>;
	fileLoader.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">IOErrorEvent</span>.<span style="color: #004993;">IO_ERROR</span> , onFileLoadError<span style="color: #000000;">&#41;</span>;
	fileLoader.<span style="color: #004993;">addEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span>.<span style="color: #004993;">COMPLETE</span>, onFileLoadComplete<span style="color: #000000;">&#41;</span>;
	fileLoader.<span style="color: #004993;">load</span><span style="color: #000000;">&#40;</span><span style="color: #0033ff; font-weight: bold;">new</span> <span style="color: #004993;">URLRequest</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">url</span><span style="color: #000000;">&#41;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #339966; font-weight: bold;">function</span> onFileLoadComplete<span style="color: #000000;">&#40;</span>event<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Event</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
	fileLoader.<span style="color: #004993;">removeEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Event</span>.<span style="color: #004993;">COMPLETE</span>, onFileLoadComplete<span style="color: #000000;">&#41;</span>;
	fileLoader.<span style="color: #004993;">removeEventListener</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">IOErrorEvent</span>.<span style="color: #004993;">IO_ERROR</span> , onFileLoadError<span style="color: #000000;">&#41;</span>;
	yourTextArea.<span style="color: #004993;">htmlText</span> = event.<span style="color: #004993;">target</span>.<span style="color: #004993;">data</span> <span style="color: #0033ff; font-weight: bold;">as</span> <span style="color: #004993;">String</span>;
<span style="color: #000000;">&#125;</span>
&nbsp;
<span style="color: #339966; font-weight: bold;">function</span> onFileLoadError<span style="color: #000000;">&#40;</span>event<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">IOErrorEvent</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #0033ff; font-weight: bold;">void</span> <span style="color: #000000;">&#123;</span>
	<span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #990000;">&quot;Could not load text &quot;</span><span style="color: #000000;">&#41;</span>;
<span style="color: #000000;">&#125;</span></pre></div></div>

]]></content:encoded>
	</item>
	<item>
		<title>By: Bhavya Technologies</title>
		<link>http://actionscriptexamples.com/2008/11/26/using-an-embedded-font-with-the-textarea-control-in-flash-with-actionscript-30/comment-page-1/#comment-377</link>
		<dc:creator>Bhavya Technologies</dc:creator>
		<pubDate>Sun, 08 Feb 2009 17:56:25 +0000</pubDate>
		<guid isPermaLink="false">http://actionscriptexamples.com/?p=70#comment-377</guid>
		<description>Anybody can help me in how to Reading Text files using action script.</description>
		<content:encoded><![CDATA[<p>Anybody can help me in how to Reading Text files using action script.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
