<?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>Renaun Erickson</title>
	<atom:link href="http://renaun.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://renaun.com/blog</link>
	<description>Informtation on Flex, Flash, ColdFusion, and general RIA web develoment.</description>
	<lastBuildDate>Mon, 07 May 2012 15:10:01 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>My ActionScript Game Server with 15,000 Concurrent Connections</title>
		<link>http://renaun.com/blog/2012/04/my-actionscript-game-server-with-15000-concurrent-connections/</link>
		<comments>http://renaun.com/blog/2012/04/my-actionscript-game-server-with-15000-concurrent-connections/#comments</comments>
		<pubDate>Wed, 25 Apr 2012 19:33:05 +0000</pubDate>
		<dc:creator>Renaun Erickson</dc:creator>
				<category><![CDATA[Gaming]]></category>

		<guid isPermaLink="false">http://renaun.com/blog/?p=1690</guid>
		<description><![CDATA[Goal Create a game using ActionScript for both the server side game server and the client side game with the ability for a large number of concurrent (10,000+) socket connections. Make sure memory and performance of the application are up to the task. What am I talking about? This blog post will explain how I [...]]]></description>
			<content:encoded><![CDATA[<h3>Goal</h3>
<p>Create a game using ActionScript for both the server side game server and the client side game with the ability for a large number of concurrent (10,000+) socket connections. Make sure memory and performance of the application are up to the task.</p>
<h3>What am I talking about?</h3>
<p>This blog post will explain how I created a socket server running on an Amazon EC2 Ubuntu server with more than 15k+ concurrent connections. This socket server has all the game logic for a game called SpellTraction, for which both the server and client are written in ActionScript. </p>
<p><strong>Server:</strong> Game built in ActionScript 3 and run as a shell process using a modified redtamarin build. The modified redtamarin has a libev based socket server.<br />
<strong>Client:</strong> Client game built with ActionScript 3.</p>
<p>To check out a running version of the client go to either:</p>
<p><a href="http://renaun.com/serveras/test/">http://renaun.com/serveras/test/</a> - this version is driven by other Amazon EC2 instances that are running test scripts to create the 15k+ connections.<br />
</br>or</br><br />
<a href="http://renaun.com/serveras/spelltraction/">http://renaun.com/serveras/spelltraction/</a> - the game with any other player looking at it right now.</p>
<p><span id="more-1690"></span></p>
<p>Here is a screenshot of the game:<br />
<a href="http://renaun.com/blog/wp-content/uploads/2012/04/spell4.png"><img src="http://renaun.com/blog/wp-content/uploads/2012/04/spell4-300x224.png" alt="" title="SpellTraction Screenshot" width="300" height="224" class="aligncenter size-medium wp-image-1695" /></a></p>
<p>The source code that I used for the server and client is located on <a href="https://github.com/renaun/ActionScriptGameServerExamples">my github repo here</a>.</p>
<h3>History of leveraging Tamarin to run ActionScript as a Process (i.e. ActionScript on the Server)</h3>
<p>Adobe open sourced the virtual machine (VM) of the Flash Player and donated it to the <a href="http://www-archive.mozilla.org/projects/tamarin/">Mozilla foundation as the project Tamarin</a>. What gives Flash Player its rich set of features is all the c/cpp classes created around the ActionScript Tamarin VM. Making the Tamarin VM available to developers opened the door for different use cases and implementations. This is where people started to realize they could do ActionScript on the server. </p>
<p>Three main projects that created feature rich classes around Tamarin for the specific use of server side ActionScript were: <a href="http://wiki.whirled.com/Whirled_SDK">Thane (part of Whirled SDK by ThreeRings)</a>, <a href="http://code.google.com/p/redtamarin/">redtamarin (by zwetan and others)</a>, and <a href="https://github.com/PushButtonLabs/PBNetworking">PushButton Engines Network component by Ben Garney</a>.</p>
<p>Most of these projects were built for specific use cases and are not necessarily in active development. But the main point is that creating ActionScript based specific game servers is very doable. For example Whirled is a whole ecosystem that lets developers create ActionScript based games and load them on their server. The server then uses their Tamarin modified shell process to run the ActionScript based game code.</p>
<p>For my use case I wanted something that was specific to games and a little more modern, e.g. make it Node.js like. So I pulled down the redtamarin source, which had documentation that I could somewhat understand, and built a c/c++ libev based socket server. I added as3signals to have a simplified callback api to create a game tick and socket connections.</p>
<p>The API could easily be change some more to make it even smaller but the hopefully you get the idea. Here is an application that would respond to any connections to the server with the text "You have connected":</p>
<div class="igBar"><span id="lactionscript-3"><a href="#" onclick="javascript:showPlainTxt('actionscript-3'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT:</span>
<div id="actionscript-3">
<div class="actionscript"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> connectHandler<span style="color: #66cc66;">&#40;</span>client:ClientSocket, <span style="color: #0066CC;">connect</span>:<span style="color: #0066CC;">Boolean</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">connect</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; client.<span style="color: #006600;">sendUTF</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"You have connected"</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #000000; font-weight: bold;">function</span> loopHandler<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>!ss.<span style="color: #006600;">listening</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; ss.<span style="color: #006600;">listen</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"192.168.10.20"</span>, <span style="color: #cc66cc;">9898</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #b1b100;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; ;<span style="color: #808080; font-style: italic;">// Game server tick</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #000000; font-weight: bold;">var</span> ss:ServerSocket = <span style="color: #000000; font-weight: bold;">new</span> ServerSocket<span style="color: #66cc66;">&#40;</span>connectHandler<span style="color: #66cc66;">&#41;</span>;<br />
ss.<span style="color: #006600;">loop</span>.<span style="color: #0066CC;">add</span><span style="color: #66cc66;">&#40;</span>loopHandler<span style="color: #66cc66;">&#41;</span>;<br />
ss.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">250</span><span style="color: #66cc66;">&#41;</span>;</div>
</div>
</div>
<p></p>
<h3>The Fun of Solving the High Concurrent Connections Problem</h3>
<p>There are a bunch of data and blog posts on the <a href="http://en.wikipedia.org/wiki/C10k_problem">C10K problem</a>, which nowadays is the <a href="http://www.metabrew.com/article/a-million-user-comet-application-with-mochiweb-part-1">C1M problem</a>. Node.js is based on libev but just using the event model over the select, kqueue, epoll, etc.. socket models is half the battle. You still have to configure you server to handle that kind of load.</p>
<p>For example I am no expert in kernel configuration for linux, but for my current EC2 Ubuntu setup I have settings that look like this:</p>
<div class="igBar"><span id="lcode-4"><a href="#" onclick="javascript:showPlainTxt('code-4'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">CODE:</span>
<div id="code-4">
<div class="code">/etc/sysctl.<span style="">conf</span><br />
net.<span style="">core</span>.<span style="">rmem_max</span> = <span style="color:#800000;">33554432</span><br />
net.<span style="">core</span>.<span style="">wmem_max</span> = <span style="color:#800000;">33554432</span><br />
net.<span style="">core</span>.<span style="">rmem_default</span> = <span style="color:#800000;">1048576</span><br />
net.<span style="">core</span>.<span style="">wmem_default</span> = <span style="color:#800000;">1048576</span><br />
net.<span style="">core</span>.<span style="">optmem_max</span> = <span style="color:#800000;">33554432</span><br />
net.<span style="">ipv4</span>.<span style="">tcp_rmem</span> = <span style="color:#800000;">4096</span> <span style="color:#800000;">4096</span> <span style="color:#800000;">33554432</span><br />
net.<span style="">ipv4</span>.<span style="">tcp_wmem</span> = <span style="color:#800000;">4096</span> <span style="color:#800000;">4096</span> <span style="color:#800000;">33554432</span><br />
net.<span style="">ipv4</span>.<span style="">tcp_mem</span> = <span style="color:#800000;">786432</span> <span style="color:#800000;">1048576</span> <span style="color:#800000;">26777216</span><br />
net.<span style="">ipv4</span>.<span style="">tcp_max_tw_buckets</span> = <span style="color:#800000;">360000</span><br />
net.<span style="">core</span>.<span style="">netdev_max_backlog</span> = <span style="color:#800000;">30000</span><br />
net.<span style="">ipv4</span>.<span style="">ip_local_port_range</span> = <span style="color:#800000;">2048</span> <span style="color:#800000;">65535</span><br />
net.<span style="">ipv4</span>.<span style="">tcp_window_scaling</span> = <span style="color:#800000;">1</span><br />
net.<span style="">ipv4</span>.<span style="">tcp_no_metrics_save</span> = <span style="color:#800000;">1</span><br />
net.<span style="">core</span>.<span style="">somaxconn</span> = <span style="color:#800000;">131072</span><br />
fs.<span style="">file</span>-max = <span style="color:#800000;">131072</span></p>
<p>
/usr/include/linux/limits.<span style="">h</span><br />
NR_OPEN = <span style="color:#800000;">65536</span></p>
<p>/etc/security/limits.<span style="">conf</span><br />
*                soft    nofile          <span style="color:#800000;">65535</span><br />
*                hard    nofile          <span style="color:#800000;">65535</span></div>
</div>
</div>
<p></p>
<p>Another side thing I learned was how much memory the OS uses for connections. At first I was worried about my game taking up a bunch of memory but quickly found out the bigger concern is what the OS needs to handle sending and receiving data on that many connections. Look at the 1 million connection link above, he is running servers with 25GB+ memory.</p>
<h3>Conclusions</h3>
<p>It took me just 3 days to go from not understanding c/c++ socket programming to having a working libev socket server prototype integrated with redtamarin. If I knew what I was doing it would have been quicker and I could flesh out a bunch more game specific features. But for my test case it was sufficient. The tooling workflow around Tamarin and building the abc files that get run by the shell process are a bit lacking. But zwetan's tools on the redtamarin Google code project help a lot (thats really for another blog post).</p>
<p>I have had the app running now for 5+ days with over 15k+ connections. I could try to push it past 15k+ connections but I didn't want to do large ec2 instances and ramping up that many connections actually takes a bit of time. The memory is staying stable at a delta of 15Mb since it started at a total of 20Mb (<a href="http://renaun.com/serveras/test/">current stats</a>). And using "top" on the server the CPU usages is not much more than 9%, and that is all processes running. This means memory and CPU are not the bottleneck for running ActionScript on the server. Of course this could change based on your game but my game does do some logic calculations each frame and sends a lot of messages out each 250ms, which is representative of, a big set of use cases.</p>
<p>My final conclusion: Using Tamarin is a very promising approach to using ActionScript on the server, especially for gaming. The pieces have been around for a while but the know-how is not so prevalent in the ActionScript community. If you are interested in using Tamarin for a game server let me know on twitter, <a href="http://twitter.com/renaun">@renaun</a>.</p>
                <p><center>&copy; %FIRST Erickson - visit the <a href="http://www.renaun.com">&lt;renaun.com:flexblog text="{ ModelLocator.myThoughts }"/&gt;</a> </center></p>            ]]></content:encoded>
			<wfw:commentRss>http://renaun.com/blog/2012/04/my-actionscript-game-server-with-15000-concurrent-connections/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Using Fullscreen Interactive and Mouse Lock in Flash Player 11.3</title>
		<link>http://renaun.com/blog/2012/04/using-fullscreen-interactive-and-mouse-lock-in-flash-player-11-3/</link>
		<comments>http://renaun.com/blog/2012/04/using-fullscreen-interactive-and-mouse-lock-in-flash-player-11-3/#comments</comments>
		<pubDate>Tue, 24 Apr 2012 18:20:14 +0000</pubDate>
		<dc:creator>Renaun Erickson</dc:creator>
				<category><![CDATA[Gaming]]></category>

		<guid isPermaLink="false">http://renaun.com/blog/?p=1679</guid>
		<description><![CDATA[Fullscreen Interactive Feature In Flash Player 11.3 (currently in beta on labs.adobe.com) there is a new feature that allows applications to use full keyboard input in fullscreen mode. To use the new fullscreen interactive feature you must first set the "allowFullscreenInteractive=true" value in the HTML embed code. Then in ActionScript you set the display state [...]]]></description>
			<content:encoded><![CDATA[<h3>Fullscreen Interactive Feature</h3>
<p>In Flash Player 11.3 (currently in beta on <a href="http://labs.adobe.com/technologies/flashplatformruntimes/flashplayer11-3/">labs.adobe.com</a>) there is a new feature that allows applications to use full keyboard input in fullscreen mode. </p>
<p>To use the new fullscreen interactive feature you must first set the "allowFullscreenInteractive=true" value in the HTML embed code. Then in ActionScript you set the display state correctly, <code>stage.displayState = StageDisplayState.FULL_SCREEN_INTERACTIVE;</code>, to launch the application into fullscreen interactive mode. This mode presents the user with a slightly different overlay then normal fullscreen mode. It presents the user with an overlay that has an "Allow" button which must be clicked before entering the fullscreen interactive mode. Here is what it looks like:</p>
<p><a href="http://renaun.com/blog/wp-content/uploads/2012/04/fullscreenallow.png"><img src="http://renaun.com/blog/wp-content/uploads/2012/04/fullscreenallow-300x30.png" alt="" title="Fullscreen Allow Button" width="300" height="30" class="aligncenter size-medium wp-image-1680" /></a></p>
<p>As a developer you can listen for the new <code>FullScreenEvent.FULL_SCREEN_INTERACTIVE_ACCEPTED</code> event to know when the user has clicked the allowed button.</p>
<h3>Mouse Lock Feature</h3>
<p>The mouse lock feature is supported in Flash Player 11.2 and beyond. You can only turn on mouse lock, <code>stage.mouseLock = true</code>, while in any fullscreen mode. There is a bug in 11.3 that will be fixed for 11.4 that I'll explain and show a workaround for 11.3. Since you can only use it in fullscreen mode, it makes sense to set <code>stage.mouseLock = true</code> in the function handler for the <code>FullScreenEvent.FULL_SCREEN_INTERACTIVE_ACCEPTED</code> event. This is where the bug is, if you do set <code>stage.mouseLock = true</code> in that function handler it will not get set correctly, it stays equal to false. That means you have to wait a frame or some amount of time before setting it. In <a href="https://github.com/renaun/ActionScriptExamples/tree/master/FullscreenInteractiveMouseLock">my code example on github</a> I add a flag and then listen on <code>MOUSE_MOVE</code>, which I am doing anyways, to set <code>stage.mouseLock = true</code>. Here is a code snippet:</p>
<div class="igBar"><span id="lactionscript-6"><a href="#" onclick="javascript:showPlainTxt('actionscript-6'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT:</span>
<div id="actionscript-6">
<div class="actionscript">protected <span style="color: #000000; font-weight: bold;">function</span> mouseMoveHandler<span style="color: #66cc66;">&#40;</span>event:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>isFirstTime == <span style="color: #000000; font-weight: bold;">true</span> &amp;&amp; <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">mouseLock</span> == <span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#123;</span><br />
isFirstTime = <span style="color: #000000; font-weight: bold;">false</span>;<br />
errorMessage.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">"here: "</span> + <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">mouseLock</span>;<br />
<span style="color: #0066CC;">stage</span>.<span style="color: #006600;">mouseLock</span> = <span style="color: #000000; font-weight: bold;">true</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">stage</span>.<span style="color: #006600;">mouseLock</span><span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#123;</span><br />
errorMessage.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">"here: "</span> + event.<span style="color: #006600;">movementX</span>;<br />
deltaX = event.<span style="color: #006600;">movementX</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #b1b100;">else</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">//deltaX = event.stageX - lastX;</span><br />
<span style="color: #808080; font-style: italic;">//lastX = event.stageX;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></p>
<p>protected <span style="color: #000000; font-weight: bold;">function</span> fullscreenHandler<span style="color: #66cc66;">&#40;</span>event:FullScreenEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>event.<span style="color: #0066CC;">type</span> == FullScreenEvent.<span style="color: #006600;">FULL_SCREEN_INTERACTIVE_ACCEPTED</span><span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#123;</span><br />
isFirstTime = <span style="color: #000000; font-weight: bold;">true</span>;<br />
<span style="color: #808080; font-style: italic;">//*****</span><br />
<span style="color: #808080; font-style: italic;">// For Cyril (Flash Player 11.3) this is a bug that mouseLock does not get set to true,</span><br />
<span style="color: #808080; font-style: italic;">// The workaround is using isFirstTime approach</span><br />
<span style="color: #808080; font-style: italic;">// Flash Player 11.4 will have a fix for this behavior</span><br />
<span style="color: #808080; font-style: italic;">//*****</span><br />
<span style="color: #0066CC;">stage</span>.<span style="color: #006600;">mouseLock</span> = <span style="color: #000000; font-weight: bold;">true</span>;</p>
<p><span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"["</span>+event.<span style="color: #0066CC;">type</span>+<span style="color: #ff0000;">"]Set mouse lock: "</span> + <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">mouseLock</span><span style="color: #66cc66;">&#41;</span>;<br />
errorMessage.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">"["</span>+event.<span style="color: #0066CC;">type</span>+<span style="color: #ff0000;">"]Set mouse lock: "</span> + <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">mouseLock</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #b1b100;">else</span><br />
<span style="color: #66cc66;">&#123;</span><br />
isFirstTime = <span style="color: #000000; font-weight: bold;">false</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div>
</div>
</div>
<p></p>
<p>The full source as a Flash Builder 4.6 project, with modified index.template.html, -swf-version, and latest playerglobal.swc for 11.3 is located on <a href="https://github.com/renaun/ActionScriptExamples/tree/master/FullscreenInteractiveMouseLock">my github repo here.</a></p>
<p>Here is a running version of the example - <a href="http://renaun.com/flash/fullscreeninteractivemouselock/">http://renaun.com/flash/fullscreeninteractivemouselock/</a></p>
                <p><center>&copy; %FIRST Erickson - visit the <a href="http://www.renaun.com">&lt;renaun.com:flexblog text="{ ModelLocator.myThoughts }"/&gt;</a> </center></p>            ]]></content:encoded>
			<wfw:commentRss>http://renaun.com/blog/2012/04/using-fullscreen-interactive-and-mouse-lock-in-flash-player-11-3/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>How To Know That Your Flash Content Requires a Premium Feature License</title>
		<link>http://renaun.com/blog/2012/03/how-to-know-that-your-flash-content-requires-a-premium-feature-license/</link>
		<comments>http://renaun.com/blog/2012/03/how-to-know-that-your-flash-content-requires-a-premium-feature-license/#comments</comments>
		<pubDate>Thu, 29 Mar 2012 18:40:57 +0000</pubDate>
		<dc:creator>Renaun Erickson</dc:creator>
				<category><![CDATA[Adobe Flash Platform]]></category>
		<category><![CDATA[Gaming]]></category>

		<guid isPermaLink="false">http://renaun.com/blog/?p=1663</guid>
		<description><![CDATA[A license is needed for your SWF if it uses premium features. The current premium feature that requires a license is a SWF that makes use of Stage3D and ApplicationDomain.domainMemory APIs at the same time. If only one is used without the other a license is not required. Still not sure if your application requires [...]]]></description>
			<content:encoded><![CDATA[<p>A license is needed for your SWF if it uses premium features. The current premium feature that requires a license is a SWF that makes use of <code>Stage3D</code> and <code>ApplicationDomain.domainMemory</code> APIs at the same time. If only one is used without the other a license is not required.</p>
<p>Still not sure if your application requires the license? Well there is a way to find out with using a <a href="http://www.adobe.com/support/flashplayer/downloads.html">debug version of Flash Player</a>. Starting with Flash Player 11.2 you will get a message that is rendered on top of your SWF if you require a license. Here is what it looks like:</p>
<div id="attachment_1667" class="wp-caption aligncenter" style="width: 464px"><a href="http://renaun.com/blog/wp-content/uploads/2012/03/WatermarkPremiumFeatures1.png"><img src="http://renaun.com/blog/wp-content/uploads/2012/03/WatermarkPremiumFeatures1.png" alt="" title="Premium Features Watermark" width="454" height="279" class="size-full wp-image-1667" /></a><p class="wp-caption-text">Premium Features Watermark</p></div>
<p>And here is the code to force the watermark:</p>
<div class="igBar"><span id="lactionscript-12"><a href="#" onclick="javascript:showPlainTxt('actionscript-12'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT:</span>
<div id="actionscript-12">
<div class="actionscript">package<br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">system</span>.<span style="color: #006600;">ApplicationDomain</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #006600;">ByteArray</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #006600;">Endian</span>;</p>
<p><span style="color: #66cc66;">&#91;</span>SWF<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">"320"</span>,<span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">"160"</span>,<span style="color: #0066CC;">backgroundColor</span>=<span style="color: #ff0000;">"0x333333"</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> PremiumFeatureCheck <span style="color: #0066CC;">extends</span> Sprite<br />
<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> PremiumFeatureCheck<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; addEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ADDED_TO_STAGE</span>, addedToStageHandler<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">function</span> addedToStageHandler<span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Stage3Ds Lenght: "</span> + <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stage3Ds</span>.<span style="color: #0066CC;">length</span> + <span style="color: #ff0000;">""</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stage3Ds</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">CONTEXT3D_CREATE</span>, initStage3D <span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stage3Ds</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">requestContext3D</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> testData:ByteArray = <span style="color: #000000; font-weight: bold;">new</span> ByteArray<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; testData.<span style="color: #006600;">endian</span> = Endian.<span style="color: #006600;">LITTLE_ENDIAN</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; testData.<span style="color: #0066CC;">length</span>=0xffff*<span style="color: #cc66cc;">4</span>; <span style="color: #808080; font-style: italic;">//4bytes</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; ApplicationDomain.<span style="color: #006600;">currentDomain</span>.<span style="color: #006600;">domainMemory</span>=testData;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> testValue:<span style="color: #0066CC;">int</span>=<span style="color: #cc66cc;">123</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; ApplicationDomain.<span style="color: #006600;">currentDomain</span>.<span style="color: #006600;">domainMemory</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span> = testValue;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> readValue:<span style="color: #0066CC;">int</span> = ApplicationDomain.<span style="color: #006600;">currentDomain</span>.<span style="color: #006600;">domainMemory</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>readValue+<span style="color: #ff0000;">""</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #808080; font-style: italic;">//should print 123&nbsp; </span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">function</span> initStage3D<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> context3D:<span style="color: #0066CC;">Object</span> = <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stage3Ds</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">context3D</span>; <br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div>
</div>
</div>
<p></p>
<p>If you comment out "stage.stage3Ds[0].requestContext3D(); " or remove the domainMemory lines of code you will not see this watermark.<br />
<em><br />
<strong>NOTE</strong>: If you get a context3D error you need to make sure you have swf-version=13 and wmode="direct" <a href="http://renaun.com/blog/2011/12/an-approach-to-setting-wmode-for-stage3d-project-in-flash-builder/">set up properly to run Stage3D content</a>.</em></p>
<p><span id="more-1663"></span><br />
It's also important to note that the watermark doesn't show up until the features are used in your code. Take this code example:</p>
<div class="igBar"><span id="lactionscript-13"><a href="#" onclick="javascript:showPlainTxt('actionscript-13'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT:</span>
<div id="actionscript-13">
<div class="actionscript">package<br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">MouseEvent</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">system</span>.<span style="color: #006600;">ApplicationDomain</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #006600;">ByteArray</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #006600;">Endian</span>;</p>
<p><span style="color: #66cc66;">&#91;</span>SWF<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">"400"</span>,<span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">"160"</span>,<span style="color: #0066CC;">backgroundColor</span>=<span style="color: #ff0000;">"0x333333"</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> PremiumFeatureCheck <span style="color: #0066CC;">extends</span> Sprite<br />
<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> PremiumFeatureCheck<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; addEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ADDED_TO_STAGE</span>, addedToStageHandler<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">function</span> addedToStageHandler<span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Stage3Ds Lenght: "</span> + <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stage3Ds</span>.<span style="color: #0066CC;">length</span> + <span style="color: #ff0000;">""</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stage3Ds</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">CONTEXT3D_CREATE</span>, initStage3D <span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stage3Ds</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">requestContext3D</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>, useDomainMemory<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">function</span> initStage3D<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> context3D:<span style="color: #0066CC;">Object</span> = <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stage3Ds</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">context3D</span>; <br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">function</span> useDomainMemory<span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> testData:ByteArray = <span style="color: #000000; font-weight: bold;">new</span> ByteArray<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; testData.<span style="color: #006600;">endian</span> = Endian.<span style="color: #006600;">LITTLE_ENDIAN</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; testData.<span style="color: #0066CC;">length</span>=0xffff*<span style="color: #cc66cc;">4</span>; <span style="color: #808080; font-style: italic;">//4bytes</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; ApplicationDomain.<span style="color: #006600;">currentDomain</span>.<span style="color: #006600;">domainMemory</span>=testData;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> testValue:<span style="color: #0066CC;">int</span>=<span style="color: #cc66cc;">123</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; ApplicationDomain.<span style="color: #006600;">currentDomain</span>.<span style="color: #006600;">domainMemory</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span> = testValue;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> readValue:<span style="color: #0066CC;">int</span> = ApplicationDomain.<span style="color: #006600;">currentDomain</span>.<span style="color: #006600;">domainMemory</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>readValue+<span style="color: #ff0000;">""</span><span style="color: #66cc66;">&#41;</span>;<span style="color: #808080; font-style: italic;">//should print 123&nbsp; </span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div>
</div>
</div>
<p></p>
<p>The watermark will only show up once the <code>domainMemory</code> chunk of code is ran after clicking on the stage. </p>
<p>Here is another scenario, SWFMain.swf loads both SWFStage3DAPI.swf and SWFDomainMemory.swf, do you need a license? Yes you do, the water shows up and stays (even if you try and unload) after you have run API calls for Stage3D or ApplicationDomain.domainMemory regardless if they are from the main SWF or loaded SWFs. If you want to try it out yourself here is the source code:</p>
<p>SWFMain.as</p>
<div class="igBar"><span id="lactionscript-14"><a href="#" onclick="javascript:showPlainTxt('actionscript-14'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT:</span>
<div id="actionscript-14">
<div class="actionscript">package<br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">DisplayObjectContainer</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Loader</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">MouseEvent</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLLoader</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLRequest</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">text</span>.<span style="color: #0066CC;">TextField</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">text</span>.<span style="color: #0066CC;">TextFormat</span>;</p>
<p><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> SWFMain <span style="color: #0066CC;">extends</span> Sprite<br />
<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> SWFMain<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; addEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ADDED_TO_STAGE</span>, addedToStageHandler<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; format = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextFormat</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; format.<span style="color: #0066CC;">size</span> = <span style="color: #cc66cc;">24</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; format.<span style="color: #0066CC;">color</span> = 0xffffff;<br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> loaderStage3D:Loader;<br />
&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> loaderDomainMemory:Loader;<br />
&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> format:<span style="color: #0066CC;">TextFormat</span>;<br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">function</span> addedToStageHandler<span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #808080; font-style: italic;">// Create buttons</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> s:Sprite = createButton<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Load Stage3D SWF"</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; s.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">10</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; s.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">10</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; s = createButton<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Load DomainMemory SWF"</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; s.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">10</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; s.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">60</span>;<br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">function</span> createButton<span style="color: #66cc66;">&#40;</span>label:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:Sprite<br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">text</span>:<span style="color: #0066CC;">TextField</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextField</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">text</span>.<span style="color: #006600;">defaultTextFormat</span> = format;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">text</span>.<span style="color: #0066CC;">text</span> = label;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">text</span>.<span style="color: #0066CC;">width</span> = <span style="color: #cc66cc;">200</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> s:Sprite = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; s.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">beginFill</span><span style="color: #66cc66;">&#40;</span>0x222222, <span style="color: #cc66cc;">0</span>.<span style="color: #cc66cc;">8</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; s.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">lineStyle</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span>,0x000000<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; s.<span style="color: #006600;">graphics</span>.<span style="color: #006600;">drawRect</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">240</span>, <span style="color: #cc66cc;">40</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; s.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">endFill</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; s.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>, clickHandler<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; s.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">text</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">text</span>.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">10</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">text</span>.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">8</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; addChild<span style="color: #66cc66;">&#40;</span>s<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">return</span> s;<br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">function</span> clickHandler<span style="color: #66cc66;">&#40;</span>event:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> t:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">""</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">currentTarget</span> is Sprite<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; t = <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>event.<span style="color: #006600;">currentTarget</span> as DisplayObjectContainer<span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">getChildAt</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span> as <span style="color: #0066CC;">TextField</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #0066CC;">text</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"Click handler:"</span> + t<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>t == <span style="color: #ff0000;">"Load Stage3D SWF"</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>loaderStage3D<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; loaderStage3D.<span style="color: #006600;">unloadAndStop</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; loaderStage3D = <span style="color: #000000; font-weight: bold;">null</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; loaderStage3D = <span style="color: #000000; font-weight: bold;">new</span> Loader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; loaderStage3D.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"SWFStage3DAPI.swf"</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; loaderStage3D.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">40</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; loaderStage3D.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">160</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addChild<span style="color: #66cc66;">&#40;</span>loaderStage3D<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>t == <span style="color: #ff0000;">"Load DomainMemory SWF"</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>loaderDomainMemory<span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; loaderDomainMemory.<span style="color: #006600;">unloadAndStop</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; loaderDomainMemory = <span style="color: #000000; font-weight: bold;">null</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">else</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; loaderDomainMemory = <span style="color: #000000; font-weight: bold;">new</span> Loader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; loaderDomainMemory.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"SWFDomainMemory.swf"</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; loaderDomainMemory.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">40</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; loaderDomainMemory.<span style="color: #006600;">y</span> = <span style="color: #cc66cc;">200</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; addChild<span style="color: #66cc66;">&#40;</span>loaderDomainMemory<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div>
</div>
</div>
<p></p>
<p>Here is the SWFStage3DAPI.as</p>
<div class="igBar"><span id="lactionscript-15"><a href="#" onclick="javascript:showPlainTxt('actionscript-15'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT:</span>
<div id="actionscript-15">
<div class="actionscript">package <br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;</p>
<p><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> SWFStage3DAPI <span style="color: #0066CC;">extends</span> Sprite<br />
<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> SWFStage3DAPI<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; addEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ADDED_TO_STAGE</span>, addedToStageHandler<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">function</span> addedToStageHandler<span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; graphics.<span style="color: #0066CC;">beginFill</span><span style="color: #66cc66;">&#40;</span>0x0000ff<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; graphics.<span style="color: #006600;">drawRect</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">10</span>, <span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; graphics.<span style="color: #0066CC;">endFill</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"SWFStage3DAPI - Stage3Ds Lenght: "</span> + <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stage3Ds</span>.<span style="color: #0066CC;">length</span> + <span style="color: #ff0000;">""</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stage3Ds</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">CONTEXT3D_CREATE</span>, initStage3D <span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stage3Ds</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">requestContext3D</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; <br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">function</span> initStage3D<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span> <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">stage</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> context3D:<span style="color: #0066CC;">Object</span> = <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stage3Ds</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">context3D</span>; <br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div>
</div>
</div>
<p></p>
<p>Here is the SWFDomainMemory.as</p>
<div class="igBar"><span id="lactionscript-16"><a href="#" onclick="javascript:showPlainTxt('actionscript-16'); return false;">PLAIN TEXT</a></span></div>
<div class="syntax_hilite"><span class="langName">ACTIONSCRIPT:</span>
<div id="actionscript-16">
<div class="actionscript">package <br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">system</span>.<span style="color: #006600;">ApplicationDomain</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #006600;">ByteArray</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #006600;">Endian</span>;</p>
<p><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> SWFDomainMemory <span style="color: #0066CC;">extends</span> Sprite<br />
<span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> SWFDomainMemory<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; addEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ADDED_TO_STAGE</span>, addedToStageHandler<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
&nbsp; &nbsp; <br />
&nbsp; &nbsp; protected <span style="color: #000000; font-weight: bold;">function</span> addedToStageHandler<span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; graphics.<span style="color: #0066CC;">beginFill</span><span style="color: #66cc66;">&#40;</span>0xff0000<span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; graphics.<span style="color: #006600;">drawRect</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">10</span>, <span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; graphics.<span style="color: #0066CC;">endFill</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> testData:ByteArray = <span style="color: #000000; font-weight: bold;">new</span> ByteArray<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; testData.<span style="color: #006600;">endian</span> = Endian.<span style="color: #006600;">LITTLE_ENDIAN</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; testData.<span style="color: #0066CC;">length</span>=0xffff*<span style="color: #cc66cc;">4</span>; <span style="color: #808080; font-style: italic;">//4bytes</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <br />
&nbsp; &nbsp; &nbsp; &nbsp; ApplicationDomain.<span style="color: #006600;">currentDomain</span>.<span style="color: #006600;">domainMemory</span>=testData;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> testValue:<span style="color: #0066CC;">int</span>=<span style="color: #cc66cc;">123</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; ApplicationDomain.<span style="color: #006600;">currentDomain</span>.<span style="color: #006600;">domainMemory</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span> = testValue;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #000000; font-weight: bold;">var</span> readValue:<span style="color: #0066CC;">int</span> = ApplicationDomain.<span style="color: #006600;">currentDomain</span>.<span style="color: #006600;">domainMemory</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>;<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">"SWFDomainMemroy "</span> + readValue<span style="color: #66cc66;">&#41;</span>;<span style="color: #808080; font-style: italic;">//should print 123 </span><br />
&nbsp; &nbsp; <span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div>
</div>
</div>
<p></p>
                <p><center>&copy; %FIRST Erickson - visit the <a href="http://www.renaun.com">&lt;renaun.com:flexblog text="{ ModelLocator.myThoughts }"/&gt;</a> </center></p>            ]]></content:encoded>
			<wfw:commentRss>http://renaun.com/blog/2012/03/how-to-know-that-your-flash-content-requires-a-premium-feature-license/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Epic Games Unreal Engine in the Browser Try For Yourself</title>
		<link>http://renaun.com/blog/2012/03/epic-games-unreal-engine-in-the-browser-try-for-yourself/</link>
		<comments>http://renaun.com/blog/2012/03/epic-games-unreal-engine-in-the-browser-try-for-yourself/#comments</comments>
		<pubDate>Thu, 08 Mar 2012 06:37:45 +0000</pubDate>
		<dc:creator>Renaun Erickson</dc:creator>
				<category><![CDATA[Adobe Flash Platform]]></category>
		<category><![CDATA[Gaming]]></category>

		<guid isPermaLink="false">http://renaun.com/blog/?p=1646</guid>
		<description><![CDATA[You can now try out the Epic Games Unreal engine running in the browser for yourself. All you need is the Flash Player 11.2 RC installed and then go to the http://unrealengine.com/flash/ website. Here is a screenshot of it running in Chrome on my MacBook Pro: Mark Rein form Epic Games talks about the latest [...]]]></description>
			<content:encoded><![CDATA[<p>You can now try out the Epic Games Unreal engine running in the browser for yourself. All you need is the <a href="http://labs.adobe.com/technologies/flashplatformruntimes/flashplayer11-2/">Flash Player 11.2 RC</a> installed and then go to the <a href="http://unrealengine.com/flash/">http://unrealengine.com/flash/</a> website.</p>
<p>Here is a screenshot of it running in Chrome on my MacBook Pro:<br />
<a href="http://renaun.com/blog/wp-content/uploads/2012/03/unrealbrowser.png"><img src="http://renaun.com/blog/wp-content/uploads/2012/03/unrealbrowser2.png" alt="" title="Epic&#039;s Unreal Citadel in the Browser" width="540" height="334" class="aligncenter size-full wp-image-1648" /></a></p>
<p><a href="http://venturebeat.com/2012/03/07/browser-based-games-get-real-3d-graphics-with-latest-unreal-engine-and-flash-technology/">Mark Rein form Epic Games talks about the latest Unreal demo at GDC.</a></p>
<p>At the Adobe GDC booth you can also see us show off Dungeon Defenders by Trendy which also uses the Unreal engine.<br />
<a href="http://twitpic.com/8t9l2u" title="Look at what I playing at GDC in the Adobe booth on Twitpic"><img src="http://twitpic.com/show/thumb/8t9l2u.jpg" width="150" height="150" alt="Look at what I playing at GDC in the Adobe booth on Twitpic"></a></p>
<p>What does all this mean? Check out <a href="http://gaming.adobe.com">http://gaming.adobe.com</a> for some more ideas of how AIR and Flash enable game developers to create great content.</p>
                <p><center>&copy; %FIRST Erickson - visit the <a href="http://www.renaun.com">&lt;renaun.com:flexblog text="{ ModelLocator.myThoughts }"/&gt;</a> </center></p>            ]]></content:encoded>
			<wfw:commentRss>http://renaun.com/blog/2012/03/epic-games-unreal-engine-in-the-browser-try-for-yourself/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Flash Game Summit 2012</title>
		<link>http://renaun.com/blog/2012/03/flash-game-summit-2012/</link>
		<comments>http://renaun.com/blog/2012/03/flash-game-summit-2012/#comments</comments>
		<pubDate>Wed, 07 Mar 2012 03:05:40 +0000</pubDate>
		<dc:creator>Renaun Erickson</dc:creator>
				<category><![CDATA[Adobe Flash Platform]]></category>
		<category><![CDATA[Gaming]]></category>

		<guid isPermaLink="false">http://renaun.com/blog/?p=1632</guid>
		<description><![CDATA[Flash Game Summit is held before the big Game Developer Conference (GDC). The 2012 Flash Game Summit was a great turn out, with a wide variety of attendees. Because you get a crowd that usually comes in for GDC from around the world Flash Game Summit has people and companies from all over the world. [...]]]></description>
			<content:encoded><![CDATA[<p>Flash Game Summit is held before the big Game Developer Conference (GDC). The 2012 Flash Game Summit was a great turn out, with a wide variety of attendees. Because you get a crowd that usually comes in for GDC from around the world Flash Game Summit has people and companies from all over the world.</p>
<p>Adobe is a sponsor and this year they provided live streaming as well as recordings of the sessions. So if you were not able to attend in person you can catch some of the latest topics around gaming with the Flash platform. There were two rooms with with session through the day so here they are separate by room:</p>
<style>
table td {  border: 1px solid #333333 }
table tr.even { background: #BBBBBB; }
</style>
<table width="525" style="border: 1px solid rgb(51, 51, 51);">
<tr style="background: none repeat scroll 0% 0% rgb(85, 85, 85); color: rgb(238, 238, 238);">
<th>Title</th>
<th>Speaker</th>
<th>Recording</th>
</tr>
<tr style="background: none repeat scroll 0% 0% rgb(85, 85, 85); color: rgb(238, 238, 238);">
<th colspan="3">Robertson Auditorium</th>
</tr>
<tr>
<td>Welcome</td>
<td>Josh Larson</td>
<td><a href="http://partners-ar.adobeconnect.com/p10j7raiidd/">http://partners-ar.adobeconnect.com/p10j7raiidd/</a></td>
</tr>
<tr class="even">
<td>Flash The Next Generation</td>
<td>Lee Brimelow / Thibault Imbert</td>
<td><a href="http://partners-ar.adobeconnect.com/p84glz9113f/">http://partners-ar.adobeconnect.com/p84glz9113f/</a></td>
</tr>
<tr>
<td>SAS:  Zombie Assault 3</td>
<td>Chris Harris / Jonathan Hopcroft</td>
<td><a href="http://partners-ar.adobeconnect.com/p5g1mwjvvcu/">http://partners-ar.adobeconnect.com/p5g1mwjvvcu/</a></td>
</tr>
<tr class="even">
<td>Mobile Gaming Goes Boarderless</td>
<td>Peter Relan / Suran Markosian / Ben Savage</td>
<td><a href="http://partners-ar.adobeconnect.com/p8tzebm31ge/">http://partners-ar.adobeconnect.com/p8tzebm31ge/</a></td>
</tr>
<tr>
<td>Mochis Award Show</td>
<td>Sponsored By Armored Games</td>
<td><a href="http://partners-ar.adobeconnect.com/p515odcc3xo/">http://partners-ar.adobeconnect.com/p515odcc3xo/</a></td>
</tr>
<tr class="even">
<td>Kingdom Rush</td>
<td>Alvaro Azofra / Gonzalo Sande / Pablo Realini</td>
<td><a href="http://partners-ar.adobeconnect.com/p2am4xm3asx/">http://partners-ar.adobeconnect.com/p2am4xm3asx/</a></td>
</tr>
<tr>
<td>For Your Ice Onlye</td>
<td>Reece Millidge</td>
<td><a href="http://partners-ar.adobeconnect.com/p3fdn7cvzy4/">http://partners-ar.adobeconnect.com/p3fdn7cvzy4/</a></td>
</tr>
<tr class="even">
<td>It's The End of The World And We Know it.</td>
<td>Ben Garney</td>
<td><a href="http://partners-ar.adobeconnect.com/p9dh8z22yjw/">http://partners-ar.adobeconnect.com/p9dh8z22yjw/</a></td>
</tr>
<tr>
<td>It's A Long Way to The Top</td>
<td>David Scott / Paul Preece</td>
<td><a href="http://partners-ar.adobeconnect.com/p20c2imvu74/">http://partners-ar.adobeconnect.com/p20c2imvu74/</a></td>
</tr>
<tr class="even">
<td>Chasing China</td>
<td>Chris Shen</td>
<td><a href="http://partners-ar.adobeconnect.com/p5vzvma4a11/">http://partners-ar.adobeconnect.com/p5vzvma4a11/</a></td>
</tr>
<tr style="background: none repeat scroll 0% 0% rgb(85, 85, 85); color: rgb(238, 238, 238);">
<th colspan="3">Fisher Room</th>
</tr>
<tr>
<td>Panel: Flash Development Life 2012</td>
<td>Moderated by: Ethan Levy, Producer, BioWare San Francisco  Panelists: Sean McGee, Developer, Diseased ProductionsAndrew Sega, Lead Engineer, Sojo StudiosDan Stradwick, Developer, Monstrum</td>
<td><a href="http://partners-ar.adobeconnect.com/p9ewajrc1fq/">http://partners-ar.adobeconnect.com/p9ewajrc1fq/</a></td>
</tr>
<tr class="even">
<td>Two Dimensions of Awesome: Advanced ActionScript for Platform Games</td>
<td>Iain Lobb, Managing Creative Director, Dull Dude Ltd.</td>
<td><a href="http://partners-ar.adobeconnect.com/p71gwods77j/">http://partners-ar.adobeconnect.com/p71gwods77j/</a></td>
</tr>
<tr>
<td>Getting Some Perspective: Away3D 4.0 &#038; Friends</td>
<td>Rob Bateman, Co-Founder, Away 3D</td>
<td><a href="http://partners-ar.adobeconnect.com/p3qpzsv9gw7/">http://partners-ar.adobeconnect.com/p3qpzsv9gw7/</a></td>
</tr>
<tr class="even">
<td>Going Mobile</td>
<td>Nate Beck, Principal Architect, ZaaLabs, Ltd.</td>
<td><a href="http://partners-ar.adobeconnect.com/p4k55h49x30/">http://partners-ar.adobeconnect.com/p4k55h49x30/</a></td>
</tr>
<tr>
<td>Winning With Audio</td>
<td>Selcuk Bor, CEO &#038; Founder, Symphony of Specters</td>
<td><a href="http://partners-ar.adobeconnect.com/p3ja0j9hl6m/">http://partners-ar.adobeconnect.com/p3ja0j9hl6m/</a></td>
</tr>
<tr class="even">
<td>Ponycorns &#038; The Price of Popularity</td>
<td>Ryan Henson Creighton, President, Untold Entertainment Inc.</td>
<td><a href="http://partners-ar.adobeconnect.com/p12ns4cb8l6/">http://partners-ar.adobeconnect.com/p12ns4cb8l6/</a></td>
</tr>
<tr>
<td>Screenplay</td>
<td>Tom Vian, Freelance Game Developer, Super Flash Bros.</td>
<td><a href="http://partners-ar.adobeconnect.com/p43hdz1tfs6/">http://partners-ar.adobeconnect.com/p43hdz1tfs6/</a></td>
</tr>
</table>
<p></br></br><br />
Some take a ways for me after talking with people at the conference are there are still alot of students that are building Flash games. Although they say their teachers and schools could use some more love. If you have a large student base and doing senior gaming projects, and are thinking of using Flash as the platform feel free to reach out to me and I'll try and help as much as I can. Next thing I noticed is people are building a lot of Flash games, but people are still not quite using Stage3D in mainstream. This is for various reasons, dev cycles, Flash Player runtime releases, mobile AIR 3.2, etc... but uniformly people want to get their Flash games seen. So again if you have some great looking content, using the latest Flash Player features the better, send them my way and I'll take a look.</p>
<p>Good luck and on to a great future of Flash gaming. And if you are looking for some of the latest info check out <a href="http://partners-ar.adobeconnect.com/p84glz9113f/">Lee and Thibault session</a> above. And the new <a href="http://gaming.adobe.com">http://gaming.adobe.com</a> site to participate in the telling of the Flash for gaming story.</p>
                <p><center>&copy; %FIRST Erickson - visit the <a href="http://www.renaun.com">&lt;renaun.com:flexblog text="{ ModelLocator.myThoughts }"/&gt;</a> </center></p>            ]]></content:encoded>
			<wfw:commentRss>http://renaun.com/blog/2012/03/flash-game-summit-2012/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

