<?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>Marius van Witzenburg &#187; Flash</title>
	<atom:link href="http://kitara.nl/tag/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://kitara.nl</link>
	<description>We fight for our survival, we fight!</description>
	<lastBuildDate>Sun, 20 May 2012 15:39:19 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>How to control a Flash movie from Javascript and use Javascript from Flash movies</title>
		<link>http://kitara.nl/2011/06/14/how-to-control-a-flash-movie-from-javascript-and-use-javascript-from-flash-movies/</link>
		<comments>http://kitara.nl/2011/06/14/how-to-control-a-flash-movie-from-javascript-and-use-javascript-from-flash-movies/#comments</comments>
		<pubDate>Tue, 14 Jun 2011 21:24:10 +0000</pubDate>
		<dc:creator>mariusvw</dc:creator>
				<category><![CDATA[Webdevelopment]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[AS2]]></category>
		<category><![CDATA[AS3]]></category>
		<category><![CDATA[Control]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://kitara.nl/?p=352</guid>
		<description><![CDATA[Personally I dislike the usage of Flash in my websites but our clients request a lot that they want animations. Now it happens that they want the animation to act upon an action to a non-flash object. This can be difficult if you have no idea how to do that. If you read below, you [...]]]></description>
			<content:encoded><![CDATA[<p>Personally I dislike the usage of Flash in my websites but our clients request a lot that they want animations. Now it happens that they want the animation to act upon an action to a non-flash object. This can be difficult if you have no idea how to do that. If you read below, you should have no problem with getting this job done <img src='http://kitara.nl/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Control your Flash Movie from Javascript:</p>

<div class="wp_syntax"><div class="code"><pre class="javascript" style="font-family:monospace;"><span style="color: #006600; font-style: italic;">// Play movie</span>
document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'myFlashMovie'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">Play</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// Stop movie</span>
document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'myFlashMovie'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">StopPlay</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// Rewind movie to beginning</span>
document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'myFlashMovie'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">Rewind</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// Goto next frame of MovieClip</span>
document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'myFlashMovie'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">TGetProperty</span><span style="color: #009900;">&#40;</span>nameOfTargetMovieClip<span style="color: #339933;">,</span> propertyIndex<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// Goto next frame of TimeLine</span>
document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'myFlashMovie'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">GotoFrame</span><span style="color: #009900;">&#40;</span>frameNum<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// Zoom in or out the flash movie</span>
document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'myFlashMovie'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">Zoom</span><span style="color: #009900;">&#40;</span>relative percentage<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// Set variable and make it available via ActionScript</span>
document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'myFlashMovie'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">SetVariable</span><span style="color: #009900;">&#40;</span>variableName<span style="color: #339933;">,</span> variableValue<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #006600; font-style: italic;">// Get variable for usage in JavaScript</span>
<span style="color: #003366; font-weight: bold;">var</span> myVariable <span style="color: #339933;">=</span> document.<span style="color: #660066;">getElementById</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">'myFlashMovie'</span><span style="color: #009900;">&#41;</span>.<span style="color: #660066;">GetVariable</span><span style="color: #009900;">&#40;</span>variableName<span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>To control Javascript functions you can call it like this:</p>
<p><strong>ActionScript 1/2</strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">getURL</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;javascript:name_of_your_function();&quot;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p><strong>ActionScript 3 direct call</strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">url</span>:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;javascript:name_of_your_function();&quot;</span>;
<span style="color: #000000; font-weight: bold;">var</span> request:URLRequest = <span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">url</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0066CC;">try</span> <span style="color: #66cc66;">&#123;</span>
  navigateToURL<span style="color: #66cc66;">&#40;</span>request<span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span> <span style="color: #0066CC;">catch</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:<span style="color: #0066CC;">Error</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
  <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Error occurred!&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><strong>ActionScript 3 event mouse click call</strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">movieClipName.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>, callLink<span style="color: #66cc66;">&#41;</span>;
<span style="color: #000000; font-weight: bold;">function</span> callLink:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
  <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">url</span>:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;javascript:name_of_your_function();&quot;</span>;
  <span style="color: #000000; font-weight: bold;">var</span> request:URLRequest = <span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">url</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #0066CC;">try</span> <span style="color: #66cc66;">&#123;</span>
    navigateToURL<span style="color: #66cc66;">&#40;</span>request<span style="color: #66cc66;">&#41;</span>;
  <span style="color: #66cc66;">&#125;</span> <span style="color: #0066CC;">catch</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:<span style="color: #0066CC;">Error</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Error occurred!&quot;</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>For some more information about these methods, please check out the <a href="http://www.adobe.com/support/flash/publishexport/scriptingwithflash/scriptingwithflash_03.html" class="broken_link">Adobe</a> website.</p>
<p>I hope this helps you out with getting that Flash Movie behave like you want it to <img src='http://kitara.nl/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://kitara.nl/2011/06/14/how-to-control-a-flash-movie-from-javascript-and-use-javascript-from-flash-movies/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to output UTF-8 data from PHP for Flash</title>
		<link>http://kitara.nl/2011/06/09/how-to-output-utf-8-data-from-php-for-flash/</link>
		<comments>http://kitara.nl/2011/06/09/how-to-output-utf-8-data-from-php-for-flash/#comments</comments>
		<pubDate>Thu, 09 Jun 2011 17:36:42 +0000</pubDate>
		<dc:creator>mariusvw</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[Webdevelopment]]></category>
		<category><![CDATA[Encode]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Serialize.PHP]]></category>
		<category><![CDATA[UTF-8]]></category>

		<guid isPermaLink="false">http://kitara.nl/?p=18</guid>
		<description><![CDATA[Encode the output right for Flash to handle UTF-8 characters: $data = 'Søm∑ spëcíål çhåråctèrs.'; echo urlencode&#40;htmlspecialchars&#40;serialize&#40;$data&#41;&#41;&#41;;]]></description>
			<content:encoded><![CDATA[<p>Encode the output right for Flash to handle UTF-8 characters:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$data</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'Søm∑ spëcíål çhåråctèrs.'</span><span style="color: #339933;">;</span>
<span style="color: #b1b100;">echo</span> <span style="color: #990000;">urlencode</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">htmlspecialchars</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">serialize</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$data</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://kitara.nl/2011/06/09/how-to-output-utf-8-data-from-php-for-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to make a Flash movie redirect with ActionScript3 from your timeline</title>
		<link>http://kitara.nl/2010/03/24/how-to-make-a-flash-movie-redirect-with-actionscript3-from-your-timeline/</link>
		<comments>http://kitara.nl/2010/03/24/how-to-make-a-flash-movie-redirect-with-actionscript3-from-your-timeline/#comments</comments>
		<pubDate>Wed, 24 Mar 2010 20:42:33 +0000</pubDate>
		<dc:creator>mariusvw</dc:creator>
				<category><![CDATA[How to]]></category>
		<category><![CDATA[Webdevelopment]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[ActionScript3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Redirect]]></category>

		<guid isPermaLink="false">http://mariusvw.com/?p=1465</guid>
		<description><![CDATA[You can use the following code to simply redirect from a key in your timeline. I used this to redirect after my preloader finished. var url:String = &#34;home.html&#34;; var request:URLRequest = new URLRequest&#40;url&#41;; try &#123; navigateToURL&#40;request, &#34;_self&#34;&#41;; &#125; catch &#40;e:Error&#41; &#123; trace&#40;&#34;Error occurred!&#34;&#41;; &#125;]]></description>
			<content:encoded><![CDATA[<p>You can use the following code to simply redirect from a key in your timeline.</p>
<p>I used this to redirect after my preloader finished.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">url</span>:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;home.html&quot;</span>;
<span style="color: #000000; font-weight: bold;">var</span> request:URLRequest = <span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">url</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #0066CC;">try</span> <span style="color: #66cc66;">&#123;</span>
    navigateToURL<span style="color: #66cc66;">&#40;</span>request, <span style="color: #ff0000;">&quot;_self&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span> <span style="color: #0066CC;">catch</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:<span style="color: #0066CC;">Error</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
    <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Error occurred!&quot;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://kitara.nl/2010/03/24/how-to-make-a-flash-movie-redirect-with-actionscript3-from-your-timeline/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

