<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Shared Know How &#187; actionscript3</title>
	<atom:link href="http://www.sharedknowhow.com/tag/actionscript3/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.sharedknowhow.com</link>
	<description>Howto: fix, find, use, make &#38; do it guide</description>
	<lastBuildDate>Fri, 16 Apr 2010 09:41:46 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Fixed AS3 Flash TextArea &#8211; CSS incompatibility</title>
		<link>http://www.sharedknowhow.com/2008/07/fixed-flash-textarea-css-incompatibility/</link>
		<comments>http://www.sharedknowhow.com/2008/07/fixed-flash-textarea-css-incompatibility/#comments</comments>
		<pubDate>Tue, 08 Jul 2008 16:36:25 +0000</pubDate>
		<dc:creator>wytze</dc:creator>
				<category><![CDATA[flash]]></category>
		<category><![CDATA[actionscript3]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[class extends]]></category>
		<category><![CDATA[component]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[stylesheet]]></category>
		<category><![CDATA[text format]]></category>
		<category><![CDATA[TextArea]]></category>
		<category><![CDATA[TextField]]></category>

		<guid isPermaLink="false">http://www.sharedknowhow.com/?p=13</guid>
		<description><![CDATA[When working with flash components we often run into disadvantages. As with the TextArea class (fl.controls.TextArea) we encountered that it is not possible to use a CSS on its 'textField' property. Once again we thought to have the fast way to an end with components, but nothing of the sort.:'(
Since the 'styleSheet' property returns a [...]]]></description>
			<content:encoded><![CDATA[<p>When working with flash components we often run into disadvantages. As with the TextArea class (fl.controls.TextArea) we encountered that it is not possible to use a CSS on its 'textField' property. Once again we thought to have the fast way to an end with components, but nothing of the sort.:'(</p>
<p>Since the 'styleSheet' property returns a standard TextField instance it struck us as weird that setting its 'styleSheet' property didn't work. The TextArea class was trying to set textFormat which fails after setting the stylesheet of the textfield.</p>
<p><strong>Error message:</strong></p>
<div style="margin: 0pt; padding: 0pt; white-space: pre; display: inline;">Error: Error #2009: This method cannot be used on a text field with a style sheet.</div>
<div style="margin: 0pt; padding: 0pt; white-space: pre; display: inline;">at flash.text::TextField/setTextFormat()</div>
<div style="margin: 0pt; padding: 0pt; white-space: pre; display: inline;">at fl.controls::TextArea/drawTextFormat()</div>
<div style="margin: 0pt; padding: 0pt; white-space: pre; display: inline;">at fl.controls::TextArea/draw()</div>
<div style="margin: 0pt; padding: 0pt; white-space: pre; display: inline;">at fl.core::UIComponent/callLaterDispatcher()</div>
<p>This pointed us to the 'drawTextFormat()' function in the TextArea class. After taking a look we figured out what to do.</p>
<p>The problem turned out to be that every time you add text to your textarea the class tries to add a designated, or default flash-textFormat to the textfield. Adding Flash TextFormat objects to textfields conflicts with stylesheets. Our solutions was relatively simple: a small class extends of the textArea class.</p>
<p>Click continue for the fixing source<br />
<span id="more-13"></span></p>
<pre class="actionscript">    <span style="color: #0066CC;">import</span> fl.<span style="color: #006600;">controls</span>.<span style="color: #006600;">TextArea</span>;
&nbsp;
    <span style="color: #808080; font-style: italic;">/**
    * @makes it possible to do textArea.textField.styleSheet
    * @author Tim de Jong - Dooping VOF 2008 - tim -AT- dooping.nl
    * @version 001
    */</span>
&nbsp;
    <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> doopingTextArea <span style="color: #0066CC;">extends</span> TextArea
    <span style="color: #66cc66;">&#123;</span>
        <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> doopingTextArea<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
        <span style="color: #66cc66;">&#123;</span>
            <span style="color: #0066CC;">super</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
        override protected <span style="color: #000000; font-weight: bold;">function</span> drawTextFormat<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
            <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>!<span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">textField</span>.<span style="color: #006600;">styleSheet</span><span style="color: #66cc66;">&#41;</span> <span style="color: #0066CC;">super</span>.<span style="color: #006600;">drawTextFormat</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span>
                setEmbedFont<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
                <span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>_html<span style="color: #66cc66;">&#41;</span> <span style="color: #0066CC;">textField</span>.<span style="color: #0066CC;">htmlText</span> = _savedHTML;
            <span style="color: #66cc66;">&#125;</span>
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
    <span style="color: #66cc66;">&#125;</span></pre>
<p>Then load the stylesheet by passing it to the textField object inside the textArea.</p>
<pre class="actionscript"><span style="color: #000000; font-weight: bold;">var</span> myTextArea = <span style="color: #000000; font-weight: bold;">new</span> doopingTextArea<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
myTextArea.<span style="color: #0066CC;">textField</span>.<span style="color: #006600;">styleSheet</span> = styleSheetObject;</pre>
<p>As you can see we simply check if a styleSheet exists and than decide whether or not to do the original text formatting or not. Now we're able to use CSS on TextArea's and keep styling and code neatly separated.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sharedknowhow.com/2008/07/fixed-flash-textarea-css-incompatibility/feed/</wfw:commentRss>
		<slash:comments>30</slash:comments>
		</item>
		<item>
		<title>Hiding TextArea border in AS3</title>
		<link>http://www.sharedknowhow.com/2008/07/hiding-textarea-border-in-as3/</link>
		<comments>http://www.sharedknowhow.com/2008/07/hiding-textarea-border-in-as3/#comments</comments>
		<pubDate>Tue, 08 Jul 2008 15:06:21 +0000</pubDate>
		<dc:creator>thijs</dc:creator>
				<category><![CDATA[flash]]></category>
		<category><![CDATA[actionscript3]]></category>

		<guid isPermaLink="false">http://www.sharedknowhow.com/?p=12</guid>
		<description><![CDATA[Problem:
TextArea shows a border by default
Solution:
myTextArea.setStyle("upSkin",Sprite);
Description:
Using a TextArea in actionscript 3 could come in handy as the Flash component adds in a ScrollBar by default. But it also provides some things you might not want there..
One of those things is the border, that is placed there by default.
Inspired by the solution posted here I found [...]]]></description>
			<content:encoded><![CDATA[<p><strong>Problem:</strong><br />
TextArea shows a border by default</p>
<p><strong>Solution:</strong><br />
<code>myTextArea.setStyle("upSkin",Sprite);</code></p>
<p><strong>Description:</strong><br />
Using a TextArea in actionscript 3 could come in handy as the Flash component adds in a ScrollBar by default. But it also provides some things you might not want there..</p>
<p>One of those things is the border, that is placed there by default.</p>
<p>Inspired by the solution posted <a title="Kirupa" href="http://www.kirupa.com/forum/archive/index.php/t-275633.html" target="_blank">here </a>I found that you can override the skin that is used by default in the component ("upSkin") by using:</p>
<blockquote><p><code>myTextArea.setStyle("upSkin",Sprite);</code></p></blockquote>
<p>by overriding it with a Sprite, which is empty by default, all the visual aspects are cleared... including the border!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.sharedknowhow.com/2008/07/hiding-textarea-border-in-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FlashTracer in Ubuntu (Hardy) 64-bit</title>
		<link>http://www.sharedknowhow.com/2008/04/flashtracer-in-ubuntu-64-bit/</link>
		<comments>http://www.sharedknowhow.com/2008/04/flashtracer-in-ubuntu-64-bit/#comments</comments>
		<pubDate>Fri, 25 Apr 2008 09:36:42 +0000</pubDate>
		<dc:creator>thijs</dc:creator>
				<category><![CDATA[flash]]></category>
		<category><![CDATA[actionscript3]]></category>
		<category><![CDATA[firefox]]></category>

		<guid isPermaLink="false">http://www.sharedknowhow.com/?p=8</guid>
		<description><![CDATA[There is this nifty firefox plugin that lets you see the trace messages of Flash files in your browser called FlashTracer made by Sephiroth.
To use this plugin you have to download the flash debugger player.
As you cannot use the provided flashplayer installer in the package, as it collides with the 64-bits architecture, you have to [...]]]></description>
			<content:encoded><![CDATA[<p>There is this nifty firefox plugin that lets you see the trace messages of Flash files in your browser called <a title="FlashTracer" href="http://www.sephiroth.it/firefox/flashtracer/" target="_blank">FlashTracer</a> made by Sephiroth.</p>
<p>To use this plugin you have to download the <a title="Flash debugger download" href="http://www.adobe.com/support/flashplayer/downloads.html" target="_blank">flash debugger player</a>.<br />
As you cannot use the provided flashplayer installer in the package, as it collides with the 64-bits architecture, you have to use ndiswrapper to do the job.</p>
<p>After unpacking the archive, find where the libflashplayer.so file is located (probably flash_player_9_linux_dev/plugin/debugger).<br />
Then open-up a terminal and type:</p>
<ul>
<li>nsplugginwrapper -i /full/path/to/libflashplayer.so</li>
</ul>
<p>(in my case: /home/myname/flash_player_9_linux_dev/plugin/debugger/libflashplayer.so)</p>
<p>After that, hit Alt + A (default shortcut for the flash tracer) or go to Tools -&gt; Flash Tracer to start tracing away!</p>
<ul>
<li>OS: Ubuntu 8.04 (Hardy Heron ) 64-bit</li>
<li>Using: Firefox 3 beta 5, Flash debug player 9.0.124 (also works for 9.0.115)</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.sharedknowhow.com/2008/04/flashtracer-in-ubuntu-64-bit/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
