<?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>K2xL &#187; Actionscript 3.0</title>
	<atom:link href="http://k2xl.com/wordpress/category/actionscript-30/feed/" rel="self" type="application/rss+xml" />
	<link>http://k2xl.com/wordpress</link>
	<description>Just another WordPress site</description>
	<lastBuildDate>Sat, 28 Apr 2012 19:02:43 +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>Auto create polygon AS3</title>
		<link>http://k2xl.com/wordpress/auto-create-polygon-as3/</link>
		<comments>http://k2xl.com/wordpress/auto-create-polygon-as3/#comments</comments>
		<pubDate>Sun, 03 Jul 2011 01:12:29 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[auto generate polygon from points]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[polygon]]></category>

		<guid isPermaLink="false">http://k2xl.com/wordpress/?p=339</guid>
		<description><![CDATA[Made a Flash on Wonderfl the other day. My friend studying for his PhD at Georgia Tech in architecture called me regarding a problem. He said, &#8220;I need to program something to create a polygon from points. Right now, the points are not being drawn in the right order so lines are being overlapped. How [...]]]></description>
			<content:encoded><![CDATA[<p>Made a Flash on <a href="http://www.wonderfl.com">Wonderfl</a> the other day.</p>
<p>My friend studying for his PhD at Georgia Tech in architecture called me regarding a problem. He said, </p>
<blockquote><p>&#8220;I need to program something to create a polygon from points. Right now, the points are not being drawn in the right order so lines are being overlapped. How do I have the program draw them in the right order?&#8221;
</p></blockquote>
<p>So I came up with a theory of how to do it. The idea is that you find the average point between the points, and from that point you find the arc tangent to each of the points and order the points based on their angle to the center. This idea would only work in 2D, but I&#8217;m sure there is a general way to do it for all dimensions.</p>
<p>Here is the code written in actionscript. You can click to add a point and ctrl+click to delete a point. I put it on wonderfl because I am thinking some people could fork some more interesting things from it.<br />
<script type="text/javascript" src="http://wonderfl.net/blogparts/ytQj/js"></script>
<p class="ttlBpWonderfl" style="width: 465px; margin: 0; text-align: right; font-size: 11px;"><a href="http://wonderfl.net/c/ytQj" title="Auto create Polygon">Auto create Polygon &#8211; wonderfl build flash online</a></p>
]]></content:encoded>
			<wfw:commentRss>http://k2xl.com/wordpress/auto-create-polygon-as3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>JavaScript Function declaration cautions!</title>
		<link>http://k2xl.com/wordpress/javascript-function-declaration-cautions/</link>
		<comments>http://k2xl.com/wordpress/javascript-function-declaration-cautions/#comments</comments>
		<pubDate>Thu, 02 Jun 2011 22:17:45 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[Javascript]]></category>

		<guid isPermaLink="false">http://k2xl.com/wordpress/?p=330</guid>
		<description><![CDATA[Just found Kontagent&#8216;s JavaScript library has a issue. When you declare functions in JavaScript as so below, the behavior isn&#8217;t as expected! Be sure to declare your dynamic functions like so: As in Actionscript (also ECMAScript based), declaring functions the first way will be global scope. And the last function defined will be the one [...]]]></description>
			<content:encoded><![CDATA[<p>Just found <a href="http://www.kontagent.com">Kontagent</a>&#8216;s JavaScript library has a issue. When you declare functions in JavaScript as so below, the behavior isn&#8217;t as expected!</p>
<pre class="brush: jscript; title: ; notranslate">
a = 5;

if (a == 5)
{
    function yo()
    {
        alert(&quot;good&quot;);
    }
}
else if (a == 6)
{
    function yo()
    {
        alert(&quot;bad&quot;);
    }
}

yo();
</pre>
<p>Be sure to declare your dynamic functions like so:</p>
<pre class="brush: jscript; title: ; notranslate">
a = 5;
var yo;
if (a == 5)
{
    yo = function()
    {
        alert(&quot;good&quot;);
    }
}
else if (a == 6)
{
    yo = function()
    {
        alert(&quot;bad&quot;);
    }
}
yo();
</pre>
<p>As in Actionscript (also ECMAScript based), declaring functions the first way will be global scope. And the last function defined will be the one that is used.</p>
<p>We were trying to debug why <a href="http://www.kontagent.com">Kontagent</a>&#8216;s library wasn&#8217;t pinging the right events (in our case Invite Sent notifications). When we investigated the code we saw they wrapped function calls inside ifs as above&#8230; Hopefully they will read this blog post and implement a fix as suggested <img src='http://k2xl.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .<br />
So be careful developers!</p>
<p>*Edit: We sent a Pull request to their github with our fix</p>
]]></content:encoded>
			<wfw:commentRss>http://k2xl.com/wordpress/javascript-function-declaration-cautions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>LocalConnection Bug in Flash Player</title>
		<link>http://k2xl.com/wordpress/localconnection-bug-in-flash-player/</link>
		<comments>http://k2xl.com/wordpress/localconnection-bug-in-flash-player/#comments</comments>
		<pubDate>Sat, 30 Apr 2011 16:19:58 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Actionscript 2.0]]></category>
		<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://k2xl.com/wordpress/?p=322</guid>
		<description><![CDATA[So I&#8217;ve had this problem for ages, and couldn&#8217;t find anyone online writing about it. LocalConnection in AS3 is used to send messages between Flash SWFs in a browser window. It&#8217;s also used as a hack to invoke garbage collection in the Flash Player. I&#8217;ve been using it in some recently applications to ensure only [...]]]></description>
			<content:encoded><![CDATA[<p>So I&#8217;ve had this problem for ages, and couldn&#8217;t find anyone online writing about it.</p>
<p><a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/LocalConnection.html">LocalConnection</a> in AS3 is used to send messages between Flash SWFs in a browser window. It&#8217;s also used as a <a href="http://www.nbilyk.com/flash-garbage-collection">hack to invoke garbage collection</a> in the Flash Player.</p>
<p>I&#8217;ve been using it in some recently applications to ensure only one instance of a SWF is loaded at a time on a computer and to display a message to a user if a window with the application is already open.</p>
<p>It&#8217;s usually be pretty straight forward.</p>
<pre class="brush: as3; title: ; notranslate">
var LocalConn:LocalConnection = new LocalConnection();
</pre>
<p>Declares it<br />
then</p>
<pre class="brush: as3; title: ; notranslate">
			try {
				LocalConn.connect(&quot;_App&quot;);
			} catch(error : ArgumentError) {
trace(&quot;Uh oh... Looks like it's already running&quot;);
				return;
			}
</pre>
<p>Only one connection string can be used at a time, and if another SWF in the another browser window (or another tab&#8230; or another browser for that matter) tries to connect that ArgumentError will be thrown.</p>
<p>Unfortunately, there is a <strong>annoying bug</strong> where sometimes, even if no other instances are open, the LocalConnection thinks someone is still running on the same connection string&#8230;</p>
<p>I&#8217;ve experienced it happening when simply testing in Flash Builder and FDT&#8230; Sometimes I am working on another part of my application when one test the application says it&#8217;s already running&#8230; I&#8217;m confused at this point because I know nothing else is running&#8230;</p>
<p>I think I&#8217;ve narrowed down <strong>WHY</strong> it happens. It seems to happen when <strong>Flash is closed unexpectedly</strong>. For example, on Google Chrome, if you run the SWF and then for some reason Flash crashes (you know&#8230; the &#8220;uh oh Flash crashed&#8221; bar that appears at the top of Chrome), it seems that the LocalConnection is <strong>never officially closed</strong>.</p>
<p>What sucks is that you either have to change the connection string or reboot your computer (restarting browsers don&#8217;t work).</p>
<p>If anyone else has experienced this or knows any fixes, please let me know in the comments. I&#8217;ve been experiencing this problem since at least Flash Player 9. I&#8217;ve reported it on <a href="https://bugs.adobe.com/flashplayer/">Adobe&#8217;s ticketing system</a>&#8230; unfortunately they don&#8217;t allow anyone to read the ticket because they restricted viewing deeming it a possible &#8220;security&#8221; flaw &#8211; but maybe if other people are experiencing the issue they will put in a fix for it.</p>
<p><strong>Update 5/10/2011</strong><br />
Qingyan Zhu from Adobe replied to my bug report:</p>
<blockquote><p>
Hi Danny,</p>
<p>Thanks for clarifying the issue.</p>
<p>But this is actually as designed.</p>
<p>So when there&#8217;s only one browser, if it crashes, then the segment gets reset, and the dangling LC endpoints get cleared.</p>
<p>But if there are two browser processes (depending, say on how IE is launched), or two processes that use LocalConnection (including any AIR app, Flash Projector, AIM, Y!IM, etc etc), then the corrupt memory segment will stick around.</p>
<p>&#8211;Qingyan</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://k2xl.com/wordpress/localconnection-bug-in-flash-player/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS3 Matrix Library</title>
		<link>http://k2xl.com/wordpress/as3-matrix-library/</link>
		<comments>http://k2xl.com/wordpress/as3-matrix-library/#comments</comments>
		<pubDate>Mon, 27 Dec 2010 15:43:56 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Actionscript 3.0]]></category>

		<guid isPermaLink="false">http://k2xl.com/wordpress/?p=317</guid>
		<description><![CDATA[I don&#8217;t know if I ever posted this, but here is an Actionscript 3.0 Matrix math library I made in college. Check out AS3 Matrix on Google Code (http://code.google.com/p/as3matrix) Some of the features it uses is caching Matrices for their operations. Does LU, QR, and SVD decompositions. Not sure how it compares to speed of other [...]]]></description>
			<content:encoded><![CDATA[<p>I don&#8217;t know if I ever posted this, but here is an Actionscript 3.0 Matrix math library I made in college. Check out <a href="http://code.google.com/p/as3matrix/">AS3 Matrix</a> on Google Code (<a href="http://code.google.com/p/as3matrix/">http://code.google.com/p/as3matrix</a>)</p>
<p>Some of the features it uses is caching Matrices for their operations. Does LU, QR, and SVD decompositions. Not sure how it compares to speed of other libraries (maybe someone can make a benchmark), but it is pretty robust (from my recollection) and is built pretty modular.</p>
<p>Let me know if you ever decide to use this library &#8211; and what you used it for <img src='http://k2xl.com/wordpress/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> .</p>
]]></content:encoded>
			<wfw:commentRss>http://k2xl.com/wordpress/as3-matrix-library/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Artistic Experiment: is feeling good #1</title>
		<link>http://k2xl.com/wordpress/flash-artistic-experiment-is-feeling-good-1/</link>
		<comments>http://k2xl.com/wordpress/flash-artistic-experiment-is-feeling-good-1/#comments</comments>
		<pubDate>Mon, 20 Apr 2009 10:03:02 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[featured]]></category>

		<guid isPermaLink="false">http://k2xl.com/wordpress/?p=235</guid>
		<description><![CDATA[Throughout the semester I developed this Flash art/simulation/game. It was originally supposed to be a game&#8230; maybe it is I don&#8217;t know it all depends on your definition. The title is called Is Feeling Good. I reserved the name IsFeelingGood.com a few months ago and thought for a while of what could possibly be on the [...]]]></description>
			<content:encoded><![CDATA[<p>Throughout the semester I developed this Flash art/simulation/game. It was originally supposed to be a game&#8230; maybe it is I don&#8217;t know it all depends on your definition. The title is called Is Feeling Good. I reserved the name IsFeelingGood.com a few months ago and thought for a while of what could possibly be on the site. )I have a basic idea of what the site will have and will post more about it later).<a href="http://www.k2xl.com/lab/isfeelinggood/1/Driver.php"><img class="alignnone" src="http://img23.imageshack.us/img23/4230/isfeelinggood1.jpg" alt="" width="708" height="446" /></a></p>
<p>Anyway, the following idea stems (literally) from procedurally created experiences. The basic instructions are:</p>
<p>1) Click and hold to collect particles to form a rain cloud.</p>
<p>2) Release to rain and grow plant on right.</p>
<p>If you give plants enough water they will finish growing and move to the left. If you don&#8217;t water the actively ungrown plant the plant will wither. If you collect too much water then your cloud will begin to leak. Hold even more and your cloud will turn to lightning and shoot down the active plant. There are also a bunch of other subtle things that I included that I&#8217;ll let you guess how works.</p>
<p>The particles come from the left in tune to the music (I use Flash 10&#8242;s sound extract() function to procedurally check the sound volume change). The trees are procedurally created and I&#8217;m happy to say that the code is highly optimized with a bunch of tricks that I used to ensure that the tree grows quickly despite a bunch of things going on screen at the same time. While creating procedurally generated trees ended up being much easier than I thought, refining the trees ended up being extremely difficult. Making a tree look like a tree is difficult to do, and I spent more time messing with the variables than actually coding it. The flash uses nearly all bitmap graphics (that&#8217;s why so many things are on the screen at the same time).</p>
<p>Remember, you need Flash 10 to view.</p>
<p><a href="http://www.k2xl.com/lab/isfeelinggood/1/Driver.php">Click here to view</a>.</p>
<p>Hope you enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://k2xl.com/wordpress/flash-artistic-experiment-is-feeling-good-1/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Soundpen</title>
		<link>http://k2xl.com/wordpress/soundpen/</link>
		<comments>http://k2xl.com/wordpress/soundpen/#comments</comments>
		<pubDate>Mon, 30 Mar 2009 05:59:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[Sound]]></category>

		<guid isPermaLink="false">http://k2xl.com/wordpress/?p=226</guid>
		<description><![CDATA[For my experimental digital art class at Georgia Tech, I created this toy I call SoundPen. It&#8217;s a very basic version obviously (although I think some cool things could come from this idea). The basic idea is to create music by clicking your mouse and placing balls that will bounce of the screen. There are [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignright" style="margin: 3px;" title="Soundpen" src="http://img256.imageshack.us/img256/7695/46644992.jpg" alt="" width="398" height="347" /></p>
<p>For my experimental digital art class at Georgia Tech, I created this toy I call SoundPen. It&#8217;s a very basic version obviously (although I think some cool things could come from this idea).</p>
<p>The basic idea is to create music by clicking your mouse and placing balls that will bounce of the screen. There are 3 different types of balls (click and press either A, S, or D).</p>
<p>I used <a href="http://www.adobe.com/devnet/flash/articles/dynamic_sound_generation/">Jeff Swartz&#8217;s algorithm</a> to change pitch of the sounds from the vertical balls. The more left the ball is on the screen the lower the pitch while the more right on the screen the higher the pitch.</p>
<p>Please be careful when using. If you place too many balls your computer might slow down rapidly. If you want to remove the last ball just press the backspace.</p>
<p>There are probably ways I could have fixed that problem (for example, using lower level PixelBender capabilities to process the sound); however, I don&#8217;t think it matters too much. You don&#8217;t want to put too many balls anyway because you&#8217;ll just hear noise.</p>
<p>(Be sure you have Flash 10!)</p>
<p><object width="400" height="400" data="http://www.k2xl.com/lab/soundpen/BallDropSound.swf" type="application/x-shockwave-flash"><param name="src" value="http://www.k2xl.com/lab/soundpen/BallDropSound.swf" /></object></p>
]]></content:encoded>
			<wfw:commentRss>http://k2xl.com/wordpress/soundpen/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Basic Random Walk in Flash</title>
		<link>http://k2xl.com/wordpress/basic-random-walk-in-flash/</link>
		<comments>http://k2xl.com/wordpress/basic-random-walk-in-flash/#comments</comments>
		<pubDate>Sun, 29 Mar 2009 22:43:27 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[algorithm]]></category>
		<category><![CDATA[draw]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[random walk]]></category>

		<guid isPermaLink="false">http://k2xl.com/wordpress/?p=221</guid>
		<description><![CDATA[Here&#8217;s a random walk program. I always wondered what the screen would look like if i had a dot move in a random direction. Click to refresh. View and fork this on WonderFl or Download the flash file here.]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a random walk program. I always wondered what the screen would look like if i had a dot move in a random direction.</p>
<p>Click to refresh.</p>
<p><object width="512" height="512" data="http://www.k2xl.com/lab/randomwalk/RandomWalk.swf" type="application/x-shockwave-flash"><param name="src" value="http://www.k2xl.com/lab/randomwalk/RandomWalk.swf" /></object></p>
<p><a href="http://wonderfl.kayac.com/code/20f4711a5ffa95c99c3a96c0a5fc641ae9f8242f">View and fork this on WonderFl</a></p>
<p>or</p>
<p><a href="http://www.k2xl.com/lab/randomwalk/Randomness Walk Test.zip">Download the flash file here.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://k2xl.com/wordpress/basic-random-walk-in-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Picture of Pictures</title>
		<link>http://k2xl.com/wordpress/picture-of-pictures/</link>
		<comments>http://k2xl.com/wordpress/picture-of-pictures/#comments</comments>
		<pubDate>Mon, 09 Mar 2009 15:41:25 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[Algorithms]]></category>
		<category><![CDATA[featured]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flickr]]></category>
		<category><![CDATA[mosaic]]></category>
		<category><![CDATA[picture]]></category>

		<guid isPermaLink="false">http://k2xl.com/wordpress/?p=208</guid>
		<description><![CDATA[The Internet has provided a new means of data expression. I decided to play with the idea of machine aesthetics by developing an application that creates images of images.

I first saw this effect a long time ago on a poster advertisement for the Truman show. I always wondered how they made the effect of compiling images together to form, when looked at a certain distance, an image.  The program I made this week creates the effect by downloading Flickr images.]]></description>
			<content:encoded><![CDATA[<p>For my Experimental Digital Media class at Georgia Tech.</p>
<p><a href="http://www.k2xl.com/lab/picofpics/PictureOfPicture.php"><img src="http://img19.imageshack.us/img19/9361/rszpic0.jpg" alt="" width="304" height="286" /></a></p>
<p><a href="http://www.k2xl.com/lab/picofpics/PictureOfPicture.php">Click here to view</a><br />
(Must have Flash Player 10)</p>
<p>The Internet has provided a new means of data expression. I decided to play with the idea of machine aesthetics by developing an application that creates images of images.</p>
<p>I first saw this effect a long time ago on a <a href="http://img510.imageshack.us/img510/5716/trumanshowver1.jpg">poster advertisement for the Truman show</a>. I always wondered how they made the effect of compiling images together to form, when looked at a certain distance, an image.  The program I made this week creates the effect by downloading <a href="http://www.flickr.com">Flickr</a> images.</p>
<p>The algorithm is very straightforward (I also mention some ideas for expansion on the Flash). Basically the program downloads Flickr images either by the most recent, based on a search term, or from a username&#8217;s public photos via the <a href="http://code.google.com/p/as3flickrlib/">as3flickrlib</a>. While downloading, the application calculates and caches each photos average RGB color average (the main reason why my algorithm is fast). The program, based on the user&#8217;s supplied number of rows and columns, calculates the average RGB color of each divided cell and finds the image with the average color that has the closest 3D distance to the cell&#8217;s average color. The effect is pretty cool. I offer the ability to have a very high resolution (which basically expands the original image before running the algorithm to near the max of Flash Player 10&#8242;s bitmapData&#8217;s limit). The picture effect is  best seen with the highest resolution.</p>
<p>Lastly, thanks to Flash Player 10, saving images is added. I use the JPGEncoder from <a href="http://code.google.com/p/as3corelib/">as3corelib</a>. Unfortunately, the JPGEncoder was too slow as its algorithm is synchronous. Upon Googling &#8220;<a href="http://www.google.com/search?rlz=1C1GGLS_enUS291US305&amp;sourceid=chrome&amp;ie=UTF-8&amp;q=Asynchronous+JPG+Encoder">Asynchronous JPG Encoder</a>,&#8221; I found a <a href="http://www.switchonthecode.com/tutorials/flex-tutorial-an-asynchronous-jpeg-encoder">cool Asynchrnous JPG Encoder class by SwitchOnTheCode.com</a>. While I have crtiticisms on the class&#8217;s asynchronous technique choice, the class does what it says it does.</p>
<p>Anyway, if there is enough support, I may release the class as open source on Google Code. I think there are a lot of ways to alter the algorithm to produce different kinds of image results.</p>
]]></content:encoded>
			<wfw:commentRss>http://k2xl.com/wordpress/picture-of-pictures/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why you keep getting a computeSpectrum Security Error</title>
		<link>http://k2xl.com/wordpress/why-you-keep-getting-a-computespectrum-security-error/</link>
		<comments>http://k2xl.com/wordpress/why-you-keep-getting-a-computespectrum-security-error/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 15:44:57 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[News]]></category>
		<category><![CDATA[Security]]></category>

		<guid isPermaLink="false">http://k2xl.com/wordpress/?p=96</guid>
		<description><![CDATA[Probably one of the worst and most frustrating bugs. Turns out computeSpectrum will NOT work if ANOTHER Flash is using audio. Meaning if you have a Flash that using SoundMixer.computeSpectrum one of those super annoying security sandbox runtime errors will pop up on the browser if YouTube, GMail, or any other Flash using audio is [...]]]></description>
			<content:encoded><![CDATA[<p>Probably one of the worst and most frustrating bugs.</p>
<p>Turns out computeSpectrum will NOT work if ANOTHER Flash is using audio. Meaning if you have a Flash that using SoundMixer.computeSpectrum one of those super annoying security sandbox runtime errors will pop up on the browser if YouTube, GMail, or any other Flash using audio is opened.</p>
<p>The fix? There is no fix. No, security.allowDomain won&#8217;t work. No, placing crossdomain.xml all over your server won&#8217;t work either. The only thing one can do is catch the error (or use <a class="signatureLink" href="http://livedocs.adobe.com/flex/2/langref/flash/media/SoundMixer.html#areSoundsInaccessible()">areSoundsInaccessible</a>()) and have something else happen in between. This bug is especially annoying for game developers like me who are working on a game that uses the computeSpectrum to generate content&#8230;</p>
<p>Grrr&#8230; So annoying.</p>
<p>Encourage Adobe to fix this by <a href="http://bugs.adobe.com/jira/browse/FP-147">voting</a> for it.</p>
]]></content:encoded>
			<wfw:commentRss>http://k2xl.com/wordpress/why-you-keep-getting-a-computespectrum-security-error/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why doesn&#8217;t System.Capabilities class have browser property?</title>
		<link>http://k2xl.com/wordpress/why-doesnt-systemcapabilities-class-have-browser-property/</link>
		<comments>http://k2xl.com/wordpress/why-doesnt-systemcapabilities-class-have-browser-property/#comments</comments>
		<pubDate>Fri, 17 Oct 2008 20:44:33 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Actionscript 3.0]]></category>
		<category><![CDATA[News]]></category>

		<guid isPermaLink="false">http://k2xl.com/wordpress/?p=80</guid>
		<description><![CDATA[Can someone explain why Adobe put in the feature: and not something like On a game project I&#8217;m working on, the game uses key combinations such as CTRL+Z and CTRL+Y for certain features. Unfortunately, combo keys using CTRL key don&#8217;t work in Internet Explorer (but they do work in other browsers). What I want to [...]]]></description>
			<content:encoded><![CDATA[<p>Can someone explain why Adobe put in the feature:</p>
<pre class="brush: as3; title: ; notranslate">

trace(Capabilities.os); // gets the operating system
</pre>
<p>and not something like</p>
<pre class="brush: as3; title: ; notranslate">

trace(Capabilities.browser); // gets the browser... this property doesn't exist unfortunately...
</pre>
<p>On a game project I&#8217;m working on, the game uses key combinations such as CTRL+Z and CTRL+Y for certain features. Unfortunately, combo keys using CTRL key don&#8217;t work in Internet Explorer (but they do work in other browsers). What I want to do is detect if the user has IE, then change the key combinations to SHIFT+Z and SHIFT+Y. The only way to determine the browser is by using a server side language or Javascript to pass in the browser into Flash&#8230; grr&#8230;.</p>
<p>Does anyone know if there&#8217;s a way to use ExternalInterface to send the keys? I don&#8217;t want to depend on Javascript being on a page or specific Flash vars be sent to the user&#8230; but I may have to do so.</p>
<p><strong>Update 10/17/08: </strong></p>
<p><strong> </strong>I found a way to detect for IE.</p>
<pre class="brush: as3; title: ; notranslate">Capabilities.playerType; //Returns ActiveX if in IE. </pre>
<blockquote><p>A string that indicates the type of player. This property can have one of the following values:</p>
<ul>
<li><code>"StandAlone"</code> for the Flash StandAlone Player</li>
<li><code>"External"</code> for the Flash Player version used by the external player, or test movie mode..</li>
<li><code>"PlugIn"</code> for the Flash Player browser plug-in</li>
<li><code>"ActiveX"</code> for the Flash Player ActiveX Control used by Microsoft Internet Explorer</li>
</ul>
</blockquote>
]]></content:encoded>
			<wfw:commentRss>http://k2xl.com/wordpress/why-doesnt-systemcapabilities-class-have-browser-property/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

