<?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>Tiffany B. Brown &#187; ActionScript, Flash &amp; Flex</title>
	<atom:link href="http://tiffanybbrown.com/category/actionscript-flash-flex/feed/" rel="self" type="application/rss+xml" />
	<link>http://tiffanybbrown.com</link>
	<description>A web log about web development and internet culture with frequent detours into other stuff.</description>
	<lastBuildDate>Fri, 10 Feb 2012 23:35:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Recommended: &#8220;Dart; or Why JavaScript has already won&#8221;</title>
		<link>http://tiffanybbrown.com/2011/10/12/recommended-dart-or-why-javascript-has-already-won/</link>
		<comments>http://tiffanybbrown.com/2011/10/12/recommended-dart-or-why-javascript-has-already-won/#comments</comments>
		<pubDate>Wed, 12 Oct 2011 20:32:15 +0000</pubDate>
		<dc:creator>tiffany</dc:creator>
				<category><![CDATA[ActionScript, Flash & Flex]]></category>
		<category><![CDATA[JavaScript/ECMAScript]]></category>
		<category><![CDATA[dart]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[google chrome]]></category>

		<guid isPermaLink="false">http://tiffanybbrown.com/?p=6410</guid>
		<description><![CDATA[Peter-Paul Koch writes: Google wants to create a new language for the web. That idea will have to be accepted by all other browser vendors. Nowadays that doesn’t just mean Microsoft, Mozilla, Apple, and Opera, but also Nokia, Samsung, RIM, and a host of minor ones. Why would they do as Google tells them? That&#8217;s [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.quirksmode.org/blog/archives/2011/10/dart_or_why_jav.html">Peter-Paul Koch writes</a>:<br />
<blockquote>Google wants to create a new language for the web. That idea will have to be accepted by all other browser vendors. Nowadays that doesn’t just mean Microsoft, Mozilla, Apple, and Opera, but also Nokia, Samsung, RIM, and a host of minor ones. Why would they do as Google tells them?</p></blockquote>
<p>That&#8217;s his reaction to Google&#8217;s <a href="http://www.dartlang.org/">DART</a> project. Also check out 2ality&#8217;s post <a href="http://www.2ality.com/2011/10/dart-launch.html">which gives an overview of DART</a>.</p>
<p>I pretty much ageree with PPK here. I am sure DART is awesome. I know a lot of smart folks worked on it. But I&#8217;m not convinced the web needs <em>another</em> front-end language, particularly one that is pushed by a single company. Even Adobe&#8217;s cross-platform, ECMAScript 4-compliant ActionScript is rapidly losing ground to the open web. </p>
]]></content:encoded>
			<wfw:commentRss>http://tiffanybbrown.com/2011/10/12/recommended-dart-or-why-javascript-has-already-won/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>HTML5 for AS3 Developers: cross-domain.xml and Cross-Origin Resource Sharing</title>
		<link>http://tiffanybbrown.com/2011/10/10/html5-for-as3-developers-cross-domain-xml-and-cross-origin-resource-sharing/</link>
		<comments>http://tiffanybbrown.com/2011/10/10/html5-for-as3-developers-cross-domain-xml-and-cross-origin-resource-sharing/#comments</comments>
		<pubDate>Mon, 10 Oct 2011 10:00:47 +0000</pubDate>
		<dc:creator>tiffany</dc:creator>
				<category><![CDATA[ActionScript, Flash & Flex]]></category>
		<category><![CDATA[Browsers]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[Server management]]></category>
		<category><![CDATA[cors]]></category>
		<category><![CDATA[html5foras3devs]]></category>

		<guid isPermaLink="false">http://tiffanybbrown.com/?p=6226</guid>
		<description><![CDATA[This is the second post in an occasional series designed to bridge the gap between ActionScript 3.0 and emerging front-end technologies. Flash, like JavaScript, more-or-less adheres to a same-origin policy by default. Under a same-origin policy, requests for data must come from the same scheme, hostname, and port. If http://foo.example tries to request data from [...]]]></description>
			<content:encoded><![CDATA[<p class="editors-note">This is the <a href="http://tiffanybbrown.com/tag/html5foras3devs">second post</a> in an occasional series designed to bridge the gap between ActionScript 3.0 and emerging front-end technologies.</p>
<p>Flash, like JavaScript, more-or-less adheres to a <a href="http://www.w3.org/Security/wiki/Same_Origin_Policy">same-origin</a> policy by default. Under a same-origin policy, requests for data must come from the same scheme, hostname, and port. If <code>http://foo.example</code> tries to request data from <code>http://bar.example</code>, the request will usually fail.</p>
<p>Same-origin policies are designed to prevent the unauthorized leakage of data to a third-party server. Without it, a script or SWF hosted on <code>http://mightbeevil.foo</code> could read data hosted on <code>http://goodsite.foo</code> and send it to <code>http://muhahahaevilsite.foo</code>. This kind of cross-domain activity could be used to exploit cookie and authentication data. It&#8217;s clearly a bad thing.</p>
<p>Recent browsers have safeguarded against these kinds of cross-site scripting exploits by <a href="https://developer.mozilla.org/En/Same_origin_policy_for_JavaScript">preventing</a> JavaScript from making cross-origin requests. <code>XMLHttpRequest</code>, for example, will throw a security exception if you attempt a cross-origin request.</p>
<p>Flash, meanwhile has long supported a means for enabling cross-origin requests: the <a href="https://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html">policy file</a>. The policy file is a way of white-listing requests for data or credentials from specific origins. It lives on the server from which you are requesting data, and gives the Flash player a &#8220;yay&#8221; or &#8220;nay&#8221; when asked whether the request from a specific origin should be allowed to complete.</p>
<p>Cross-origin restrictions, though necessary, are also quite limiting.  You can&#8217;t (or <em>couldn&#8217;t</em>), for example, request data for a mash-up using <code>XMLHttpRequest</code>. Though there are workarounds &#8212; using dynamic script insertion, or using the <a href="https://developer.mozilla.org/en/DOM/document.domain"><code>document.domain</code></a> &#8212; those workarounds also leave the DOM vulnerable to cross-site scripting. </p>
<p>To to mitigate the dangers of cross-site scripting while still enabling it, the W3C is developing the <a href="http://www.w3.org/TR/cors/">Cross-Origin Resource Sharing</a> (CORS) specification. It functions similarly to Flash&#8217;s cross-domain policy file, but uses HTTP headers instead of an XML configuration file. </p>
<p>CORS request headers are automatically generated by conforming browsers when a script attempts a cross-domain request. Response headers must be set in the server&#8217;s configuration file, or dynamically per URL using a server-side language.</p>
<p>Let&#8217;s compare a sample cross-domain.xml file to how we&#8217;d achieve the same thing using CORS.</p>
<h2>Cross-origin requests from Flash</h2>
<p>To use the domains from our example above, if <code>http://mightbeevil.foo</code> made a request to data hosted on <code>http://goodsite.foo</code>, <code>http://goodsite.foo</code> would need to permit the request by including mightbeevil.foo it in its policy file. For example:</p>
<pre>
&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;!DOCTYPE cross-domain-policy SYSTEM &quot;http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd&quot;&gt;
&lt;cross-domain-policy&gt;
    &lt;allow-access-from domain=&quot;mightbeevil.foo&quot;/&gt;
&lt;/cross-domain-policy&gt;</pre>
<p>This file must be stored in the web root of <code>http://goodsite.foo</code>. It explicitly permits mightbeevil.foo &#8212; and permits only mightbeevil.foo &#8212; to make requests for its data (from within a Flash movie). </p>
<h2>Cross-origin requests from the DOM</h2>
<p>To reuse our example from above, let&#8217;s use <a href="http://www.w3.org/TR/XMLHttpRequest2/"><code>XMLHttpRequest</code></a> to make a request from <code>http://mightbeevil.foo</code> to <code>http://goodsite.foo</code>.</p>
<pre>
var xhr, onLoadHandler 

onLoadHandler = function(event){
     alert('It is done!');
}

xhr = new XMLHttpRequest();
xhr.open('GET','http://goodsite.foo/data.json');
xhr.onload = onLoadHandler;
xhr.send(null);
</pre>
<p>It looks just like a regular XHR request, except for the fact that we&#8217;re requesting data from another origin. Let&#8217;s take a look at our headers.</p>
<pre>Accept:text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Charset:ISO-8859-1,utf-8;q=0.7,*;q=0.7
Accept-Encoding:gzip, deflate
Accept-Language:en-us,en;q=0.5
Connection:keep-alive
Host:goodsite.foo
Origin:http://mightbeevil.foo
Referer:http://mightbeevil.foo/make_cross_domain_request/
User-Agent: Awesome/9.0 (Macintosh; Intel Mac OS X 10.6; rv:7.0) FantasticEngine/8889876 Awesome Browser/9.0</pre>
<p>Notice that our headers include <code>Origin:http://mightbeevil.foo</code>. </p>
<p>Goodsite.foo responds with the following headers.</p>
<pre>Access-Control-Allow-Origin:http://mightbeevil.foo
Connection:Keep-Alive
Content-Length:1349
Content-Type:application/json
Date:Mon, 26 Sep 2011 04:44:50 GMT
Keep-Alive:timeout=5, max=100
Server:Apache/2.2.20</pre>
<p>Here we see that an <code>Access-Control-Allow-Origin</code> response header is returned by the server. Like <code>allow-access-from</code>, it indicates which domain(s) are allowed to make requests. Here, we want to know whether <code>mightbeevil.foo</code> is allowed to request data. It is, so the request will be completed. </p>
<p>Acceptable values for <code>Access-Control-Allow-Origin</code> include an origin (scheme + host + port), a comma-separated list of origins&dagger;, or a wildcard (*). As with cross-domain.xml, if the value of <code>Access-Control-Allow-Origin</code> had instead been <code>http://notevil.foo</code>, the request would have failed. Using a wildcard allows requests from <em>any</em> domain.</p>
<p>Of course, both specifications are more complex than what I have covered here. These examples illustrate how to enable a basic cross-origin request. It is also possible with both CORS and Flash to permit or exclude custom headers. And in the case of CORS, it is possible to use methods such as <code>PUT</code> or <code>DELETE</code> if the user agent supports it.</p>
<table class="browsersupport">
<caption>Browser support for Cross-Origin Resource Sharing as of 10 January 2012</caption>
<tr>
<th>Opera</th>
<th>Opera Mini</th>
<th>Opera Mobile</th>
<th>IE</th>
<th>Firefox</th>
<th>Chrome</th>
<th>Safari</th>
<th>iOS Safari</th>
<th>Android WebKit</th>
</tr>
<tr>
<td class="yes center">11.60+</td>
<td class="no center mobile">no</td>
<td class="no center mobile">no</td>
<td class="yes center">8.0+</td>
<td class="yes center">4.0+</td>
<td class="yes center">5.0+</td>
<td class="yes center">4.0+</td>
<td class="yes center mobile">3.2+</td>
<td class="yes center mobile">2.1+</td>
</tr>
</table>
<h2>Learn more</h2>
<ul>
<li><a href="https://www.adobe.com/devnet/articles/crossdomain_policy_file_spec.html">Flash cross-domain policy file specification</a></li>
<li><a href="http://www.w3.org/TR/cors/">Cross-origin Resource Sharing</a></li>
<li><a href="http://www.w3.org/TR/XMLHttpRequest2/">XMLHttpRequest Level 2</a></li>
</ul>
<p class="footnote">&dagger; Most browsers do not yet support multiple origin values. The specification is also a working draft, and subject to change.</p>
]]></content:encoded>
			<wfw:commentRss>http://tiffanybbrown.com/2011/10/10/html5-for-as3-developers-cross-domain-xml-and-cross-origin-resource-sharing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introducing HTML5 for AS3 Developers</title>
		<link>http://tiffanybbrown.com/2011/10/03/introducing-html5-for-as3-developers/</link>
		<comments>http://tiffanybbrown.com/2011/10/03/introducing-html5-for-as3-developers/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 09:00:39 +0000</pubDate>
		<dc:creator>tiffany</dc:creator>
				<category><![CDATA[ActionScript, Flash & Flex]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[DOM]]></category>
		<category><![CDATA[JavaScript/ECMAScript]]></category>
		<category><![CDATA[html5foras3devs]]></category>

		<guid isPermaLink="false">http://tiffanybbrown.com/?p=6089</guid>
		<description><![CDATA[During my three years at Armchair, I worked on a few ActionScript 3.0 projects. I knew some ActionScript 2.0 when I started, but ActionScript 3.0 was new for me. It is object-oriented and requires event-driven thinking &#8212; two skills frankly, that I am still developing. They&#8217;re also two skills you should be developing, as they&#8217;re [...]]]></description>
			<content:encoded><![CDATA[<p>During my three years at <a href="http://armchairmedia.com/">Armchair</a>, I worked on a few <a href="http://www.adobe.com/devnet/actionscript.html">ActionScript 3.0</a> projects. I knew some ActionScript 2.0 when I started, but ActionScript 3.0 was new for me. It is object-oriented and requires event-driven thinking &#8212; two skills frankly, that I am still developing. They&#8217;re also two skills <em>you</em> should be developing, as they&#8217;re the present and future of web development.</p>
<p>Now I work almost exclusively with JavaScript, HTML5, CSS, and occasionally SVG. I haven&#8217;t touched ActionScript in any serious way for close to a year. But working on those projects was &#8220;training&#8221; of sorts. And it served me well.</p>
<p>It&#8217;s an open secret that HTML5<a href="#n20111003">*</a> evolved to kill Flash. Many of the features of HTML5 and technologies such as <a href="http://www.w3.org/TR/XMLHttpRequest2/">XMLHttpRequest, Level 2</a> and <a href="http://www.w3.org/TR/cors/">Cross-origin Resource Sharing</a> have parallels in ActionScript 3.0. The front-end stack, in other words, is gunning for Flash. And it will happen sooner rather than later.</p>
<p>ActionScript developers may cringe at that news, but I don&#8217;t think they should. I <strong>strongly</strong> believe that AS3.0 developers are better positioned than the rest of us to be leaders in front-end stack development. Problems that most JavaScript developers are learning how to think about &#8212; reading and manipulating bitmap data, doing object hit testing, making cross-domain requests, &#8212; ActionScript developers have been doing <em>for years</em>. </p>
<p>Of course, this is all provided ActionScript developers are willing to make the switch. </p>
<p>To that end, I&#8217;m starting an ongoing (but occasional &#8230; perhaps <em>very</em> occasional) series of blog posts detailing some of the commonalities and differences between ActionScript 3.0 and the HTML5 Stack. I am calling it <q>HTML5 for ActionScript 3.0 Devs,</q> even though it isn&#8217;t <em>just</em> about HTML5.</p>
<p>Sometimes they&#8217;ll be deep dives. Other times they&#8217;ll be shallow ones. It is quite possible that I will misunderstand aspects of both (that&#8217;s what comments are for). My goal here is less to be comprehensive than it is to encourage developers to learn more about these topics.</p>
<p class="footnote" id="n20111003">*Of course, I am using &#8220;HTML5&#8221; as a short hand for HTML5, CSS3, JavaScript, the Document Object Model, Scalable Vector Graphics, and several other web technologies and specifications.</p>
]]></content:encoded>
			<wfw:commentRss>http://tiffanybbrown.com/2011/10/03/introducing-html5-for-as3-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why ActionScript 3.0 should be your first programming language</title>
		<link>http://tiffanybbrown.com/2010/08/23/why-actionscript-3-0-should-be-your-first-programming-language/</link>
		<comments>http://tiffanybbrown.com/2010/08/23/why-actionscript-3-0-should-be-your-first-programming-language/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 15:00:58 +0000</pubDate>
		<dc:creator>tiffany</dc:creator>
				<category><![CDATA[ActionScript, Flash & Flex]]></category>
		<category><![CDATA[Productivity & Career]]></category>
		<category><![CDATA[Web Development & Programming]]></category>

		<guid isPermaLink="false">http://tiffanybbrown.com/?p=4512</guid>
		<description><![CDATA[Last week, a Twitter friend asked about learning programming and where to start. I suggested ActionScript 3.0, but 140 characters isn&#8217;t enough to explain why. That&#8217;s what blog posts are for. ActionScript sounds like a weird choice, right? It&#8217;s client-side, not server-side. You can&#8217;t connect to a database or create files on the fly without [...]]]></description>
			<content:encoded><![CDATA[<p>Last week, a Twitter friend asked about learning programming and where to start. I <a href="http://twitter.com/webinista/status/21436361575">suggested ActionScript 3.0</a>, but 140 characters isn&#8217;t enough to explain why. That&#8217;s what blog posts are for.</p>
<p>ActionScript sounds like a weird choice, right? It&#8217;s client-side, not server-side. You can&#8217;t connect to a database or create files on the fly without some sort of <a href="http://en.wikipedia.org/wiki/Middleware">middleware</a>. And why would I suggest that budding programmers learn a dying language? HTML5, CSS3, and JavaScript are going to (eventually) take over the world, right? </p>
<p>That stuff is true, or will be in the near term. Yet I still think <a href="http://help.adobe.com/en_US/Flash/10.0_Welcome/WS091A3800-D889-4425-B647-C44097B73F34.html">ActionScript 3.0</a> is worth learning, and that it&#8217;s a great starter language for budding developers. Here&#8217;s why.</p>
<ul>
<li><b>ActionScript 3.0 is syntactically similar to other C-style languages.</b> Curly braces rule! Semi-colons are awesome! Getting comfortable with how AS3 looks and works will make <a href="http://php.net/">PHP</a> or <a href="http://www.oracle.com/technetwork/java/">Java</a> less intimidating.</li>
<li><b>ActionScript 3.0 is <a href="http://whatis.techtarget.com/definition/0,,sid9_gci213058,00.html">strongly-typed</a></b>. Strongly- (or strictly-) typed languages enforce rules for variable behavior. It&#8217;s particularly useful when debugging, and will help  you understand what different variable types are and how they work across languages.</li>
<li><b>ActionScript 3.0 is Object oriented</b>. Objects are at the heart of several programming languages, and supported in several more. Getting comfortable with how OOP works in AS means it is easier to understand how it works in JavaScript, Ruby, PHP, and Java. In fact, ActionScript is in some ways <a href="http://www.flexafterdark.com/docs/ActionScript-vs-Java">similar to Java</a> in how it&#8217;s structured.</li>
<li><b>ActionScript 3.0 is a dialect of ECMAScript.</b> So is <a href="https://developer.mozilla.org/en/JavaScript_Language_Resources">JavaScript</a>. It&#8217;s remarkably easy to switch between the two, which brings me to my next point.</li>
<li><b>ActionScript 3.0 and Flash documents have a Document Object Model (DOM)</b>. Think of a Flash FLA as an HTML or XML document and ActionScript as the JavaScript that manipulates it. If you&#8217;re comfortable working with ActionScript objects and hierarchy, learning how to manipulate the HTML DOM is a breeze (and vice-versa). </li>
<li><b>ActionScript 3.0 supports Local Shared Objects, which is similar to <a href="http://dev.w3.org/html5/webstorage/">HTML5 storage</a>, and other key-value based datastores</b>. Yep. Local  storage &#8220;super cookies&#8221; have been available in Flash for years now. Learning how to use them in Flash and ActionScript will help you transition to an HTML5 future. What&#8217;s more, key-value datastores are the next wave of databases. The data structure for a &#8220;<a href="http://en.wikipedia.org/wiki/NoSQL">NoSQL</a>&#8221;  store is similar to those for a local shared object.</li>
<li><b>ActionScript 3.0 supports event-driven programming.</b> Event listening and handling is critical to game development or interactive experiences in which the sequence of user input can&#8217;t be (or shouldn&#8217;t be) controlled. Knowing how to generate, add and remove elements from the stage, or when an item can be safely garbage collected are portable concepts that you can learn with ActionScript.</li>
</ul>
<p>My point with this post isn&#8217;t to start a language holy war. I&#8217;m not even sure I like ActionScript, plus my first programming language was actually PHP. Still I recognize that the way ActionScript works and as importantly, how it&#8217;s used provides a nice foundation for beginning developers.</p>
]]></content:encoded>
			<wfw:commentRss>http://tiffanybbrown.com/2010/08/23/why-actionscript-3-0-should-be-your-first-programming-language/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Hulu.com: More on HTML5 v. Flash</title>
		<link>http://tiffanybbrown.com/2010/05/14/hulu-html5-flash/</link>
		<comments>http://tiffanybbrown.com/2010/05/14/hulu-html5-flash/#comments</comments>
		<pubDate>Fri, 14 May 2010 17:01:09 +0000</pubDate>
		<dc:creator>tiffany</dc:creator>
				<category><![CDATA[ActionScript, Flash & Flex]]></category>
		<category><![CDATA[Internet life]]></category>
		<category><![CDATA[eric wei]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[html5 video]]></category>
		<category><![CDATA[hulu]]></category>
		<category><![CDATA[multimedia]]></category>
		<category><![CDATA[new teevee]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://tiffanybbrown.com/?p=3925</guid>
		<description><![CDATA[Our player doesn&#8217;t just simply stream video, it must also secure the content, handle reporting for our advertisers, render the video using a high performance codec to ensure premium visual quality, communicate back with the server to determine how long to buffer and what bitrate to stream, and dozens of other things that aren’t necessarily [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://webinista.s3.amazonaws.com/blog_images/hulu.com.png" class="image500"/></p>
<blockquote><p>Our player doesn&#8217;t just simply stream video, it must also secure the content, handle reporting for our advertisers, render the video using a high performance codec to ensure premium visual quality, communicate back with the server to determine how long to buffer and what bitrate to stream, and dozens of other things that aren’t necessarily visible to the end user.</p></blockquote>
<p>In February, I offered four reasons why you <a href="http://tiffanybbrown.com/2010/02/04/on-apples-ipad-html5-and-the-future-of-flash/">shouldn&#8217;t count Flash out just yet</a>. Eugene Wei <a href="http://hulu.com/">Hulu.com</a>&#8216;s Vice President of Product offers four more in his post <a href="http://blog.hulu.com/2010/05/13/pardon-our-dust/">Pardon Our Dust</a> about Hulu&#8217;s new video player (Via <a href="http://newteevee.com/2010/05/13/hulu-html5-isnt-ready-for-prime-time/">New TeeVee</a>).</p>
<p>Thank you Mr. Wei for writing a follow-up post for me. HTML5 is great way to deliver audio and video to the browser in a way that frees users from having to install a plug-in. What it isn&#8217;t so great for &#8212; yet &#8212; are the things that many content creators and advertisers find important: tracking, DRM and ad serving. </p>
<p>Here&#8217;s a business suggestion for Hulu: offer an HTML5 player as a premium upgrade. Hulu plans to <a href="http://latimesblogs.latimes.com/entertainmentnewsbuzz/2010/04/hulu-pushes-forward-with-995-subscription-service.html">charge $10 per month</a>. What if they offered &#8212; for, say, an extra $5 or $10 &#8212; &#8220;iPad-ready&#8221; video using HTML5?</p>
<p>Check out Hulu&#8217;s video introducing the new player.</p>
<div class="video"><object width="512" height="288"><param name="movie" value="http://www.hulu.com/embed/7SaU0v3GQiWb-XdmjgGmCA"></param><param name="allowFullScreen" value="true"></param><embed src="http://www.hulu.com/embed/7SaU0v3GQiWb-XdmjgGmCA" type="application/x-shockwave-flash"  width="512" height="288" allowFullScreen="true"></embed></object></div>
]]></content:encoded>
			<wfw:commentRss>http://tiffanybbrown.com/2010/05/14/hulu-html5-flash/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Debugging Flash applications with Firefox extensions</title>
		<link>http://tiffanybbrown.com/2009/05/01/debugging-flash-applications-with-firefox-extensions/</link>
		<comments>http://tiffanybbrown.com/2009/05/01/debugging-flash-applications-with-firefox-extensions/#comments</comments>
		<pubDate>Fri, 01 May 2009 11:00:18 +0000</pubDate>
		<dc:creator>tiffany</dc:creator>
				<category><![CDATA[ActionScript, Flash & Flex]]></category>
		<category><![CDATA[Firefox]]></category>
		<category><![CDATA[Web Development & Programming]]></category>
		<category><![CDATA[Alessandro Crugnola]]></category>
		<category><![CDATA[debugging]]></category>
		<category><![CDATA[externalinterface]]></category>
		<category><![CDATA[firebug]]></category>
		<category><![CDATA[flash and xml]]></category>
		<category><![CDATA[flash tracer]]></category>
		<category><![CDATA[livehttpheaders]]></category>

		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1969</guid>
		<description><![CDATA[Using ExternalInterface and Firebug Lately, the day job has had me busting booty on a Flash/ActionScript project that makes considerable use of the ExternalInterface class. ExternalInterface allows Flash to communicate with its HTML container using JavaScript. It&#8217;s a groovy feature, but one that changes the development process a bit. Unlike straight-up Flash development, ExternalInterface requires [...]]]></description>
			<content:encoded><![CDATA[<h3>Using ExternalInterface and Firebug</h3>
<p><img src="http://www.tiffanybbrown.com/images/firebug.png" alt="Firebug logo" style="float:right; margin: 0 0 1em 1em;" /><br />
Lately, the <a href="http://armchairmedia.com/">day job</a> has had me busting booty on a Flash/ActionScript project that makes considerable use of the <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/external/ExternalInterface.html">ExternalInterface</a> class. </p>
<p>ExternalInterface allows Flash to communicate with its HTML container using JavaScript. It&#8217;s a groovy feature, but one that changes the development process a bit. Unlike straight-up Flash development, ExternalInterface requires you to test interaction between the movie and its container. </p>
<p>One way to do this is using the <a href="http://getfirebug.com/logging.html">Firebug console</a>. Set up a simple debug function embedded in your HTML or in an external JavaScript file: <code>function debug(data){ console.log(data); }</code>. Then pass troubleshooting data to it using <code>ExternalInterface.call('debug','data you want to write');</code> just as you would with <code>trace()</code>. </p>
<p>I even used this technique to dump XML data to the console. Works amazingly well.</p>
<p>A minor drawback: compiler errors won&#8217;t be written to the console. Instead you will see a generic error message, and your movie won&#8217;t load. </p>
<h3>Using Flash Tracer</h3>
<div class="video">
	<img src="http://www.tiffanybbrown.com/images/flashtracer.gif" alt="Image of Flash Tracer" />
</div>
<p>For a more robust option, try <a href="http://www.sephiroth.it/firefox/flashtracer/">Flash Tracer</a>, a Firefox extension by Alessandro Crugnola. Flash Tracer uses native Flash logging to deliver <code>trace()</code> messages directly to the browser. To use it, you&#8217;ll need to install a <a href="http://www.adobe.com/support/flashplayer/downloads.html">debug version</a> of the Flash Player.</p>
<h3>Using LiveHTTPHeaders</h3>
<p>Sometimes when sending and receiving data to and from a server, you can&#8217;t tell what&#8217;s wrong by looking at your Flash application. There could be an error in your server side code. Or perhaps there&#8217;s a problem with the data you&#8217;re sending. This is where <a href="https://addons.mozilla.org/en-US/firefox/addon/3829">LiveHTTPHeaders</a> comes in handy. </p>
<p>LiveHTTPHeaders shows both browser-and-Flash request headers and server response headers. It also sends encoded GET and POST data from HTML forms or ActionScript <code>URLRequest()</code> / <code>URLVariables()</code> / <code>URLLoader()</code> operations. </p>
<p>This extension won&#8217;t show the actual data the server has returned. But you can use it to spot things like <a href="http://tiffanybbrown.com/2008/05/06/debugging-tip-disallowed-key-character-error-in-codeigniter/">invisible line break characters</a> and internal server errors.</p>
<h3>Related posts:</h3>
<ul>
<li><a href="http://tiffanybbrown.com/2006/07/13/essential-firefox-plug-ins/">Essential Firefox Extensions</a></li>
<li><a href="http://tiffanybbrown.com/2007/08/09/firefox-extensions/">My new favorite Firefox extensions</a></li>
<li><a href="http://tiffanybbrown.com/2008/05/09/clearing-loadvars-in-actionscript/">Clearing LoadVars() in ActionScript</a></li>
<li><a href="http://tiffanybbrown.com/2007/07/23/visited-links-in-flash/">OurIndustryIsBroken.com: Tracking site users and traffic with PHP, MySQL and ActionScript</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://tiffanybbrown.com/2009/05/01/debugging-flash-applications-with-firefox-extensions/feed/</wfw:commentRss>
		<slash:comments>19</slash:comments>
		</item>
		<item>
		<title>An all Flash / SWF search engine roundup</title>
		<link>http://tiffanybbrown.com/2008/07/01/an-all-flash-swf-search-engine-roundup/</link>
		<comments>http://tiffanybbrown.com/2008/07/01/an-all-flash-swf-search-engine-roundup/#comments</comments>
		<pubDate>Tue, 01 Jul 2008 14:05:31 +0000</pubDate>
		<dc:creator>tiffany</dc:creator>
				<category><![CDATA[ActionScript, Flash & Flex]]></category>
		<category><![CDATA[Search engines]]></category>
		<category><![CDATA[google]]></category>
		<category><![CDATA[seo]]></category>
		<category><![CDATA[swf]]></category>
		<category><![CDATA[yahoo]]></category>

		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1308</guid>
		<description><![CDATA[SWFs to become fully searchable SWF searchability FAQ Improved Flash indexing (Google&#8217;s announcement) Adobe, Google and Yahoo Join Forces To Make Flash More Searchable]]></description>
			<content:encoded><![CDATA[<ul>
<li><a href="http://www.flashmagazine.com/news/detail/swfs_to_become_fully_searchable/">SWFs to become fully searchable</a></li>
<li><a href="http://www.adobe.com/devnet/flashplayer/articles/swf_searchability.html">SWF searchability <abbr title="Frequently Asked Questions">FAQ</abbr></a></li>
<li><a href="http://googlewebmastercentral.blogspot.com/2008/06/improved-flash-indexing.html">Improved Flash indexing</a> (Google&#8217;s announcement)</li>
<li><a href="http://www.webmonkey.com/blog/Adobe__Google_and_Yahoo_Join_Forces_To_Make_Flash_More_Searchable">Adobe, Google and Yahoo Join Forces To Make Flash More Searchable</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://tiffanybbrown.com/2008/07/01/an-all-flash-swf-search-engine-roundup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Clearing LoadVars() in ActionScript</title>
		<link>http://tiffanybbrown.com/2008/05/09/clearing-loadvars-in-actionscript/</link>
		<comments>http://tiffanybbrown.com/2008/05/09/clearing-loadvars-in-actionscript/#comments</comments>
		<pubDate>Fri, 09 May 2008 13:00:10 +0000</pubDate>
		<dc:creator>tiffany</dc:creator>
				<category><![CDATA[ActionScript, Flash & Flex]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[loadvars]]></category>

		<guid isPermaLink="false">http://tiffanybbrown.com/?p=1286</guid>
		<description><![CDATA[The LoadVars() object is a funny thing. It&#8217;s basically a bucket for variables that you&#8217;d like to load into and send from an SWF file, as well as any methods and event handlers you invoke. LoadVars() can be problematic, however, if you ever find yourself reusing the same object for repeated load() or sendAndLoad() operations. [...]]]></description>
			<content:encoded><![CDATA[<p>The <a href="http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&#038;file=00001777.html#wp302958"><code>LoadVars()</code> object</a> is a funny thing. It&#8217;s basically a bucket for variables that you&#8217;d like to load into and send from an SWF file, as well as any methods and event handlers you invoke. </p>
<p><code>LoadVars()</code> can be problematic, however, if you ever find yourself reusing the same object for repeated <code>load()</code> or <code>sendAndLoad()</code> operations. As explained in the ActionScript 2.0 Language Reference:</p>
<blockquote><p>
Downloads variables from the specified URL, parses the variable data, and places the resulting variables in <code>my_lv</code>. Any properties in <code>my_lv</code> with the same names as downloaded variables are overwritten. Any properties in <code>my_lv</code> with different names than downloaded variables are not deleted.
</p></blockquote>
<p>In other words, if you continue reusing the same <code>LoadVars()</code> object, you&#8217;re going to have more data floating around than you may need at a time. Let&#8217;s take a look.</p>
<p>First we&#8217;ll request a file containing variables with a <code>load()</code> operation.</p>
<pre class="code">var bucket:LoadVars = new LoadVars();
bucket.load('vars.txt');</pre>
<p>The file vars.txt looks like this:</p>
<pre class="code">content1=The+quick+brown+fox&#038;content2=Jumps+over+the&#038;content3=lazy+dog.</pre>
<p>Each variable (that bit to the left of the = sign) becomes a property of your <code>LoadVars</code> object (bucket), and each variable&#8217;s value becomes a the value for that property. </p>
<p>If we iterate through bucket using a for loop when the variables are loaded, we&#8217;ll see that content1, content2, and content3 are now properties of bucket.</p>
<pre>
bucket.onLoad = function(){
     for(i in bucket){  trace(i+': '+bucket[i]+"\n"); }
}
</pre>
<p>Outputs:</p>
<pre>
content1: The quick brown fox
content2: Jumps over the
content3: lazy dog.
onLoad: [type Function]
</pre>
<p>Now let&#8217;s say we need to send a variable to our server and retrieve some new results. We&#8217;ll do a <code>sendAndLoad()</code> operation, and store the results in the same <code>bucket</code> object.</p>
<pre class="code">bucket.username = 'cleophus';
bucket.sendAndLoad('morevars.txt',bucket,"POST");</pre>
<p>The data received from morevars.txt looks like this:</p>
<pre>firstname=Dwayne&#038;lastname=Wayne&#038;major=math</pre>
<p>If we execute another for loop, once the data is loaded, we&#8217;ll now see that there are more properties stored in LoadVars().</p>
<pre>
bucket.onLoad = function(){
     for(i in bucket){  trace(i+': '+bucket[i]+"\n"); }
}
</pre>
<p>Now outputs:</p>
<pre>
content1: The quick brown fox
content2: Jumps over the
content3: lazy dog.
username: cleophus
firstname: Dwayne
lastname: Wayne
major: math
onLoad: [type Function]
</pre>
<p>Any more <code>load</code> or <code>sendAndLoad</code> operations will only add properties to the object unless you overwrite them &#8212; or <em><a href="http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=LiveDocs_Parts&#038;file=00001316.html#wp208259">delete</a></em> them. </p>
<p>Before deleting anything from your LoadVars object, however, copy the properties and values to another variable. Arrays and objects are a good fit here. You can create an array that only copies the variable-value pairs that you need to keep, then delete each variable from the <code>LoadVars</code> object, emptying it for reuse.</p>
<pre>
function turnVarsToArray(sendAndLoadObj:LoadVars):Array{
	var loadVarsArr:Array = new Array();
	for(var e in sendAndLoadObj){
		if( typeof(sendAndLoadObj[e]) !== 'function'){
			var pair:Object = {vari:e, val:sendAndLoadObj[e]};
			loadVarsArr.push(pair);
		}
          delete e;
	}
	return loadVarsArr;
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://tiffanybbrown.com/2008/05/09/clearing-loadvars-in-actionscript/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Flash 9 player hits 90%</title>
		<link>http://tiffanybbrown.com/2007/09/03/flash-9-player-hits-90/</link>
		<comments>http://tiffanybbrown.com/2007/09/03/flash-9-player-hits-90/#comments</comments>
		<pubDate>Tue, 04 Sep 2007 00:59:28 +0000</pubDate>
		<dc:creator>tiffany</dc:creator>
				<category><![CDATA[ActionScript, Flash & Flex]]></category>

		<guid isPermaLink="false">http://tiffanybbrown.com/2007/09/03/flash-9-player-hits-90/</guid>
		<description><![CDATA[According to Adobe&#8217;s latest release on Flash player penetration, Flash 9 has reached 90% in mature markets. That&#8217;s about a 7 percentage point increase from March 2007. See the complete stats.]]></description>
			<content:encoded><![CDATA[<p>According to Adobe&#8217;s latest release on Flash player penetration, Flash 9 has reached 90% in mature markets. That&#8217;s about a 7 percentage point increase from March 2007. See the <a href="http://www.adobe.com/products/player_census/flashplayer/version_penetration.html">complete stats</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://tiffanybbrown.com/2007/09/03/flash-9-player-hits-90/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OurIndustryIsBroken.com: Tracking site users and traffic with PHP, MySQL and ActionScript</title>
		<link>http://tiffanybbrown.com/2007/07/23/visited-links-in-flash/</link>
		<comments>http://tiffanybbrown.com/2007/07/23/visited-links-in-flash/#comments</comments>
		<pubDate>Tue, 24 Jul 2007 02:49:28 +0000</pubDate>
		<dc:creator>tiffany</dc:creator>
				<category><![CDATA[ActionScript, Flash & Flex]]></category>
		<category><![CDATA[MySQL / Databases]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[Projects]]></category>
		<category><![CDATA[Web Development & Programming]]></category>

		<guid isPermaLink="false">http://tiffanybbrown.com/2007/07/23/visited-links-in-flash/</guid>
		<description><![CDATA[You may remember that FletcherMartin launched OurIndustryIsBroken.com back in April. After receiving some feedback about the site, we tweaked it to enhance the user experience and allow us to track how visitors use the site. We&#8217;re using Google Analytics for high-level analysis such as referrals and search engine traffic. But we wanted to do more [...]]]></description>
			<content:encoded><![CDATA[<p>You may remember that FletcherMartin launched <a href="http://tiffanybbrown.com/2007/04/20/advertising-our-industry-is-broken/">OurIndustryIsBroken.com</a> back in April. After receiving some feedback about the site, we tweaked it to enhance the user experience and allow us to track how visitors use the site.</p>
<p>We&#8217;re using Google Analytics for high-level analysis such as referrals and search engine traffic. But we wanted to do more robust analysis. You see our conundrum, right? How do you track &#8220;pages&#8221; and visited &#8220;links&#8221; within a single Flash movie embedded in a single HTML page?</p>
<p>Simple: you build your own tracking system.</p>
<p><span id="more-1117"></span><br />
For this project, I used Flash&#8217;s <a href="http://www.adobe.com/support/flash/action_scripts/actionscript_dictionary/actionscript_dictionary427.html "><code>LoadVars()</code> object</a> to talk to a PHP middle layer that writes and retrieves data to and from a MySQL database. </p>
<p><code>LoadVars()</code> allows you to send (and receive) variables from a Flash movie to (or from) a server. You need a server-side script to process that information. Variables and values are sent to the server using either GET or POST. It&#8217;s just like submitting and processing a form &#8212; and should be treated like any other user-submitted data.</p>
<p>When you pass data from the server back to the movie, you send it as a query string, or an encoded URL (example: &#8216;car1=honda%20accord&#038;car2=chevrolet%20tahoe&#8217;). Once the variable-value pairs are loaded into the movie, you can use ActionScript to determine how the movie handles that data.</p>
<h3>The PHP scripts and the database</h3>
<p>There are two PHP scripts at work here. One collects the data from the movie, escapes it, and writes it to the database. The other retrieves data from the database, encodes, and returns it to the movie. We&#8217;re also using three separate database tables.</p>
<p>Table one contains the questions and answers contained in the movie. Each question and answer corresponds to a key. The next table tracks section visits in the aggregate. One column contains the keys from the questions and answers table. The other column keeps track of the count. I set an initial value of zero for each question-and-answer key in that column. Every time a section is visited, we update the count for that section by one. If we were using MySQL version 4.1 or later, we could have used the <a href="http://www.mysqlperformanceblog.com/2006/05/29/insert-on-duplicate-key-update-and-summary-counters/">ON DUPLICATE KEY</a> clause for INSERT.  Instead, we&#8217;re using UPDATE syntax and adding one to the value of the count column.</p>
<p>The third table is where we store per-user data. We&#8217;re using server-based sessions to track visits by user. With each click, we capture the section being visited, the current session identifier, the user&#8217;s IP address and the time of the click. Collecting this user data allows us to do a few things:</p>
<ul>
<li>Determine where our visitors are coming from.</li>
<li>Determine roughly how long people are staying on the site.</li>
<li>Determine which section(s) the user has visited (and their answers).</li>
</ul>
<p>That last portion is probably the coolest. At the end of each section of the movie, we return the user to a main menu. When that screen is loaded, a script queries the database to find which sections have been visited in that session. </p>
<p>Once MySQL returns those section keys, we build our query string. In my PHP code, I set each section variable equal to 1 (i.e. &#8216;section1=1&#038;section22=1&#8242;). We pull this query string into our Flash movie by once again using <code>LoadVars()</code>. </p>
<p>After these variables are loaded, we can use ActionScript to make the movie take a particular action. In this case, I tested to see whether the variable exists (example: <code>if(section1){scroll_mc.gotoAndPlay(23);}</code>). If it does, the movie goes to the scroll movie clip and plays from frame 23. If it doesn&#8217;t, the scroll movie clip plays from frame one. </p>
<p>All of this means we have some solid data to analyze both in terms of traffic and &#8212; because we&#8217;re tracking answers &#8212; how well our messaging is being received.</p>
<p>You can see the new tracking system in effect by <a href="http://www.ourindustryisbroken.com/">visiting the site</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://tiffanybbrown.com/2007/07/23/visited-links-in-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Boston, MA: Flashforward 2007</title>
		<link>http://tiffanybbrown.com/2007/05/23/boston-ma-flashforward-2007/</link>
		<comments>http://tiffanybbrown.com/2007/05/23/boston-ma-flashforward-2007/#comments</comments>
		<pubDate>Wed, 23 May 2007 21:10:28 +0000</pubDate>
		<dc:creator>tiffany</dc:creator>
				<category><![CDATA[ActionScript, Flash & Flex]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Tech Events]]></category>
		<category><![CDATA[Web Development & Programming]]></category>
		<category><![CDATA[Web design]]></category>

		<guid isPermaLink="false">http://tiffanybbrown.com/2007/05/23/boston-ma-flashforward-2007/</guid>
		<description><![CDATA[Flash and ActionScript heads listen up: This year&#8217;s Flashforward conference will be held in Boston in the fall. Speakers include John Maeda of of the MIT Media Lab and Craig Swann of CRASH!MEDIA. Session topics will include ActionScript 3.0, Flex and Designing with Sound. Flashforward is produced by Lynda.com events. Event details When: September 19th [...]]]></description>
			<content:encoded><![CDATA[<p>Flash and ActionScript heads listen up: This year&#8217;s <a href="http://www.flashforwardconference.com/">Flashforward</a> conference will be held in Boston in the fall. </p>
<p>Speakers include <a href="http://plw.media.mit.edu/people/maeda/">John Maeda</a> of of the <abbr title="Massachusetts Institute of Technology">MIT</abbr> Media Lab and <a href="http://craigswann.com/">Craig Swann</a> of <a href="http://www.crashmedia.com/">CRASH!MEDIA</a>. Session topics will include ActionScript 3.0, Flex and Designing with Sound.</p>
<p>Flashforward is produced by <a href="http://www.lynda.com">Lynda.com</a> events.</p>
<div class="event-details">
<h3>Event details</h3>
<ul>
<li>When: September 19th through 21st, 2007</li>
<li>Where: <a href="http://marriott.com/hotels/travel/bosco-boston-marriott-copley-place/">Marriott Copley Place</a>, Boston Massachusetts</li>
<li>How much: $899 &#8211; $1299 depending on when you register and which package you choose. Exhibits and Film Festival-only admission is $50.</li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://tiffanybbrown.com/2007/05/23/boston-ma-flashforward-2007/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript from HTML loaded into Flash</title>
		<link>http://tiffanybbrown.com/2007/02/05/javascript-from-html-loaded-into-flash/</link>
		<comments>http://tiffanybbrown.com/2007/02/05/javascript-from-html-loaded-into-flash/#comments</comments>
		<pubDate>Mon, 05 Feb 2007 09:00:35 +0000</pubDate>
		<dc:creator>tiffany</dc:creator>
				<category><![CDATA[(x)HTML]]></category>
		<category><![CDATA[ActionScript, Flash & Flex]]></category>
		<category><![CDATA[JavaScript/ECMAScript]]></category>
		<category><![CDATA[Web Development & Programming]]></category>

		<guid isPermaLink="false">http://tiffanybbrown.com/2007/02/05/javascript-from-html-loaded-into-flash/</guid>
		<description><![CDATA[An answer to the question that you may or may not have asked: Yes it is possible to invoke a JavaScript function from HTML content that has been loaded into Flash. You can read the rest of the post, or jump straight to the example (and maybe come back to the post afterwards). Let&#8217;s say [...]]]></description>
			<content:encoded><![CDATA[<p>An answer to the question that you may or may not have asked: Yes it is possible to invoke a JavaScript function from HTML content that has been loaded into Flash.</p>
<p>You can read the rest of the post, or jump  <a href="http://tiffanybbrown.com/dev/flashJsHTML/">straight to the example</a> (and maybe come back to the post afterwards).</p>
<p>Let&#8217;s say you have a Flash movie with a dynamic text field with an instance name of <code>content</code>. The ActionScript below assumes you will not be creating this text field at runtime, but that it is drawn on your stage. Set the <code>html</code> property to <code>true</code> so that it will properly display our HTML.</p>
<pre>
content.html = true; // make content accept HTML code.
</pre>
<p><span id="more-968"></span><br />
You decide to load HTML into <code>content</code> using <code>LoadVars()</code>, and create a new LoadVars object.</p>
<pre>
var loadContent:LoadVars = new LoadVars(); // creates the object
loadContent.load('htmlfilename.html');           // loads the HTML
</pre>
<p>Your HTML content looks like this:</p>
<pre>
contentText=&lt;p&gt;This is some HTML content. And &lt;a href=&quot;javascript:doSomething()&quot;&gt;this&lt;/a&gt; is a link.&lt;/p&gt;
</pre>
<p>I should probably explain this, eh? <code>LoadVars</code> does what its name suggests: it loads variables. You pass the variables just as you would if you were constructing a query string for a URL.</p>
<pre>varName1=The first variable value&#038;varName2=The second variable value</pre>
<p>Typically, if you were constructing a query string, you would use + instead of spaces. If you were using PHP, you would probably encode the string using <a href="http://www.php.net/urlencode"><code>urlencode()</code></a>. But when using HTML, encoding the string will leave you with raw code in your text box, &lt;/&gt; and all.</p>
<p>In the above example, <code>contentText</code> is the variable, and <code>&lt;p&gt;This is some HTML content. And &lt;a href=&quot;javascript:doSomething()&quot;&gt;this&lt;/a&gt; is a link.&lt;/p&gt;</code> is its value. Note the <code>javascript:doSomething()</code> function.</p>
<p>So back to the ActionScript &#8230; Now we&#8217;ve got to assign the value of contentText to the content box:</p>
<pre>
/*
Once the HTML document (htmlfilename.html)
finishes loading, it will execute the function below.
*/
loadContent.onLoad = function(){
      content.htmlText = this.contentText;
}
</pre>
<p>Now in the HTML file that contains your Flash movie, define a function known as <code>doSomething()</code>.</p>
<pre>
function doSomething(){
   document.getElementById('headline').style.color = '#33ccff';
}
</pre>
<p>Now, when you click on the link in the HTML loaded into your Flash document, it will activate <code>doSomething()</code>.</p>
<p  class="i"><b>An editor&#8217;s note:</b> If you have a question about this technique and its possible applications, <strong>DON&#8217;T ASK ME</strong>. I (probably) can&#8217;t help you. I&#8217;m not an expert on using HTML and  JavaScript with Flash. I just stumbled across this on the way to something that will be greater if I can ever figure it out.</p>
]]></content:encoded>
			<wfw:commentRss>http://tiffanybbrown.com/2007/02/05/javascript-from-html-loaded-into-flash/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Methods for embedding Flash</title>
		<link>http://tiffanybbrown.com/2006/11/14/methods-for-embedding-flash/</link>
		<comments>http://tiffanybbrown.com/2006/11/14/methods-for-embedding-flash/#comments</comments>
		<pubDate>Tue, 14 Nov 2006 09:00:35 +0000</pubDate>
		<dc:creator>tiffany</dc:creator>
				<category><![CDATA[(x)HTML]]></category>
		<category><![CDATA[ActionScript, Flash & Flex]]></category>
		<category><![CDATA[JavaScript/ECMAScript]]></category>
		<category><![CDATA[Web Development & Programming]]></category>
		<category><![CDATA[Web standards]]></category>

		<guid isPermaLink="false">http://tiffanybbrown.com/2006/11/14/methods-for-embedding-flash/</guid>
		<description><![CDATA[I stumbled across this year-old post: In search of &#8230; a perfect plugin technique. Lots of good stuff about the pros-and-cons of various means of embedding Flash content. I&#8217;m partial to two methods: Using JavaScript to write the object and embed tags, and providing a &#60;noscript&#62; alternative, such as a static image. Using the object [...]]]></description>
			<content:encoded><![CDATA[<p>I stumbled across this year-old post: <a href="http://weblogs.macromedia.com/accessibility/archives/2005/08/in_search_of_a.cfm">In search of &#8230; a perfect plugin technique</a>. Lots of good stuff about the pros-and-cons of various means of embedding Flash content.</p>
<p>I&#8217;m partial to two methods:</p>
<ol>
<li><a href="http://tiffanybbrown.com/2006/04/05/flash_validation_and_the_latest_versions_of_ie/">Using JavaScript</a> to write the <code>object</code> and <code>embed</code> tags, and providing a <code>&lt;noscript&gt;</code> alternative, such as a static image.</li>
<li>Using the <code>object</code> element, and embedding alternate content (perhaps a still image from the animation) within the object.</li>
</ol>
<p>Both options validate completely &#8212; even with the invalid<code>&lt;embed&gt;</code> tag in the first version.  But, because of the way Internet Explorer, <a href="http://tiffanybbrown.com/2003/10/11/get_ready_for_the_next_version_of_internet_explorer/">handles ActiveX controls</a>, the second method creates a user experience problem. </p>
<p>I can&#8217;t vouch for the accessibility of either method. But they are two more options for embedding Flash (and other multimedia) content.</p>
<h3>Related posts</h3>
<ul>
<li><a href="http://tiffanybbrown.com/2003/10/11/get_ready_for_the_next_version_of_internet_explorer/">Get ready for the next version of Internet Explorer</a></li>
<li><a href="http://tiffanybbrown.com/2006/04/05/flash_validation_and_the_latest_versions_of_ie/">Flash, validation and the latest versions of IE</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://tiffanybbrown.com/2006/11/14/methods-for-embedding-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Hollywood, CA: FITC Hollywood</title>
		<link>http://tiffanybbrown.com/2006/08/29/hollywood-ca-fitc-hollywood/</link>
		<comments>http://tiffanybbrown.com/2006/08/29/hollywood-ca-fitc-hollywood/#comments</comments>
		<pubDate>Tue, 29 Aug 2006 23:00:17 +0000</pubDate>
		<dc:creator>tiffany</dc:creator>
				<category><![CDATA[ActionScript, Flash & Flex]]></category>
		<category><![CDATA[Events]]></category>
		<category><![CDATA[Tech Events]]></category>

		<guid isPermaLink="false">http://tiffanybbrown.com/2006/08/29/hollywood-ca-fitc-hollywood/</guid>
		<description><![CDATA[Three days of presentations and workshops on Flash, including ActionScript, design, gaming, mobile and motion graphics. Scheduled presentations and presenters include: &#8220;An Indepth Look at ActionScript 3&#8221; by Daniel Dura &#8220;Building Commercial Sites with Streaming Content&#8221; by Daniel Kremsa &#8220;Cell Phone Interactivity: Harnessing the Universal Input Device&#8221; by Jacob Bullock &#8220;Creating Flash Lite 2 Video [...]]]></description>
			<content:encoded><![CDATA[<p>Three days of presentations and workshops on Flash, including ActionScript, design, gaming, mobile and motion graphics. Scheduled presentations and presenters include:</p>
<ul>
<li>&#8220;An Indepth Look at ActionScript 3&#8221; by Daniel Dura</li>
<li>&#8220;Building Commercial Sites with Streaming Content&#8221; by Daniel Kremsa</li>
<li>&#8220;Cell Phone Interactivity: Harnessing the Universal Input Device&#8221; by Jacob Bullock</li>
<li>&#8220;Creating Flash Lite 2 Video Applications&#8221; by James Talbot</li>
<li>&#8220;Everything You Always Wanted to Know About Game Development But Were Afraid to Ask&#8221; by Francis Bourre</li>
<li>&#8220;GMUNK+HOLLYFUNK06&#8221; by Bradley Grosh</li>
<li>&#8220;Making IM Plugins with Flash&#8221; by Justin Everett-Church</li>
<li>&#8220;Optimizing your Streaming Flash delivery&#8221; by Thierry Curis</li>
</ul>
<div class="event-details">
<h3>Event details</h3>
<ul>
<li>When: October 5 through October 7, 2006</li>
<li>Where: Beverly Garland&#8217;s Holiday Inn, Universal Studios &#8211; Hollywood, <a href="http://maps.google.com/maps?f=q&#038;hl=en&#038;q=4222+Vineland+Avenue+Hollywood,+California&#038;ie=UTF8&#038;z=15&#038;ll=34.146441,-118.370175&#038;spn=0.016409,0.053644&#038;om=1&#038;iwloc=A">4222 Vineland Avenue Hollywood, California</a>, USA</li>
<li>How much? I&#8217;m too lazy to type it all. <a href="http://www.fitc.ca/event_detail.cfm?festival_id=10&#038;display=tickets">Check the site</a>. (<strong>Early bird ends AUGUST 31, 2006</strong>)</li>
</ul>
</div>
]]></content:encoded>
			<wfw:commentRss>http://tiffanybbrown.com/2006/08/29/hollywood-ca-fitc-hollywood/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Parsing XML using Flash and ActionScript 2.0</title>
		<link>http://tiffanybbrown.com/2006/07/18/parsing-xml-using-flash-and-actionscript-20/</link>
		<comments>http://tiffanybbrown.com/2006/07/18/parsing-xml-using-flash-and-actionscript-20/#comments</comments>
		<pubDate>Tue, 18 Jul 2006 16:36:24 +0000</pubDate>
		<dc:creator>tiffany</dc:creator>
				<category><![CDATA[ActionScript, Flash & Flex]]></category>
		<category><![CDATA[Web Development & Programming]]></category>
		<category><![CDATA[XML (including RSS and Atom)]]></category>

		<guid isPermaLink="false">http://tiffanybbrown.com/viewqb.php/703</guid>
		<description><![CDATA[This is my first attempt at parsing XML using ActionScript. The stuff between the &#60;pre&#62; and &#60;/pre&#62; tags is released to the public domain. Do what you will with it. Be aware though, that I can&#8217;t offer technical support &#8230; mostly because I don&#8217;t know enough to help you. First, the XML: &#60;alldots&#62; &#60;dotname id="bigDot" [...]]]></description>
			<content:encoded><![CDATA[<p>This is my first attempt at parsing XML using ActionScript. The stuff between the &lt;pre&gt; and &lt;/pre&gt; tags is released to the public domain. Do what you will with it. Be aware though, that I can&#8217;t offer technical support &#8230; mostly because I don&#8217;t know enough to help you.</p>
<p>First, the XML:</p>
<pre>
&lt;alldots&gt;
  &lt;dotname id="bigDot" color="0xff0000" url="http://www.fletchermartin.com/" photos="8" /&gt;
  &lt;dotname id="otherDot" color="0x000066" url="http://www.ajc.com/" photos="8" /&gt;
  &lt;dotname id="thirdDot" color="0xCC0099" url="http://www.tiffanybbrown.com/" photos="0" /&gt;
&lt;/alldots&gt;
</pre>
<p>Then the ActionScript (commented for your learning pleasure):</p>
<pre>
var dots:XML = new XML();
dots.load('bigdot.xml');

dots.onLoad = function(success:Boolean){
	if(success){
		if(dots.status == 0){
			 var dotsToXMLString:String = new String(); // initializes a new string variable
			 dotsToXMLString = dots.toString(); 		// converts dots XML object to a string and stores it in dotsToXMLString.

			 var dotsXML:XML = new XML(dotsToXMLString);// creates new XML object with the string contents from above.
			 dotsXML.parseXML(dotsToXMLString);			// parses the string from above.

			 var dotsNodes:Object = dotsXML.firstChild; // Saves the firstChild (in this case, the outermost element) as an object
			 var dotsNodesChildren:Object = dotsNodes.childNodes; // Saves the childNodes of firstChild as an object

			 for(i=0;i&lt;dotsNodesChildren.length;i++){
				var newObj:Object = dotsNodes.childNodes[i].attributes.id; // creates a new object out of the child node's id.

				var newObjColor:Color = new Color(newObj); // creates a new color object with newObj as its target
				var theColor:Number = dotsNodes.childNodes[i].attributes.color; //retrieves the hex code value (number) of the attribute color

				newObjColor.setRGB(theColor); // sets the RGB value of newObjColor.
			}

		} else {
			trace("Problem parsing XML.");
		}
	} else{
		trace("Could not load XML");
	}
}
 </pre>
<p>View <a href="/code/2006/flashXML/">everything in action</a>, or <a href="/downloads/flashXML.zip">download</a> the .fla, and XML files.</p>
]]></content:encoded>
			<wfw:commentRss>http://tiffanybbrown.com/2006/07/18/parsing-xml-using-flash-and-actionscript-20/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

