<?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>Tim&#039;s Bandwagon &#187; Flash</title>
	<atom:link href="http://www.twisty.com/bandwagon/archives/categories/flash/feed" rel="self" type="application/rss+xml" />
	<link>http://www.twisty.com/bandwagon</link>
	<description>Hitch your wagon to a chicken</description>
	<lastBuildDate>Sat, 16 Jul 2011 13:19:59 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>ActionScript trim function</title>
		<link>http://www.twisty.com/bandwagon/archives/2007/07/23/162642</link>
		<comments>http://www.twisty.com/bandwagon/archives/2007/07/23/162642#comments</comments>
		<pubDate>Mon, 23 Jul 2007 15:26:42 +0000</pubDate>
		<dc:creator>Tim Brayshaw</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://www.twisty.com/bandwagon/archives/2007/07/23/162642</guid>
		<description><![CDATA[ActionScript 2.0 doesn&#8217;t have a trim function to strip whitespace from the start and end of a string. Here&#8217;s a simple function I wrote because I couldn&#8217;t find a satisfactory example on Google! 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 function trim&#40;str:String&#41;:String &#123; var stripCharCodes = [...]]]></description>
			<content:encoded><![CDATA[<p>ActionScript 2.0 doesn&#8217;t have a <code>trim</code> function to strip whitespace from the start and end of a string. Here&#8217;s a simple function I wrote because I couldn&#8217;t find a satisfactory example on Google!</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> trim<span style="color: #66cc66;">&#40;</span>str:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">String</span>
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">var</span> stripCharCodes = <span style="color: #66cc66;">&#123;</span>
        code_9  : <span style="color: #000000; font-weight: bold;">true</span>, <span style="color: #808080; font-style: italic;">// tab</span>
        code_10 : <span style="color: #000000; font-weight: bold;">true</span>, <span style="color: #808080; font-style: italic;">// linefeed</span>
        code_13 : <span style="color: #000000; font-weight: bold;">true</span>, <span style="color: #808080; font-style: italic;">// return</span>
        code_32 : <span style="color: #000000; font-weight: bold;">true</span>  <span style="color: #808080; font-style: italic;">// space</span>
    <span style="color: #66cc66;">&#125;</span>;
    <span style="color: #b1b100;">while</span><span style="color: #66cc66;">&#40;</span>stripCharCodes<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;code_&quot;</span> + str.<span style="color: #0066CC;">charCodeAt</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span> == <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        str = str.<span style="color: #0066CC;">substring</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span>, str.<span style="color: #0066CC;">length</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
    <span style="color: #b1b100;">while</span><span style="color: #66cc66;">&#40;</span>stripCharCodes<span style="color: #66cc66;">&#91;</span><span style="color: #ff0000;">&quot;code_&quot;</span> + str.<span style="color: #0066CC;">charCodeAt</span><span style="color: #66cc66;">&#40;</span>str.<span style="color: #0066CC;">length</span> - <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span> == <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
        str = str.<span style="color: #0066CC;">substring</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, str.<span style="color: #0066CC;">length</span> - <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;
    <span style="color: #66cc66;">&#125;</span>
    <span style="color: #b1b100;">return</span> str;
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>


<p>The horrible <code>"code_"</code> prefix hack is there because I don&#8217;t think there&#8217;s a native way to search an array or object for a key or value in ActionScript.</p>

<p><ins>Update:</ins> just found this function at: <a href="http://www.frogstyle.ch/p.cfm?s=18">frogstyle.ch</a>. This one does a similar thing, but strips more characters.</p>


<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">function</span> trim<span style="color: #66cc66;">&#40;</span>str:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">String</span>
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i = <span style="color: #cc66cc;">0</span>; str.<span style="color: #0066CC;">charCodeAt</span><span style="color: #66cc66;">&#40;</span>i<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&lt;</span> <span style="color: #cc66cc;">33</span>; i++<span style="color: #66cc66;">&#41;</span>;
    <span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> j = str.<span style="color: #006600;">length</span>-<span style="color: #cc66cc;">1</span>; str.<span style="color: #0066CC;">charCodeAt</span><span style="color: #66cc66;">&#40;</span>j<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&lt;</span> <span style="color: #cc66cc;">33</span>; j--<span style="color: #66cc66;">&#41;</span>;
    <span style="color: #b1b100;">return</span> str.<span style="color: #0066CC;">substring</span><span style="color: #66cc66;">&#40;</span>i, j+<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>


<p><ins>Update:</ins> <a href="http://code.google.com/p/as3corelib/">as3corelib</a> has a static trim method in <code>com.adobe.utils.StringUtil</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twisty.com/bandwagon/archives/2007/07/23/162642/feed</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
		<item>
		<title>Flash Moveable Type Comment Interface</title>
		<link>http://www.twisty.com/bandwagon/archives/2003/12/12/000844</link>
		<comments>http://www.twisty.com/bandwagon/archives/2003/12/12/000844#comments</comments>
		<pubDate>Thu, 11 Dec 2003 23:08:44 +0000</pubDate>
		<dc:creator>Tim Brayshaw</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Personal Publishing]]></category>

		<guid isPermaLink="false">http://trunk.www.twisty.coronationroad/bandwagon/?p=179</guid>
		<description><![CDATA[It&#8217;s still a little wonky, and the design is a bit small (for performance reasons, mostly) Nigel Pegg has a good demo of a Flash interface for (presumably) viewing/posting Movable Type comments: MT Comment FlashLet.]]></description>
			<content:encoded><![CDATA[<blockquote>
<p>It&#8217;s still a little wonky, and the design is a bit small (for performance reasons, mostly)</p>
</blockquote>

<p><a href="http://www.markme.com/nigel/">Nigel Pegg</a> has a good demo of a Flash interface for (presumably) viewing/posting Movable Type comments: <a href="http://www.markme.com/nigel/archives/003979.cfm">MT Comment FlashLet</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twisty.com/bandwagon/archives/2003/12/12/000844/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Grrr</title>
		<link>http://www.twisty.com/bandwagon/archives/2003/11/11/150025</link>
		<comments>http://www.twisty.com/bandwagon/archives/2003/11/11/150025#comments</comments>
		<pubDate>Tue, 11 Nov 2003 14:00:25 +0000</pubDate>
		<dc:creator>Tim Brayshaw</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://trunk.www.twisty.coronationroad/bandwagon/?p=177</guid>
		<description><![CDATA[Just installed the new Flash MX Professional 2004 Update. Stability was the primary focus of this update Now, Flash won&#8217;t launch . Must. Resist. Urge. To. Upgrade. Update: Fixed it!]]></description>
			<content:encoded><![CDATA[<p>Just installed the new <a href="http://www.macromedia.com/support/documentation/en/flash/mx2004/releasenotes.html#Update">Flash MX Professional 2004 Update</a>.</p>

<blockquote><p>Stability was the primary focus of this update</p></blockquote>

<p>Now, Flash won&#8217;t launch <code> <img src='http://www.twisty.com/bandwagon/wordpress/wp-includes/images/smilies/icon_sad.gif' alt=':-(' class='wp-smiley' /> </code>. <em>Must. Resist. Urge. To. Upgrade.</em></p>

<p><ins><p>Update: <a href="http://chattyfig.figleaf.com/cgi-bin/ezmlm-cgi?1:mss:94896" title="Doh!">Fixed it</a>!</p></ins></p>
]]></content:encoded>
			<wfw:commentRss>http://www.twisty.com/bandwagon/archives/2003/11/11/150025/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>World Time Central App</title>
		<link>http://www.twisty.com/bandwagon/archives/2003/10/23/180029</link>
		<comments>http://www.twisty.com/bandwagon/archives/2003/10/23/180029#comments</comments>
		<pubDate>Thu, 23 Oct 2003 17:00:29 +0000</pubDate>
		<dc:creator>Tim Brayshaw</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://trunk.www.twisty.coronationroad/bandwagon/?p=171</guid>
		<description><![CDATA[I&#8217;ve been learning about developing applications for Macromedia Central this week, here&#8217;s my first effort! At the moment it&#8217;s a good candidate for perversion tracker, but might evolve into something vaguely useful if I get a bit more time to spend on it]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been learning about developing applications for <a href="http://www.macromedia.com/software/central/">Macromedia Central</a> this week, here&#8217;s <a href="http://central.twisty.com/worldtime/">my first effort</a>!</p>

<p>At the moment it&#8217;s a good candidate for <a href="http://perversiontracker.com/" title="Apparently Useless Software">perversion tracker</a>, but might evolve into something vaguely useful if I get a bit more time to spend on it <code> <img src='http://www.twisty.com/bandwagon/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.twisty.com/bandwagon/archives/2003/10/23/180029/feed</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Macromedia Central RSS Reader</title>
		<link>http://www.twisty.com/bandwagon/archives/2003/10/21/192721</link>
		<comments>http://www.twisty.com/bandwagon/archives/2003/10/21/192721#comments</comments>
		<pubDate>Tue, 21 Oct 2003 18:27:21 +0000</pubDate>
		<dc:creator>Tim Brayshaw</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://trunk.www.twisty.coronationroad/bandwagon/?p=170</guid>
		<description><![CDATA[Macromedia just released the Central Public Developer Beta. News Browser is the first Macromedia Central application I&#8217;ve stumbled across in the wild. From the developer&#8217;s weblog: [...] a little central app that lets you browse RSS/blog feeds. It&#8217;s pretty functional, but lacks some obvious features (like&#8230;removing a bookmark that you&#8217;ve added). I&#8217;ve got a feeling [...]]]></description>
			<content:encoded><![CDATA[<p>Macromedia just released the <a href="http://www.macromedia.com/devnet/central/sdk/">Central Public Developer Beta</a>. <a href="http://clearsoftware.net/central/newsreader/">News Browser</a> is the first <a href="http://www.macromedia.com/software/central/">Macromedia Central</a> application I&#8217;ve stumbled across in the wild. <a href="http://clearsoftware.net/blog/2003_10_19_archive.html#106674264841896256">From the developer&#8217;s weblog</a>:</p>

<blockquote>
<p>[...] a little central app that lets you browse RSS/blog feeds. It&#8217;s pretty functional, but lacks some obvious features (like&#8230;removing a bookmark that you&#8217;ve added).</p>
</blockquote>

<p>I&#8217;ve got a feeling there&#8217;ll be a little whirlwind of Central apps appearing over the next few weeks.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twisty.com/bandwagon/archives/2003/10/21/192721/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Take it Easy â€“ Easing Functions For Flash</title>
		<link>http://www.twisty.com/bandwagon/archives/2003/09/26/190904</link>
		<comments>http://www.twisty.com/bandwagon/archives/2003/09/26/190904#comments</comments>
		<pubDate>Fri, 26 Sep 2003 18:09:04 +0000</pubDate>
		<dc:creator>Tim Brayshaw</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://trunk.www.twisty.coronationroad/bandwagon/?p=165</guid>
		<description><![CDATA[Part of my job is making Flash movies that make things zoom around the screen. This is good because animation generates interest, creates pizzaz, and is just plain neat. So I might as well do it in a pleasing manner. I&#8217;m embarrassed to admit how long it took my pea brain to work-out a sine [...]]]></description>
			<content:encoded><![CDATA[<p>Part of my job is making Flash movies that make things zoom around the screen. This is good because animation generates interest, creates pizzaz, and is just plain neat. So I might as well do it in a pleasing manner.</p>

<p>I&#8217;m embarrassed to admit how long it took my pea brain to work-out a sine easing function last week, after finishing it I sat down with a nice cup of tea and began to trawl through the 1000 or so messages that had accumulated in my <a href="http://chattyfig.figleaf.com/">FlashCoders</a> mailbox. Found these:</p>

<ul>
    <li>Robert Penner&#8217;s <a href="http://www.robertpenner.com/easing/">Easing Equations</a> for Flash (has bounce function). <a href="http://www.fluid.com/experiments/timecode/mx_time.html">This geeky doodad</a> is a good demo that uses Robert&#8217;s easing functions.</li>
    <li>TimothÃ©e Groleau&#8217;s <a href="http://timotheegroleau.com/Flash/experiments/easing_function_generator.htm">easing function generator</a>, <em>top notch</em>.</li>
</ul>

<p>Both have ActionScript 1.0 and ActionScript 2.0 source.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twisty.com/bandwagon/archives/2003/09/26/190904/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>My Pesky Flash Font Problem Fixed in Flash MX 2004</title>
		<link>http://www.twisty.com/bandwagon/archives/2003/09/11/002043</link>
		<comments>http://www.twisty.com/bandwagon/archives/2003/09/11/002043#comments</comments>
		<pubDate>Wed, 10 Sep 2003 23:20:43 +0000</pubDate>
		<dc:creator>Tim Brayshaw</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Mac]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Typography]]></category>

		<guid isPermaLink="false">http://trunk.www.twisty.coronationroad/bandwagon/?p=163</guid>
		<description><![CDATA[The options for choosing which characters of fonts to embed have been expanded in the new Flash MX 2004 (Flash 7). The font embedding problem I lost hair and hours over last month seems to be fixed with this new release. I&#8217;m happier now I can author on MacOS X and &#8220;get typography right&#8221;.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.twisty.com/bandwagon/images/character_ranges.png" alt="Flash MX 2004 Charater Options Dialog Box"><img alt="character_ranges.png" src="http://www.twisty.com/bandwagon/images/character_ranges-thumb.png" width="213" height="242" border="0" /></a></p>

<p>The options for choosing which characters of fonts to embed have been expanded in the new Flash MX 2004 (Flash 7). The <a href="http://www.twisty.com/bandwagon/archives/2003/08/07/120511">font embedding problem</a> I lost hair and hours over last month seems to be fixed with this new release. I&#8217;m happier now I can author on MacOS X and &#8220;get typography right&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twisty.com/bandwagon/archives/2003/09/11/002043/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>More on Flash MX 2004</title>
		<link>http://www.twisty.com/bandwagon/archives/2003/09/01/071928</link>
		<comments>http://www.twisty.com/bandwagon/archives/2003/09/01/071928#comments</comments>
		<pubDate>Mon, 01 Sep 2003 06:19:28 +0000</pubDate>
		<dc:creator>Tim Brayshaw</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://trunk.www.twisty.coronationroad/bandwagon/?p=159</guid>
		<description><![CDATA[Eric van Feggelen Jr. has a Flash MX Review: Two weeks ago I was suddenly asked to beta test Flash MX Professional 2004, which now gives me the permission to post screenshots and informations about it.]]></description>
			<content:encoded><![CDATA[<p>Eric van Feggelen Jr. has a <a href="http://downloads.junioronline.us/flash_mx_review.html">Flash MX Review</a>:</p>

<blockquote>
<p>Two weeks ago I was suddenly asked to beta test Flash MX Professional 2004, which now gives me the permission to post screenshots and informations about it. </p>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.twisty.com/bandwagon/archives/2003/09/01/071928/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>A first look at ActionScript 2</title>
		<link>http://www.twisty.com/bandwagon/archives/2003/08/26/233929</link>
		<comments>http://www.twisty.com/bandwagon/archives/2003/08/26/233929#comments</comments>
		<pubDate>Tue, 26 Aug 2003 22:39:29 +0000</pubDate>
		<dc:creator>Tim Brayshaw</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://trunk.www.twisty.coronationroad/bandwagon/?p=158</guid>
		<description><![CDATA[Macromedia announced Flash MX 2004 today (due for release sometime in September 2003, I&#8217;m not sure what the MX bit stands for). ActionScript has been bumped-up a major revision to version 2. Here&#8217;s what I could find on Macromedia&#8217;s site about ActionScript 2.0. From the New Features page: Take advantage of ActionScript 2.0&#8217;s more robust [...]]]></description>
			<content:encoded><![CDATA[<p>Macromedia <a href="http://www.macromedia.com/macromedia/proom/pr/2003/flash_mx_2004.html">announced Flash MX 2004</a> today (due for release sometime in September 2003, I&#8217;m not sure <a href="http://www.actionscript.com/archives/00000362.html">what the MX bit stands for</a>).</p>

<p>ActionScript has been bumped-up a major revision to version 2. Here&#8217;s what I could find on Macromedia&#8217;s site about ActionScript 2.0. From the <a href="http://www.macromedia.com/software/flash/productinfo/newfeatures/#09">New Features</a> page:</p>

<blockquote><p>Take advantage of ActionScript 2.0&#8217;s more robust programming model and object-oriented programming support, which makes it more familiar to experienced Java programmers.</p></blockquote>

<p>And from a more detailed <a href="http://www.macromedia.com/software/flash/productinfo/features/static_tour/development/index.html#04">Feature Tour</a>:</p>

<blockquote><p>With object-oriented programming support and a more robust, European Computer Manufacturers Association (ECMA) standards-compliant programming model, ActionScript 2.0 is more familiar to experienced Java programmers. Compile ActionScript 2.0 code to ActionScript 1.0 for playback on earlier versions of the Macromedia Flash Player.</p></blockquote>

<p>I think it&#8217;s a bit light on details <code> <img src='http://www.twisty.com/bandwagon/wordpress/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </code>. Luckily, Colin Mook has posted  <a href="http://www.moock.org/blog/archives/000044.html" title="taste of ActionScript 2.0">an interesting preview of a sample ActionScript 2.0 class</a>:</p>

<blockquote><pre class="listing"><code>/**
 * A sample ActionScript 2.0 class.
 */

class Box {

  // Box dimensions.
  private var width:Number;
  private var height:Number;

  // Movie clip that will contain visual 
  // representation of the box.
  private var container_mc:MovieClip;

  /**
   * Constructor.
   */
  public function Box (w:Number, h:Number, 
                       x:Number, y:Number, 
                       target:MovieClip, depth:Number) {

    // Create the container clip that will hold Box visuals.
    container_mc = target.createEmptyMovieClip("boxcontainer" + depth, depth);

    // Initialize size.
    setWidth(w);
    setHeight(h);    

    // Initialize position.
    setX(x);
    setY(y);
  }

  /**
   * Accessor to retrieve width.
   */
  public function getWidth ():Number {
    return width;
  }

  /**
   * Accessor to assign width. This version both assigns the new width property
   * value and redraws the box based on the new width.
   */
  public function setWidth (w:Number):Void {
    width = w;
    draw();
  }

  /**
   * Accessor to retrieve height.
   */
  public function getHeight ():Number {
    return height;
  }

  /**
   * Accessor to assign height. This version both assigns the new height property
   * value and redraws the box based on the new height.
   */
  public function setHeight (h:Number):Void {
    height = h;
    draw();
  }

  /**
   * Accessor to retrieve x. For convenience, the x and y coordinates 
   * are stored directly on the container movie clip. If numeric accuracy 
   * were a concern, we'd store x as a Box property separately so
   * that it wouldn't be rounded by the MovieClip class.
   */
  public function getX ():Number {
    return container_mc._x;
  }

  /**
   * Accessor to assign x.
   */
  public function setX (x:Number):Void {
    container_mc._x = x;
  }

  /**
   * Accessor to retrieve y.
   */
  public function getY ():Number {
    return container_mc._y;
  }
 
  /**
   * Accessor to assign y.
   */
  public function setY (y:Number):Void {
    container_mc._y = y;
  }

  /**
   * Displays the Box instance on screen. Uses the MovieClip drawing methods to
   * draw lines in container_mc. For more information, see
   * ActionScript for Flash MX: The Definitive Guide.
   */
  public function draw ():Void {
    // Clear the previous box rendering.
    container_mc.clear();
    // Use a 1 point black line.
    container_mc.lineStyle(1, 0x000000);
    // Position the drawing pen.
    container_mc.moveTo(0, 0);
    // Start a white fill.
    container_mc.beginFill(0xFFFFFF, 100);
    // Draw the border of the box.
    container_mc.lineTo(width, 0);
    container_mc.lineTo(width, height);
    container_mc.lineTo(0, height);
    container_mc.lineTo(0, 0);
    // Formally stop filling the shape.
    container_mc.endFill();
  }
}</code></pre></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.twisty.com/bandwagon/archives/2003/08/26/233929/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Incomplete character set when embedding fonts in Flash MX on MacOS</title>
		<link>http://www.twisty.com/bandwagon/archives/2003/08/07/120511</link>
		<comments>http://www.twisty.com/bandwagon/archives/2003/08/07/120511#comments</comments>
		<pubDate>Thu, 07 Aug 2003 11:05:11 +0000</pubDate>
		<dc:creator>Tim Brayshaw</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://trunk.www.twisty.coronationroad/bandwagon/?p=154</guid>
		<description><![CDATA[I&#8217;m having problems displaying dynamic text in Flash MX. When I use an embedded (non device) font and publish the movie on a Macintosh, I lose some useful punctuation characters (curly quotes, en-dashes). If I publish the same file on Windows, it works okay. I&#8217;m guessing Flash on Macintosh isn&#8217;t embedding all the font outlines. [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m having problems displaying dynamic text in Flash MX.  When I use an embedded (non device) font and publish the movie on a Macintosh, I lose some useful punctuation characters (curly quotes, en-dashes). If I publish the same file on Windows, it works okay. I&#8217;m guessing Flash on Macintosh isn&#8217;t embedding all the font outlines.</p>

<p>I&#8217;ve made a quick <a href="http://www.twisty.com/misc/tests/flash/20030805_text.fla">test flash source file</a>. It&#8217;s a one-frame movie with a dynamic text field (with font embedded) which displays the variable &#8220;foo&#8221;, there&#8217;s a simple frame script:</p>

<pre class="listing"><code>foo = "this is an en dash: \u2013";
stop();</code></pre>

<p>The <code>\u2013</code> is a <a href="http://www.macromedia.com/support/flash/languages/unicode_in_flmx/unicode_in_flmx08.html">unicode escape</a> for the en-dash character. The en-dash is available in the <a href="ftp://ftp.unicode.org/Public/MAPPINGS/VENDORS/APPLE/ROMAN.TXT">MacRoman codepage</a> of my <acronym title="Operating System">OS</acronym> and is definitely available in the font (Verdana) I&#8217;m embedding.</p>

<p>I&#8217;ve been <a href="http://www.wordspy.com/words/google.asp" title="The verb 'to Google'">Googling</a> to no avail and am now officially stumped. Someone posted <a href="http://chattyfig.figleaf.com/ezmlm/ezmlm-cgi?1:mss:52057" title="Embed fonts: incomplete character set and other incompatibilities result">a similar problem</a> to the <a href="http://chattyfig.figleaf.com/">FlashCoders mailing list</a> last October, which I find oddly reassuring.</p>

<p>It&#8217;s all massively frustrating because I&#8217;m now faced with the prospect of authoring on Windows for the duration of this project unless I can solve what&#8217;s going on! So now I&#8217;m soliciting for thoughts, advice, sympathy, tips, tricks, workarounds or guidance. Post them in my comments. Cheers!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.twisty.com/bandwagon/archives/2003/08/07/120511/feed</wfw:commentRss>
		<slash:comments>18</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using disk (enhanced)

Served from: www.twisty.com @ 2012-02-07 12:47:53 -->
