<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" xml:lang="en-US">
  <title>theRemix - Home</title>
  <id>tag:remixtechnology.com,2011:mephisto/</id>
  <generator uri="http://mephistoblog.com" version="0.8.0">Mephisto Drax</generator>
  
  <link href="http://remixtechnology.com/" rel="alternate" type="text/html" />
  <updated>2010-11-10T12:14:46Z</updated>
  <atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/RemixTechnology" /><feedburner:info uri="remixtechnology" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><feedburner:browserFriendly></feedburner:browserFriendly><entry xml:base="http://remixtechnology.com/">
    <author>
      <name>theRemix</name>
    </author>
    <id>tag:remixtechnology.com,2010-11-10:48501</id>
    <published>2010-11-10T09:43:00Z</published>
    <updated>2010-11-10T12:14:46Z</updated>
    <category term="Flash Projects" />
    <category term="air" />
    <category term="app" />
    <category term="flash" />
    <category term="flex" />
    <category term="osx" />
    <category term="toy" />
    <category term="video" />
    <link href="http://remixtechnology.com/view/make_believe" rel="alternate" type="text/html" />
    <title>make.believe :: app &amp; video</title>
<summary type="html">&lt;p&gt;made a couple apps to cure my ADD while working.&lt;br /&gt;
you can download them free if you really want to.&lt;/p&gt;

&lt;p&gt;Here’s a video of my macbook air (2010, nicknamed &lt;em&gt;Æther&lt;/em&gt;) starting up. &lt;/p&gt;



&lt;p&gt;full tutorial and download links after the jump&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;made a couple apps to cure my ADD while working.&lt;br /&gt;
you can download them free if you really want to.&lt;/p&gt;

&lt;p&gt;Here’s a video of my macbook air (2010, nicknamed &lt;em&gt;Æther&lt;/em&gt;) starting up. &lt;/p&gt;



&lt;p&gt;full tutorial and download links after the jump&lt;/p&gt;
&lt;p&gt;i’m so obsessed with this video and song. i love genki rockets. i made 2 apps to help me get through the work day. the first one is called &lt;em&gt;make.believe&lt;/em&gt;, it installs the &lt;em&gt;Genki Rockets - make.believe&lt;/em&gt; video as an osx screensaver. the second app is called &lt;em&gt;MakeBelieveController&lt;/em&gt;, use this to control the video.&lt;/p&gt;

&lt;p&gt;Here’s a video of my macbook air (2010, nicknamed &lt;em&gt;Æther&lt;/em&gt;) starting up and demonstrates how to use the &lt;em&gt;MakeBelieveController&lt;/em&gt; app.&lt;/p&gt;



&lt;p&gt;if you want to see it work on your OSX desktop, read on…&lt;/p&gt;

&lt;p&gt;&lt;a href="/downloads/make.believe.app.zip"&gt;Download the make.believe app&lt;/a&gt;, launch and install it as your screensaver.&lt;br /&gt;
(close System Preferences after choosing the screensaver, if it’s open.)  &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;you should probably set your screensaver to run, never, i haven’t tested what happens if your screensaver starts&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="/downloads/MakeBelieveController.air"&gt;Download the MakeBelieveController.air&lt;/a&gt; app&lt;br /&gt;
*or*&lt;br /&gt;
&lt;a href="/downloads/MakeBelieveController.dmg"&gt;Download the MakeBelieveController.dmg&lt;/a&gt; osx dmg installer app&lt;/p&gt;

&lt;p&gt;next (optional) &lt;strong&gt;recommended&lt;/strong&gt;&lt;br /&gt;
Download and install the &lt;a href="http://www.wallsaverapp.com"&gt;WallSaver.app&lt;/a&gt;  (&lt;a href="http://softwaredl.nwwnetwork.net/download/wallsaver"&gt;download link&lt;/a&gt;)&lt;br /&gt;
&lt;em&gt;under preferences, i unchecked all options&lt;/em&gt;&lt;br /&gt;
&lt;strong&gt;click on the “Activate” button to set the make.believe screensaver as your desktop&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;if you don’t want to do that, you can open up terminal instead, and run this command:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;/System/Library/Frameworks/ScreenSaver.framework/Resources/ScreenSaverEngine.app/Contents/MacOS/ScreenSaverEngine -background&lt;/pre&gt;&lt;/code&gt;&lt;br /&gt;
which will do the same thing, sets your desktop as the &lt;em&gt;make.believe&lt;/em&gt; screensaver&lt;/p&gt;

&lt;p&gt;finally, you can launch the &lt;em&gt;MakeBelieveController.air&lt;/em&gt; or &lt;em&gt;MakeBelieveController.app&lt;/em&gt; to control the &lt;em&gt;make.believe&lt;/em&gt; video running on your desktop.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;you are fully armed to battle your attention deficiency disorder, and work in f*cking space!!!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Full video of Genki Rockets - make.believe on YouTube&lt;/em&gt;  &lt;a href="http://www.youtube.com/watch?v=SOIqkxthHwE"&gt;http://www.youtube.com/watch?v=SOIqkxthHwE&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;if you want to restore your original wallpaper, if you launched it through console, just press &lt;em&gt;control + c&lt;/em&gt;, to quit it, or if you used &lt;em&gt;WallSaver.app&lt;/em&gt; then click the “Restore” button.&lt;/p&gt;

&lt;p&gt;bugs: none really, if the screensaver isn’t listening to the app, just make sure that the MakeBelieveController app is running, then quit/restore make.believe desktop, then restart it. it should start listening again.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://remixtechnology.com/">
    <author>
      <name>theRemix</name>
    </author>
    <id>tag:remixtechnology.com,2010-11-04:48469</id>
    <published>2010-11-04T09:23:00Z</published>
    <updated>2010-11-04T09:32:56Z</updated>
    <category term="osx" />
    <category term="rails" />
    <category term="tutorial" />
    <link href="http://remixtechnology.com/view/install-rmagick-and-imagemagick-on-osx-snow-leopard-without-macports" rel="alternate" type="text/html" />
    <title>Howto: Install RMagick and ImageMagick on OSX Snow Leopard without MacPorts</title>
<summary type="html">&lt;p&gt;Do you have a rails dev environment on an OSX Snow Leopard box?&lt;br /&gt;
Does your rails app require the rmagick gem and you don’t have, or want to install MacPorts?&lt;/p&gt;

&lt;p&gt;2 step tutorial on how to install ImageMagick and rmagick gem, after the jump.&lt;/p&gt;

&lt;p&gt;&lt;a href="/view/install-rmagick-and-imagemagick-on-osx-snow-leopard-without-macports"&gt;&lt;/a&gt;&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;Do you have a rails dev environment on an OSX Snow Leopard box?&lt;br /&gt;
Does your rails app require the rmagick gem and you don’t have, or want to install MacPorts?&lt;/p&gt;

&lt;p&gt;2 step tutorial on how to install ImageMagick and rmagick gem, after the jump.&lt;/p&gt;

&lt;p&gt;&lt;a href="/view/install-rmagick-and-imagemagick-on-osx-snow-leopard-without-macports"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Do you have a rails dev environment on an OSX Snow Leopard box?&lt;br /&gt;
Does your rails app require the rmagick gem and you don’t have, or want to install MacPorts?&lt;/p&gt;

&lt;p&gt;MacPorts is cool, great package manager. I have a macbook air (which rawks by the way), and i want to see how far i can go without installing MacPorts… just for kicks, like how i use MAMP for mysql gem … the kicks.&lt;/p&gt;

&lt;h2&gt;Step 1 &amp;raquo; Clone my Fork!&lt;/h2&gt;

&lt;p&gt;&lt;a href="/assets/2010/11/4/clone-fork.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I made a fork of a great ImageMagick installer script because the original has the wrong url for some source files.  &lt;/p&gt;

&lt;p&gt;&lt;em&gt;You will probably be prompted to enter in root’s password a few times during installation, so just enter it when it asks for Password:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If you have git:  &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;cd /tmp
git clone git@github.com:theRemix/ImageMagick-sl.git
cd ImageMagick-sl
sh install_im.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;If you don’t have git: &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;cd /tmp
curl http://download.github.com/theRemix-ImageMagick-sl-a585bda.tar.gz -o ImageMagick-sl.tar.gz
tar -xvjf ImageMagick-sl.tar.gz
cd theRemix-ImageMagick-sl-a585bda
sh install_im.sh
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;Alternatively, &lt;a href="http://code.google.com/p/git-osx-installer/downloads/list?can=3&amp;amp;q=&amp;amp;sort=-uploaded&amp;amp;colspec=Filename+Summary+Uploaded+Size+DownloadCount"&gt;go get git !&lt;/a&gt; &lt;/p&gt;

&lt;h2&gt;Step 2 &amp;raquo; Install RMagick&lt;/h2&gt;

&lt;p&gt;installing rmagick gem should be successful now&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;gem install rmagick&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;that’s it!&lt;/p&gt;

&lt;p&gt;enjoy&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://remixtechnology.com/">
    <author>
      <name>theRemix</name>
    </author>
    <id>tag:remixtechnology.com,2010-11-03:48450</id>
    <published>2010-11-03T09:11:00Z</published>
    <updated>2010-11-03T10:08:57Z</updated>
    <category term="bash" />
    <category term="gentoo" />
    <category term="linux" />
    <category term="osx" />
    <category term="screenshot" />
    <category term="source" />
    <link href="http://remixtechnology.com/view/aether_terminal_bash_profile" rel="alternate" type="text/html" />
    <title>Custom Terminal Bash Prompt</title>
<summary type="html">&lt;p&gt;Get your terminal’s prompt to look like this!&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://remixtechnology.com/assets/2010/11/3/osx-terminal-custom-bash-profile-screenshot.png"&gt;&lt;/a&gt; &lt;a href="/assets/2010/11/3/osx-custom-terminal-bash-profile-screenshot.png"&gt;&lt;/a&gt; &lt;a href="/assets/2010/11/3/osx-terminal-bash-profile-screenshot.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="/view/aether_terminal_bash_profile"&gt;bash profile after the jump&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;plus! see pictures of my new macbook air &amp;raquo; &lt;strong&gt;&amp;AElig;ther&lt;/strong&gt;&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;Get your terminal’s prompt to look like this!&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://remixtechnology.com/assets/2010/11/3/osx-terminal-custom-bash-profile-screenshot.png"&gt;&lt;/a&gt; &lt;a href="/assets/2010/11/3/osx-custom-terminal-bash-profile-screenshot.png"&gt;&lt;/a&gt; &lt;a href="/assets/2010/11/3/osx-terminal-bash-profile-screenshot.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="/view/aether_terminal_bash_profile"&gt;bash profile after the jump&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;plus! see pictures of my new macbook air &amp;raquo; &lt;strong&gt;&amp;AElig;ther&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;

&lt;p&gt;There are many articles and tutorials out there that show you how to customize your bash prompt. Lots of &lt;a href="http://tinyurl.com/2dydahd"&gt;tutorials here&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I’m going to share how mine looks, it has colors and 3 cool features.&lt;/p&gt;

&lt;h2&gt;Awesome #1&lt;/h2&gt;

&lt;h3&gt;Clearly labeled current directory $PWD&lt;/h3&gt;

&lt;p&gt;this awesome is included in most vanilla bash profiles, i just like how this mine is highlighted &lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;Awesome #2&lt;/h2&gt;

&lt;h3&gt;Timestamped Terminal&lt;/h3&gt;

&lt;p&gt;see timestamp on right end of bash prompt  &lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;Awesome #3&lt;/h2&gt;

&lt;h3&gt;Bad Command Indicator&lt;/h3&gt;

&lt;p&gt;this custom prompt uses the exit code status of the last command to indicate if the last command exited nicely or failed.&lt;br /&gt;
see happy face / sad face  &lt;/p&gt;

&lt;p&gt;&lt;/p&gt;

&lt;h2&gt;Here’s the .bash_profile&lt;/h2&gt;

&lt;p&gt;create or edit your ~/.bashrc or ~/.bash_profile and add this to the end of the file&lt;/p&gt;

&lt;p&gt;&lt;em&gt;problem embedding snipt&lt;/em&gt;, &lt;a href="http://snipt.net/theRemix/my-custom-bash-profile-terminal-prompt"&gt;see on snipt.net for syntax highlighting&lt;/a&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;# Color Variables for Prompt
YLOBRN='\[\033[01;33;43m\]' 
WHTBRN='\[\033[01;37;43m\]' 
REDBRN='\[\033[00;31;43m\]' 
REDBLK='\[\033[00;31;40m\]' 
PPLBLK='\[\033[01;35;40m\]' 
WHTBLK='\[\033[01;37;40m\]' 
NONE='\[\033[00m\]' 
HBLK='\[\033[00;30;30m\]' 
HBLU='\[\033[01;34;34m\]' 
BLU='\[\033[00;34;34m\]' 
YEL='\[\033[00;33;33m\]' 
WHT='\[\033[01;37;37m\]' 
PRPL='\[\033[00;34;35m\]' 
RED='\[\033[01;31;31m\]' 
NORM='\[\033[01;00;0m\]'

BLACK="\[\033[0;30m\]"
DARK_GRAY="\[\033[1;30m\]"
LIGHT_GRAY="\[\033[0;37m\]"
BLUE="\[\033[0;34m\]"
LIGHT_BLUE="\[\033[1;34m\]"
GREEN="\[\033[0;32m\]"
LIGHT_GREEN="\[\033[1;32m\]"
CYAN="\[\033[0;36m\]"
LIGHT_CYAN="\[\033[1;36m\]"
RED="\[\033[0;31m\]"
LIGHT_RED="\[\033[1;31m\]"
PURPLE="\[\033[0;35m\]"
LIGHT_PURPLE="\[\033[1;35m\]"
BROWN="\[\033[0;33m\]"
YELLOW="\[\033[1;33m\]"
WHITE="\[\033[1;37m\]"
DEFAULT_COLOR="\[\033[00m\]"

nc="\[\e[0m\]"

function prompt {
    ctime=$(date +%R)
    prmpt="-[${usern}@${hostn}][${PWD}][${ctime}]"
    cols=$(tput cols)
    let FILLS=${cols}-${#prmpt}
    LINE=""

    if [[ "$PWD" =~ "/home/$usern" ]]
     then
      let FILLS=$FILLS+5+${#usern}
    fi

    for (( f=0; f&amp;lt;$FILLS; f++ ))  do
        LINE=$LINE"\e(0q\e(B"
    done

    export PS1="\`
    if [ \$? = 0 ];
        then
            echo -e '
$DARK_GRAY\[\e(0l\e(B\]&amp;lt;$LIGHT_BLUE\u$DARK_GRAY@$WHITE\h$DARK_GRAY&gt;&amp;lt;$YELLOW\w$DARK_GRAY&gt;${LINE}&amp;lt;$CYAN${ctime}$DARK_GRAY&gt;
\[\e(0\]m\[\e(B\]&amp;lt;$WHITE =) $LIGHT_GRAY\$$DARK_GRAY&gt;$nc ';
        else
            echo -e '
$DARK_GRAY\[\e(0l\e(B\]&amp;lt;$DARK_GRAY\u$DARK_GRAY@$WHITE\h$DARK_GRAY&gt;&amp;lt;$LIGHT_RED\w$DARK_GRAY&gt;${LINE}&amp;lt;$REDBLK${ctime}$DARK_GRAY&gt;
\[\e(0\]m\[\e(B\]&amp;lt;$LIGHT_RED &gt;=( \$$DARK_GRAY&gt;$nc';
    fi;\`"

} 
PROMPT_COMMAND=prompt
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;if you want to see your changes after editing ~/.bash_profile without reopening another terminal, you can type:  &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;source ~/.bash_profile&lt;/code&gt;&lt;/pre&gt;

&lt;h1&gt;&amp;AElig;ther pictures&lt;/h1&gt;

&lt;h3&gt;new 2011 13” macbook Air&lt;/h3&gt;

&lt;p&gt;first &lt;strong&gt;Air&lt;/strong&gt;&lt;br /&gt;
next &lt;strong&gt;Helium&lt;/strong&gt;&lt;br /&gt;
now, my third macbook Air, dubbed &lt;strong&gt;&amp;AElig;ther&lt;/strong&gt;  &lt;/p&gt;

&lt;p&gt;all stickers illustrated by &lt;a href="http://twitter.com/kellishouts"&gt;kellishouts&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="/assets/2010/11/3/Aether_case.jpg"&gt;&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;  &lt;/p&gt;

&lt;p&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://remixtechnology.com/">
    <author>
      <name>theRemix</name>
    </author>
    <id>tag:remixtechnology.com,2010-09-17:47619</id>
    <published>2010-09-17T20:59:00Z</published>
    <updated>2010-09-17T21:08:32Z</updated>
    <category term="css" />
    <category term="rails" />
    <link href="http://remixtechnology.com/view/cssedit_and_ruby_on_rails" rel="alternate" type="text/html" />
    <title>CSSEdit and Ruby on Rails</title>
<content type="html">
            &lt;p&gt;Do you love CSSEdit? and sometimes develop on rails?&lt;/p&gt;

&lt;p&gt;Does your stylesheet overrides end up looking like this over time?&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;
/* @override 
    http://localhost:3000/stylesheets/styles.css
    http://localhost:3000/stylesheets/styles.css?1277287294
    http://localhost:3001/stylesheets/styles.css
    http://localhost:3001/stylesheets/styles.css?1282948054
    http://localhost:3001/stylesheets/styles.css?1284593647
    http://localhost:3001/stylesheets/styles.css?1284666492
    http://localhost:3001/stylesheets/styles.css?1284684222
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;this is because of the &lt;a href="http://api.rubyonrails.org/classes/ActionView/Helpers/AssetTagHelper.html"&gt;cache-buster feature AssetTagHelper&lt;/a&gt; in RAILS_ENV=”development” . rails automatically appends numbers to all assets (stylesheets, javascripts, images, etc.) so that the browser has to reload it every time and not depend on cache. this is great, except for CSSEdit users. this makes overriding a page become a headache, you’d have to override it every page reload.&lt;/p&gt;

&lt;h2&gt;the fix&lt;/h2&gt;

&lt;p&gt;to stop this, you could do the html way &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;&amp;lt;link rel="stylesheet" href="/stylesheets/styles.css" type="text/css"&amp;gt;&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;then rails wouldn’t touch it, and you can override it just once.&lt;/p&gt;

&lt;h2&gt;OR&lt;/h2&gt;

&lt;p&gt;you can force the asset id value to any single value (which stops the cache-buster) like this:  &lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ENV["RAILS_ASSET_ID"] = "1337"&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;add this to the end of your */app/config/environments/development.rb”&lt;/p&gt;

&lt;p&gt;then your styles.css will only need one override&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;/* @override 
    http://localhost:3000/stylesheets/styles.css?1337
*/&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;don’t forget to restart your dev server after updating &lt;em&gt;/app/config/environments/development.rb&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;hth.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://remixtechnology.com/">
    <author>
      <name>theRemix</name>
    </author>
    <id>tag:remixtechnology.com,2010-01-13:45588</id>
    <published>2010-01-13T20:54:00Z</published>
    <updated>2010-01-13T22:19:07Z</updated>
    <category term="haXe Projects" />
    <category term="3d" />
    <category term="actionscript3" />
    <category term="audio" />
    <category term="benchmark" />
    <category term="flash" />
    <category term="haxe" />
    <category term="sandy" />
    <category term="source" />
    <category term="toy" />
    <link href="http://remixtechnology.com/view/swfprofiler_haxe" rel="alternate" type="text/html" />
    <title>SWFProfiler haXe'd</title>
<summary type="html">&lt;p&gt;I ported over a very good SWFProfiler that a fellow actionscripter wrote over a year ago.&lt;br /&gt;
It’s very useful especially to &lt;a href="/tags/haXe"&gt;haXe&lt;/a&gt;‘rs when all we have to play with is the flash debug player, and for flash game devs to make sure our framerates stay up, and our memory is managed correctly.  &lt;/p&gt;

&lt;p&gt;I added &lt;a href="http://1.bp.blogspot.com/_y2OQguXcEvo/R_1a8QDkN4I/AAAAAAAAAA4/pZ1qz9BrLMk/S760/I%2BHas%2BA%2BFlavor.jpg"&gt;my own flavor&lt;/a&gt; to this already awesome SWFProfiler.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;made the line graph move from right to left instead of left to right.&lt;/li&gt;
&lt;li&gt;added additional colors to the line graph to show dips and spikes in technicolor 3d imax hd blu-ray&lt;/li&gt;
&lt;li&gt;added an optional object inspector that traces out objects and properties&lt;/li&gt;
&lt;li&gt;added a garbage collector to force gc()&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="/view/SWFProfiler_haXe"&gt;See the demo and download the source.&lt;/a&gt;&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;I ported over a very good SWFProfiler that a fellow actionscripter wrote over a year ago.&lt;br /&gt;
It’s very useful especially to &lt;a href="/tags/haXe"&gt;haXe&lt;/a&gt;‘rs when all we have to play with is the flash debug player, and for flash game devs to make sure our framerates stay up, and our memory is managed correctly.  &lt;/p&gt;

&lt;p&gt;I added &lt;a href="http://1.bp.blogspot.com/_y2OQguXcEvo/R_1a8QDkN4I/AAAAAAAAAA4/pZ1qz9BrLMk/S760/I%2BHas%2BA%2BFlavor.jpg"&gt;my own flavor&lt;/a&gt; to this already awesome SWFProfiler.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;made the line graph move from right to left instead of left to right.&lt;/li&gt;
&lt;li&gt;added additional colors to the line graph to show dips and spikes in technicolor 3d imax hd blu-ray&lt;/li&gt;
&lt;li&gt;added an optional object inspector that traces out objects and properties&lt;/li&gt;
&lt;li&gt;added a garbage collector to force gc()&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="/view/SWFProfiler_haXe"&gt;See the demo and download the source.&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I ported over a very good SWFProfiler that a fellow actionscripter wrote over a year ago.&lt;br /&gt;
It’s very useful especially to &lt;a href="/tags/haXe"&gt;haXe&lt;/a&gt;‘rs when all we have to play with is the flash debug player, and for flash game devs to make sure our framerates stay up, and our memory is managed correctly.  &lt;/p&gt;

&lt;p&gt;original author shanem (Shane McCartney) &lt;a href="http://www.lostinactionscript.com/blog/index.php/2008/10/06/as3-swf-profiler/"&gt;as3-swf-profiler&lt;/a&gt;  &lt;/p&gt;

&lt;p&gt;I added &lt;a href="http://1.bp.blogspot.com/_y2OQguXcEvo/R_1a8QDkN4I/AAAAAAAAAA4/pZ1qz9BrLMk/S760/I%2BHas%2BA%2BFlavor.jpg"&gt;my own flavor&lt;/a&gt; to this already awesome SWFProfiler.  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;made the line graph move from right to left instead of left to right.&lt;/li&gt;
&lt;li&gt;added additional colors to the line graph to show dips and spikes in technicolor 3d imax hd blu-ray&lt;/li&gt;
&lt;li&gt;added an optional object inspector that traces out objects and properties&lt;/li&gt;
&lt;li&gt;added a garbage collector to force gc()&lt;/li&gt;
&lt;/ul&gt;

&lt;pre&gt;&lt;code&gt;
Usage: SWFProfiler.init( ?inspector_object_starting_point:Dynamic );  
Right-Click / Command-Click on the stage after SWFProfiler has been initialized.  
Choose "Show Profiler" to open the SWFProfiler  
Choose "Garbage Collector" to force gc().  
if SWFProfiler is visible, choose "Hide Profiler" to remove it from stage.  

Initialize without optional parameter: SWFProfiler.init();  
Will disable the Inspector function.  

To Enable the Inspector function, pass an object as the starting point to trace from.  
SWFProfiler.init(this);  

in the inspector textinput, use standard dot notation starting from the object passed  
 "field" or "object.field" or "object.object.field"  

the value of the field will display in the inspector value box (right half) if it exists  
the text in the inspector textinput will turn red if the field/object does not exist
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;enjoy flash swf profiling right-clicky graphing charting lining tracing fpsing haXing inlining juicy madness alpha zero point five goodness…&lt;/p&gt;

&lt;p&gt;&lt;a href="/com/remixtechnology/SWFProfiler.hx"&gt;download SWFProfiler.hx&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;Demo&lt;/h3&gt;

&lt;p&gt;Click on the swf below to start/stop music.&lt;br /&gt;
Right-Click / Command-Click on the embedded swf to open the ContextMenu&lt;br /&gt;
Choose “Show Profiler” to open the SWFProfiler&lt;br /&gt;
Now i know you are rawkin’ your mom’s dual-core iMac, so you’re probably only seeing really high fps and my leet memory management ninjutsu makes the mem-history line plateau, so to get things moving around in &lt;em&gt;this&lt;/em&gt; demo, you can grab your browser, and shake it like a polaroid picture for 5 seconds, you should see the fps line dip at least into yellow zone.&lt;br /&gt;
Here comes another fun part, i enabled the Inspector by passing my main class as the starting point to trace from. So with the SWFProfiler open, you should see “Inspector: stage.frameRate” to the right of that you will see the current value for that property. my main class has an object defined called stage. and Stage has a property called frameRate.&lt;br /&gt;
You can erase “stage.frameRate” and write whatever you want to inspect. here are some values to test out. just type away, and you’ll see the output as if you actually wrote “trace(object.property);”  &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Objects&lt;/em&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;root&lt;/li&gt;
&lt;li&gt;stage&lt;/li&gt;
&lt;li&gt;scene&lt;/li&gt;
&lt;li&gt;camera&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;some Main class properties&lt;/em&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;curFrame&lt;/li&gt;
&lt;li&gt;ball1&lt;/li&gt;
&lt;li&gt;ball1_orbit_speed ( press right or left key to change )&lt;/li&gt;
&lt;li&gt;ball1_orbit_magnitude&lt;/li&gt;
&lt;li&gt;ball1_orbit_pulsate&lt;/li&gt;
&lt;li&gt;ball1_rotate_speed  ( press up or down key to change )&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;some other fun properties to play with&lt;/em&gt;  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;sound.id3.album&lt;/li&gt;
&lt;li&gt;sound.id3.artist&lt;/li&gt;
&lt;li&gt;sound.id3.songName (press 1,2,3,4,5, or 6 to change song)&lt;/li&gt;
&lt;li&gt;sound.id3.year&lt;/li&gt;
&lt;li&gt;transform.volume&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;

You need &lt;a href="http://get.adobe.com/flashplayer/" title="Get Flash"&gt;Flash 10&lt;/a&gt; to view the awesome. It’s a free and fast upgrade.
&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;[up arrow]&lt;/strong&gt; speeds up sphere rotation speed&lt;br /&gt; &lt;strong&gt;[down arrow]&lt;/strong&gt; slows down sphere rotation speed&lt;br /&gt; &lt;strong&gt;[left arrow]&lt;/strong&gt; slows down sphere orbit speed&lt;br /&gt; &lt;strong&gt;[right arrow]&lt;/strong&gt; speeds up sphere orbit speed&lt;br /&gt;&lt;strong&gt;[b]&lt;/strong&gt; toggles background color white|black&lt;br /&gt;   &lt;strong&gt;[SPACEBAR]&lt;/strong&gt; mutes/unmutes the music&lt;br /&gt; &lt;strong&gt;[1]&lt;/strong&gt; plays Enter Shikari - Johnny Sniper (5.5mb)&lt;br /&gt; &lt;strong&gt;[2]&lt;/strong&gt; plays Payami - Sweet Child of Mine (6.6mb)&lt;br /&gt; &lt;strong&gt;[3]&lt;/strong&gt; plays Genki Rockets - Intermediate -Orbit Swimming- (7.6mb)&lt;br /&gt; &lt;strong&gt;[4]&lt;/strong&gt; plays Kaskade - 4 AM (Adam K &amp;amp; Soha Radio Edit) (8.4mb)&lt;br /&gt; &lt;strong&gt;[5]&lt;/strong&gt; plays Shoupz Entertainment - Destroy She Said (Stryder) (4.2mb)&lt;br /&gt; &lt;strong&gt;[6]&lt;/strong&gt; plays DJ Loopy - Follow Me (6.2mb)&lt;/p&gt;

&lt;p&gt;&lt;a href="/com/remixtechnology/SWFProfiler.hx"&gt;download SWFProfiler.hx&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;see source run&lt;br /&gt;
run source run&lt;/p&gt;

&lt;h3&gt;SWFProfiler.hx&lt;/h3&gt;




/**
 * original author shanem (Shane McCartney) http://www.lostinactionscript.com/blog/index.php/2008/10/06/as3-swf-profiler/
 * ported to haXe by theRemix : http://remixtechnology.com
 * demo and source : http://remixtechnology.com/view/SWFProfiler_haXe
 *
 * Usage: SWFProfiler.init( ?inspector_object_starting_point:Dynamic );
 * Right-Click / Command-Click on the stage after SWFProfiler has been initialized.
 * Choose “Show Profiler” to open the SWFProfiler
 * Choose “Garbage Collector” to force gc().
 * if SWFProfiler is visible, choose “Hide Profiler” to remove it from stage.
 *
 * Initialize without optional parameter: SWFProfiler.init();
 * Will disable the Inspector function.
 *  
 * To Enable the Inspector function, pass an object as the starting point to trace from.
 * SWFProfiler.init(this);
 * 
 * in the inspector textinput, use standard dot notation starting from the object passed
 *  “field” or “object.field” or “object.object.field”
 *
 * the value of the field will display in the inspector value box (right half) if it exists
 * the text in the inspector textinput will turn red if the field/object does not exist
 * 
 */

package com.remixtechnology;
import flash.Lib;
import flash.Error;
import flash.display.Stage;
import flash.display.Sprite;
import flash.display.Graphics;
import flash.display.InteractiveObject;
import flash.display.Shape;
import flash.text.TextField;
import flash.text.TextFormat;
import flash.text.TextFieldAutoSize;
import flash.events.Event;
import flash.events.FocusEvent;
import flash.events.ContextMenuEvent;
import flash.events.EventDispatcher;
import flash.net.LocalConnection;
import flash.system.System;
import flash.ui.ContextMenu;
import flash.ui.ContextMenuItem;
import haxe.Timer;

class SWFProfiler {
    private static var itvTime : Int;
    private static var initTime : Int;
    private static var currentTime : Int;
    private static var frameCount : Int;
    private static var totalCount : Int;

    public static var minFps : Int;
    public static var maxFps : Int;
    public static var minMem : Float;
    public static var maxMem : Float;
    public static var history : Int = 60;
    public static var fpsList : Array = new Array();
    public static var memList : Array = new Array();

    public static var displayed : Bool = false;
    private static var started : Bool = false;
    private static var inited : Bool = false;
    private static var frame : Sprite;
    private static var stage : Stage;
    private static var content : ProfilerContent;
    private static var ci : ContextMenuItem;
    private static var gc_ci: ContextMenuItem;

    public static inline function init(?main = null) : Void {
        if(!inited){
            inited = true;
            stage = Lib.current.stage;
            content = new ProfilerContent(main);
            frame = new Sprite();
            minFps = maxFps = 0;
            maxMem = 0;
            minMem = currentMem;

            var cm : ContextMenu = new ContextMenu();
            cm.hideBuiltInItems();
            ci = new ContextMenuItem(“Show Profiler”, true);
            ci.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, select_ci, false, 0, true);
            gc_ci = new ContextMenuItem(“Garbage Collector”);
            gc_ci.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, select_gc_ci, false, 0, true);
            cm.customItems = [ci,gc_ci];
            flash.Lib.current.contextMenu = cm;

            start();
        }
    }

    public static inline function start() : Void {
        if(!started){
            started = true;
            initTime = itvTime = Std.int(Timer.stamp());
            totalCount = frameCount = 0;
            frame.addEventListener(Event.ENTER_FRAME, frameLoop, false, 0, true);
        }
    }

    public static inline function stop() : Void {
        if(!started){
            started = false;
            frame.removeEventListener(Event.ENTER_FRAME, frameLoop);
        }
    }

    public static var currentFps:Int;

    public static var currentMem(get_currentMem, never):Float;
    public static inline function get_currentMem() : Float {
        return (System.totalMemory / 1024) / 1000;
    }

    public static var averageFps(get_averageFps, never):Float;
    public static inline function get_averageFps() : Float {
        return totalCount / runningTime;
    }

    public static var runningTime(get_runningTime, never):Float;
    private static inline function get_runningTime() : Float {
        return (currentTime - initTime) ;
    }

    public static var intervalTime(get_intervalTime, never):Float;
    private static inline function get_intervalTime() : Float {
        return (currentTime - itvTime);
    }


    private static inline function select_ci(_) : Void {
        if(!displayed) {
            show();
        } else {
            hide();
        }
    }

    private static inline function select_gc_ci(_) : Void {
        System.gc();
        System.gc(); // i always see people do it twice
    }

    private static inline function show() : Void {
        ci.caption = “Hide Profiler”;
        displayed = true;
        stage.addEventListener(Event.RESIZE, resize, false, 0, true);
        stage.addChild(content);
        updateDisplay();
    }

    private static inline function hide() : Void {
        ci.caption = “Show Profiler”;
        displayed = false;
        stage.removeEventListener(Event.RESIZE, resize);
        stage.removeChild(content);
    }

    private static inline function resize(e:Event) : Void {
        content.update(runningTime, minFps, maxFps, minMem, maxMem, currentFps, currentMem, averageFps, fpsList, memList, history);
    }

    private static inline function frameLoop(_) : Void {
        currentTime = Std.int(Timer.stamp());
        frameCount++;
        totalCount++;

        if(intervalTime &gt;= 1) {
            currentFps = frameCount;

            if(displayed) {
                updateDisplay();
            } else {
                updateMinMax();
            }
            fpsList.push(currentFps);
            memList.push(currentMem);

            if(fpsList.length &gt; history) fpsList.shift();
            if(memList.length &gt; history) memList.shift();

            itvTime = currentTime;
            frameCount = 0;
        }
    }

    private static inline function updateDisplay() : Void {
        updateMinMax();
        content.update(runningTime, minFps, maxFps, minMem, maxMem, currentFps, currentMem, averageFps, fpsList, memList, history);
    }

    private static inline function updateMinMax() : Void {
        maxFps = Std.int(Math.max(currentFps, maxFps));

        minMem = Math.min(currentMem, minMem);
        maxMem = Math.max(currentMem, maxMem);
    }
}


class ProfilerContent extends Sprite {

    private static inline var FPS_LINE_COLOR_HIGH = 0x33FF00;
    private static inline var FPS_LINE_COLOR_NORMAL = 0xFFEE33;//0x0099CC;
    private static inline var FPS_LINE_COLOR_LOW = 0xFF3333;
    private static inline var MEM_LINE_COLOR_LOW = 0x00CCFF;
    private static inline var MEM_LINE_COLOR_NORMAL = 0xFFEE33;//0x336699;
    private static inline var MEM_LINE_COLOR_HIGH = 0xFF3366;

    private var fpsLabel: TextField;
    private var minFpsTxtBx : TextField;
    private var maxFpsTxtBx : TextField;
    private var minMemTxtBx : TextField;
    private var maxMemTxtBx : TextField;
    private var memLabel: TextField;
    private var infoTxtBx : TextField;
    private var inspectLabel : TextField;
    private var inspectInputTxt : TextField;
    private static inline var exists_tf : TextFormat = new TextFormat(“_sans”, 9, 0x99CCFF);
    private static inline var undefined_tf : TextFormat = new TextFormat(“_sans”, 9, 0xFF88AA);
    private static inline var tf : TextFormat = new TextFormat(“_sans”, 9, 0xCCCCCC);
    private var box : Shape;
    private var fps : Shape;
    private var mb : Shape;
    private var main: Dynamic;
    private var boxHeight: Int;

    public function new(?_main:Dynamic = null) : Void {
        super();
        fps = new Shape();
        mb = new Shape();
        box = new Shape();
        main = _main;

        //this.mouseChildren = (main==null)?false:true; // not necessary
        this.mouseEnabled = false;

        fps.x = 65;
        fps.y = 45; 
        mb.x = 65;
        mb.y = 90;
        boxHeight = (main==null)?100:120;

        minFpsTxtBx = new TextField();
        minFpsTxtBx.autoSize = TextFieldAutoSize.RIGHT;
        minFpsTxtBx.defaultTextFormat = tf;
        minFpsTxtBx.x = 60;
        minFpsTxtBx.y = 37;
        minFpsTxtBx.mouseEnabled = false;

        maxFpsTxtBx = new TextField();
        maxFpsTxtBx.autoSize = TextFieldAutoSize.RIGHT;
        maxFpsTxtBx.defaultTextFormat = tf;
        maxFpsTxtBx.x = 60;
        maxFpsTxtBx.y = 5;
        maxFpsTxtBx.mouseEnabled = false;

        fpsLabel = new TextField();
        fpsLabel.autoSize = TextFieldAutoSize.RIGHT;
        fpsLabel.defaultTextFormat = tf;
        fpsLabel.x = 50;
        fpsLabel.y = 16;
        fpsLabel.mouseEnabled = false;

        minMemTxtBx = new TextField();
        minMemTxtBx.autoSize = TextFieldAutoSize.RIGHT;
        minMemTxtBx.defaultTextFormat = tf;
        minMemTxtBx.x = 60;
        minMemTxtBx.y = 83;
        minMemTxtBx.mouseEnabled = false;

        maxMemTxtBx = new TextField();
        maxMemTxtBx.autoSize = TextFieldAutoSize.RIGHT;
        maxMemTxtBx.defaultTextFormat = tf;
        maxMemTxtBx.x = 60;
        maxMemTxtBx.y = 50;
        maxMemTxtBx.mouseEnabled = false;

        memLabel = new TextField();
        memLabel.autoSize = TextFieldAutoSize.RIGHT;
        memLabel.defaultTextFormat = tf;
        memLabel.x = 55;
        memLabel.y = 66;
        memLabel.mouseEnabled = false;

        addChild(box);
        addChild(fpsLabel);
        addChild(minFpsTxtBx);
        addChild(maxFpsTxtBx);
        addChild(memLabel);
        addChild(minMemTxtBx);
        addChild(maxMemTxtBx);
        addChild(fps);
        addChild(mb);

        if(main != null){
            infoTxtBx = new TextField();
            infoTxtBx.autoSize = TextFieldAutoSize.LEFT;
            infoTxtBx.defaultTextFormat = new TextFormat(“_sans”, 11, 0xCCCCCC);
            infoTxtBx.y = 98;
            infoTxtBx.x = 290;
            infoTxtBx.mouseEnabled = false;

            inspectLabel = new TextField();
            inspectLabel.autoSize = TextFieldAutoSize.LEFT;
            inspectLabel.defaultTextFormat = tf;
            inspectLabel.text = “Inspect Object :”;
            inspectLabel.x = 7;
            inspectLabel.y = 98;
            inspectLabel.mouseEnabled = false;

            inspectInputTxt = new TextField();
            inspectInputTxt.type = flash.text.TextFieldType.INPUT;
            inspectInputTxt.defaultTextFormat = exists_tf;
            inspectInputTxt.text = “stage.frameRate”;
            inspectInputTxt.x = 80;
            inspectInputTxt.y = 98;
            inspectInputTxt.width = 200;
            inspectInputTxt.height = 18;
            inspectInputTxt.mouseEnabled = true;

            addChild(infoTxtBx);
            addChild(inspectLabel);
            addChild(inspectInputTxt);
        }

        this.addEventListener(Event.ADDED_TO_STAGE, added, false, 0, true);
        this.addEventListener(Event.REMOVED_FROM_STAGE, removed, false, 0, true);
    }

    public inline function update(runningTime : Float, minFps : Int, maxFps : Int, minMem : Float, maxMem : Float, currentFps : Int, currentMem : Float, averageFps : Float, fpsList : Array, memList : Array, history : Int) : Void {
        if(runningTime &gt;= 1 &amp;&amp; maxMem &gt; 0) {
            minFpsTxtBx.text = Std.string(minFps);
            maxFpsTxtBx.text = Std.string(maxFps);
            minMemTxtBx.text = Std.string(minMem);
            maxMemTxtBx.text = Std.string(maxMem);
        }

        fpsLabel.text = Std.int(currentFps) + ” FPS\n” + Std.int(averageFps) + ” Avg”;
        memLabel.text = currentMem + ” Mb”;

        if(main != null) updateInspector();

        var vec : Graphics = fps.graphics;
        vec.clear();

        var i : Int = 0;
        var len : Int = fpsList.length;
        var height : Int = 35;
        var width : Int = stage.stageWidth - 80;
        var inc : Float = width / (history - 1);
        var rateRange : Float = maxFps - minFps;
        var value : Float;

        for(i in 0…len) {
            value = (fpsList[i] - minFps) / rateRange;
            vec.lineStyle(1, 
                if(value&amp;lt;=.7){
                    FPS_LINE_COLOR_LOW;
                }else if(value&gt;=.9){
                    FPS_LINE_COLOR_HIGH;
                }else{
                    FPS_LINE_COLOR_NORMAL;
                }, 0.7);
            if(i == 0) {
                vec.moveTo(width- (len-1-i) * inc, -value * height);
            } else {
                vec.lineTo(width- (len-1-i) * inc, -value * height);
            }
        }

        vec = mb.graphics;
        vec.clear();

        i = 0;
        len = memList.length;
        rateRange = maxMem - minMem;
        for(i in 0…len) {
            value = (memList[i] - minMem) / rateRange;
            vec.lineStyle(1, 
                if(value&amp;lt;=.6){
                    MEM_LINE_COLOR_LOW;
                }else if(value&gt;=.95){
                    MEM_LINE_COLOR_HIGH;
                }else{
                    MEM_LINE_COLOR_NORMAL;
                }, 0.7);
            if(i == 0) {
                vec.moveTo(width- (len-1-i) * inc, -value * height);
            } else {
                vec.lineTo(width- (len-1-i) * inc, -value * height);
            }
        }
    }

    private inline function updateInspector(  ):Void
    {
        var obj:Dynamic = main;
        var obj_ar:Array = inspectInputTxt.text.split(“.”);

        if(inspectInputTxt.text.lastIndexOf(“.”) &gt; 0){
            for(i in 0…obj_ar.length){
                if(Reflect.hasField(obj, obj_ar[i])){
                    if(i &amp;lt; obj_ar.length-1){
                        inspectInputTxt.defaultTextFormat = exists_tf;
                        obj = Reflect.field(obj, obj_ar[i]);
                    }else{
                        if(Reflect.hasField(obj, obj_ar[i])){
                            inspectInputTxt.defaultTextFormat = exists_tf;
                            infoTxtBx.text = Reflect.field(obj, obj_ar[i]);
                        }
                    }
                    inspectInputTxt.text = inspectInputTxt.text;
                }else{
                    inspectInputTxt.defaultTextFormat = undefined_tf;
                    infoTxtBx.text = "";
                    inspectInputTxt.text = inspectInputTxt.text;
                    break;
                }
            }
        }else{
            if(Reflect.hasField(main,inspectInputTxt.text)){
                infoTxtBx.text = Reflect.field(main, inspectInputTxt.text);
                inspectInputTxt.defaultTextFormat = exists_tf;
            }else{
                inspectInputTxt.defaultTextFormat = undefined_tf;
                infoTxtBx.text = "";
            }
            inspectInputTxt.text = inspectInputTxt.text;
        }

    }

    private inline function added(e : Event) : Void {
        resize();
        stage.addEventListener(Event.RESIZE, resize, false, 0, true);
    }

    private inline function removed(e : Event) : Void {
        stage.removeEventListener(Event.RESIZE, resize);
    }

    private inline function resize(e : Event = null) : Void {
        var vec : Graphics = box.graphics;
        vec.clear();

        vec.beginFill(0x000000, 0.7);
        vec.drawRect(0, 0, stage.stageWidth, boxHeight);
        vec.lineStyle(1, 0xFFFFFF, 0.5);

        vec.moveTo(65, 45);
        vec.lineTo(65, 10);
        vec.moveTo(65, 45);
        vec.lineTo(stage.stageWidth - 15, 45);

        vec.moveTo(65, 90);
        vec.lineTo(65, 55);
        vec.moveTo(65, 90);
        vec.lineTo(stage.stageWidth - 15, 90);

        vec.endFill();
    }
}

          </content>  </entry>
  <entry xml:base="http://remixtechnology.com/">
    <author>
      <name>theRemix</name>
    </author>
    <id>tag:remixtechnology.com,2009-12-23:45518</id>
    <published>2009-12-23T23:24:00Z</published>
    <updated>2009-12-23T23:28:31Z</updated>
    <category term="haXe Projects" />
    <category term="game" />
    <category term="haxe" />
    <link href="http://remixtechnology.com/view/play_santas_sack" rel="alternate" type="text/html" />
    <title>Play Santa's Sack</title>
<content type="html">
            &lt;h1&gt;Merry Christmas!&lt;/h1&gt;

&lt;h2&gt;2009 Christmas haXe Game&lt;/h2&gt;

&lt;p&gt;Our gift to you, 2009 Christmas game made with love and &lt;a href="/tags/haXe"&gt;haXe&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://playsantassack.com"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="http://playsantassack.com"&gt;http://playsantassack.com&lt;/a&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://remixtechnology.com/">
    <author>
      <name>theRemix</name>
    </author>
    <id>tag:remixtechnology.com,2009-11-27:45432</id>
    <published>2009-11-27T11:38:00Z</published>
    <updated>2009-12-01T01:00:28Z</updated>
    <category term="haXe Projects" />
    <category term="game" />
    <category term="haxe" />
    <link href="http://remixtechnology.com/view/play_thanksgiving_kitchen_hero" rel="alternate" type="text/html" />
    <title>Play Thanksgiving Kitchen Hero</title>
<summary type="html">&lt;h2&gt;Oh yes, another Thanksgiving game for the 09&lt;/h2&gt;

&lt;p&gt;This is the most fun and most original, and not a clone, and it’s very hard… like some turkeys.
click to enjoy pumpkinstyle!&lt;/p&gt;

&lt;p&gt;&lt;a href="/view/play_thanksgiving_kitchen_hero"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;i love making games in a day… this game took longer than &lt;a href="/view/turkey_haxe"&gt;last years&lt;/a&gt;, we hope you like.&lt;/p&gt;</summary><content type="html">
            &lt;h2&gt;Oh yes, another Thanksgiving game for the 09&lt;/h2&gt;

&lt;p&gt;This is the most fun and most original, and not a clone, and it’s very hard… like some turkeys.
click to enjoy pumpkinstyle!&lt;/p&gt;

&lt;p&gt;&lt;a href="/view/play_thanksgiving_kitchen_hero"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;i love making games in a day… this game took longer than &lt;a href="/view/turkey_haxe"&gt;last years&lt;/a&gt;, we hope you like.&lt;/p&gt;
&lt;h2&gt;Happy Thanksgiving 2009&lt;/h2&gt;

&lt;p&gt;

You need &lt;a href="http://get.adobe.com/flashplayer/" title="Get Flash"&gt;Flash 10&lt;/a&gt; to view the awesome. It’s a free and fast upgrade.
&lt;/p&gt;

&lt;p&gt;&lt;a href="/tags/haXe"&gt;haXe&lt;/a&gt; &lt;a href="/tags/game"&gt;game&lt;/a&gt; in a day!, &lt;em&gt;* If the game doesn’t fit in your browser, press F11 to get more vertical space&lt;/em&gt;*&lt;/p&gt;

&lt;p&gt;created by me&lt;br /&gt;
and illustrated entirely by &lt;a href="http://pnpnt.com"&gt;pnpnt&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;here is last year’s Thanksgiving game in a day: &lt;a href="/view/turkey_haxe"&gt;Turkey haXe - Thanksgiving 08&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;synopsis&lt;/strong&gt;&lt;br /&gt;
Thanksgiving Food Fight!&lt;br /&gt;
Fast paced food battle of skill and reflexes.&lt;br /&gt;
Throw pumpkins at turkeys to knock it to your opponents side of the kitchen. Your opponent throws pies at turkeys, don’t let the turkeys get past your side of the kitchen!&lt;br /&gt;
Guaranteed to not be a clone of any game ever made.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;instructions&lt;/strong&gt;&lt;br /&gt;
Click anywhere to send your pumpkins flying across the kitchen in that direction. Your ammo is displayed on the bottom right corner. If any pies or pumpkins go between the kitchen counter tops on the bottom of the screen, or explode on your half of the kitchen, you get another pumpkin for ammo.&lt;br /&gt;
You win by getting 2 (out of 3) turkeys across the kitchen and between the counter tops on the top side of the screen.&lt;br /&gt;
If you win, Play Again to play against a tougher opponent. The enemies quickly get smarter and faster as you progress through the levels.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://remixtechnology.com/">
    <author>
      <name>theRemix</name>
    </author>
    <id>tag:remixtechnology.com,2009-10-10:45390</id>
    <published>2009-10-10T03:29:00Z</published>
    <updated>2009-10-11T23:45:21Z</updated>
    <category term="haXe Projects" />
    <category term="actionscript3" />
    <category term="haxe" />
    <category term="source" />
    <category term="toy" />
    <link href="http://remixtechnology.com/view/gravity-haxe" rel="alternate" type="text/html" />
    <title>theRemix invents gravity in haXe (with full source)</title>
<summary type="html">&lt;p&gt;I created an experiment to visualize and play with the law of gravity.&lt;br /&gt;
The concept of gravity is new, i just created it, attraction occurs between any two masses in space.&lt;br /&gt;
I came up with the formula for gravity:&lt;br /&gt;
&lt;span&gt;Mass1 &amp;times; Mass2&lt;/span&gt;&lt;br /&gt;
 Distance&amp;sup2;&lt;/p&gt;

&lt;p&gt;neat huh?&lt;/p&gt;

&lt;p&gt;check out the full &lt;a href="/tags/haXe"&gt;haXe&lt;/a&gt; source code and &lt;a href="/view/Gravity-haXe"&gt;play with gravity to create orbits&lt;/a&gt; in the &lt;a href="/view/Gravity-haXe"&gt;full article&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="/view/Gravity-haXe"&gt;&lt;/a&gt;&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;I created an experiment to visualize and play with the law of gravity.&lt;br /&gt;
The concept of gravity is new, i just created it, attraction occurs between any two masses in space.&lt;br /&gt;
I came up with the formula for gravity:&lt;br /&gt;
&lt;span&gt;Mass1 &amp;times; Mass2&lt;/span&gt;&lt;br /&gt;
 Distance&amp;sup2;&lt;/p&gt;

&lt;p&gt;neat huh?&lt;/p&gt;

&lt;p&gt;check out the full &lt;a href="/tags/haXe"&gt;haXe&lt;/a&gt; source code and &lt;a href="/view/Gravity-haXe"&gt;play with gravity to create orbits&lt;/a&gt; in the &lt;a href="/view/Gravity-haXe"&gt;full article&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="/view/Gravity-haXe"&gt;&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;ok maybe it’s not that new, and maybe i didn’t invent gravity, though usually where you see it in flash, you’ll see the force only applied in the downwards direction. Many thanks to Chris Sass for helping make sure i don’t waste &gt;1 hour on figuring out acceleration and stuff.&lt;/p&gt;

&lt;h2&gt;Play&lt;/h2&gt;

&lt;p&gt;drag an object (they actually represent cookies) around with your mouse, clicking them makes them dark and stationary… like stale cookies, no one wants that. pressing any key will reset the objects to random positions.&lt;br /&gt;
&lt;strong&gt;see if you can create a stable orbit.&lt;/strong&gt;&lt;br /&gt;
&lt;em&gt;hint, gravity is stronger when the objects are closer, have one object moving towards the other, then move it out of the way before impact&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;

You need &lt;a href="http://get.adobe.com/flashplayer/" title="Get Flash"&gt;Flash 10&lt;/a&gt; to view the awesome. It’s a free and fast upgrade.
&lt;/p&gt;  

&lt;h2&gt;Source&lt;/h2&gt;

&lt;h3&gt;build.hx&lt;/h3&gt;




    #build file
    –flash-strict
    # uncomment for better debugging
    –no-inline
    -swf-version 9
    # the color of space is 0xEFEFEF i shit you not
    -swf-header 600:500:30:EFEFEF
    -cp src
    -main Gravity
    -swf deploy/out.swf


&lt;h3&gt;Gravity.hx&lt;/h3&gt;




/*
        Force of Gravity = (Mass1 * Mass2) / distance^2
*/
    import com.remixtechnology.Utils;
    import com.remixtechnology.ShadowedTextField;
    import flash.display.Stage;
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.Lib;
    import flash.geom.Point;
    import flash.events.KeyboardEvent;
    class Gravity
    {
        private var stage: Stage;
        private var b1: Ball;
        private var b2: Ball;
        private var b3: Ball;
        private var lines_canvas: Sprite;

        private static inline var line_thickness:Float = 1;
        private static inline var line_color:UInt = 0x666666;
        private static inline var line_alpha:Float = .6;

        public function new()
        {
            stage = Lib.current.stage;

            // fun fact, planet haXe is only 2400 grams
            b1 = new Ball(2400);
            stage.addChild(b1);

            // a cookie orbits planet haXe
            b2 = new Ball(400);
            stage.addChild(b2);

/*          // Don’t play with my emotions
            b3 = new Ball(1200);
            stage.addChild(b3);*/

            randomReset();

            lines_canvas = new Sprite();
            lines_canvas.mouseChildren = lines_canvas.mouseEnabled = false;
            stage.addChild(lines_canvas);

            stage.addEventListener(Event.ENTER_FRAME, loop);
            stage.addEventListener(KeyboardEvent.KEY_DOWN, randomReset);
        }

        private inline function randomReset( ?_ ):Void
        {
            b1.x = Std.random(stage.stageWidth);
            b1.y = Std.random(stage.stageHeight);
            b2.x = Std.random(stage.stageWidth);
            b2.y = Std.random(stage.stageHeight);
/*          b3.x = Std.random(stage.stageWidth);
            b3.y = Std.random(stage.stageHeight);*/

            // netForce doesn’t really need to be reset, unless you want a threesome
            b1.vx = b1.vy = b1.netRadian = b1.netForce = 
            b2.vx = b2.vy = b2.netRadian = b2.netForce = 
/*          b3.vx = b3.vy = b3.netRadian = b3.netForce = */ 0;
        }

        private inline function loop( _ ):Void
        {
            lines_canvas.graphics.clear();
            Utils.filicide(lines_canvas);
            law(b1,b2);
            // the only way you’ll ever experience a threeway, and it still doesn’t work :/
/*          law(b2,b3);
            law(b3,b1)*/
        }

        private inline function law( b1:Ball, b2:Ball ): Void
        {
            // Force of Gravity = (Mass1 * Mass2) / distance^2
            var force:Float = (b1.mass * b2.mass) / Math.pow(Point.distance(b1.point,b2.point), 2);

            var totalMass:Float = b1.mass + b2.mass;

            var yDistance:Float = b2.y - b1.y;
            var xDistance:Float = b2.x - b1.x;
            var totalDistance:Float = Math.sqrt(Math.pow(yDistance,2) + Math.pow(xDistance,2));

            if (Point.distance(b1.point,b2.point) &gt;= b1.radius + b2.radius)
            {
                // gravitate ball1 to ball2
                b1.addForce(Math.atan2(yDistance, xDistance), force);

                // gravitate ball1 to ball2
                b2.addForce(Math.atan2(-yDistance, -xDistance), force);

            }

            // make pretty
            lines_canvas.graphics.lineStyle(line_thickness, line_color, line_alpha);
            lines_canvas.graphics.moveTo(b1.x,b1.y);
            lines_canvas.graphics.lineTo(b2.x,b2.y);
            var force_label = new ShadowedTextField(“Net Force: ” + Std.string(Utils.round(force,2)) + “\nDistance: ” + Std.string(Utils.round(totalDistance,2)));
            force_label.setColor(0x999999);
            force_label.setShadowColor(0x333366);
            force_label.bold(false);
            var mid:Point = Point.interpolate(b1.point,b2.point,.5);
            force_label.x = mid.x;
            force_label.y = mid.y;
            lines_canvas.addChild(force_label);
        }

        public static function main(): Void
        {
            var m: Gravity = new Gravity();
        }
    }


&lt;h3&gt;Ball.hx&lt;/h3&gt;




    import flash.display.Sprite;
    import flash.geom.Point;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import com.remixtechnology.Utils;
    import com.remixtechnology.Draggable;
    import com.remixtechnology.ShadowedTextField;

    class Ball extends Sprite
    {
        public var mass: Float;
        public var point(getPoint,null): Point;
        public var radius: Float; // girth
        public var netRadian: Float; // angle of movement in radians
        public var netForce: Float; // here for when i unsucessfully added another gravitational object
        private var xForce: Float;
        private var yForce: Float;
        private var ax: Float; // accelerate to glory!
        private var ay: Float;
        public var vx: Float; //  velocity 
        public var vy: Float;
        public var totalSpeed(getTotalSpeed,null): Float; // PA, pythagoreanonymous
        private var locked: Bool; // because this ball could be orbiting a much more massive cookie 

        private var speed_label: ShadowedTextField; // mass and speed

        private static inline var color:UInt = 0x3399FF; // FYI my eyes are this color
        private static inline var locked_color:UInt = 0x3344CC;
        private static inline var border_color:UInt = 0x3366ff;
        private static inline var border_thickness:Float = 2;
        private static inline var radius2mass:Float = .02; // radius = this*mass

        public function new( _mass:Float )
        {
            super();
            mass = _mass;
            radius = mass*radius2mass;
            graphics.lineStyle(border_thickness, border_color);
            graphics.beginFill(color);
            graphics.drawCircle(0,0,radius);
            graphics.endFill();

            xForce = 0;
            yForce = 0;

            netForce = 0;
            netRadian = 0;

            vx = 0;
            vy = 0;

            locked = false;

            new Draggable(this);

            speed_label = new ShadowedTextField(“Speed: ” + Std.string(totalSpeed));
            speed_label.mouseChildren = false;
            speed_label.setColor(0x887766);
            speed_label.setShadowColor(0x121212);
            speed_label.bold(false);
            addChild(speed_label);

            addEventListener(Event.ENTER_FRAME, loop);
            addEventListener(MouseEvent.MOUSE_UP, mouseUp);
            addEventListener(MouseEvent.CLICK, lock);
        }
        private inline function loop( _ ):Void
        {
            xForce = Math.cos(netRadian) * netForce;
            yForce = Math.sin(netRadian) * netForce;
            ax = xForce / mass;
            ay = yForce / mass;

            if(!locked){
                vx += ax;
                vy += ay;       
                x += vx;
                y += vy;
            }

            speed_label.setText(“Mass: ” + Std.string(mass) + “\nSpeed: ” + Std.string(Utils.round(totalSpeed,2)));
        }
    /*  // go ahead and do it, i dare you…
        public inline function launch(  ): Void
        {
            vx = Std.random( 10 ) - 5;
            vy = Std.random( 10 ) - 5;
        }*/
        public inline function addForce( radian:Float, force:Float ): Void
        {
            var rad = (netRadian + radian) / 2;
            netRadian = (rad &gt; 0)? rad : rad ;
            netForce = (netForce - force) / -2;
        }

        private inline function getPoint(  ):Point{ return new Point(x,y); }
        public inline function getTotalSpeed(  ): Float
        {
            return Math.sqrt(Math.pow(vx,2) + Math.pow(vy,2));
        }

        private inline function mouseUp( _ ):Void
        {
            vx = 0;
            vy = 0;
        }
        private inline function lock( _ ):Void
        {
            locked = !locked;

            graphics.clear();
            graphics.lineStyle(border_thickness, border_color);
            if(locked){
                graphics.beginFill(locked_color);
                graphics.drawCircle(0,0,radius);
                graphics.endFill();
            }else{
                graphics.beginFill(color);
                graphics.drawCircle(0,0,radius);
                graphics.endFill();
            }
        }
    }


&lt;h3&gt;com.remixtechnology.Utils.hx&lt;/h3&gt;




    package com.remixtechnology;
    class Utils{

        public static inline function round( num:Float, places:Int=0 ): Float
        {
            places *= 10;
            var out:Float = num * places;
            out = Math.round(out);
            out = out / places;
                    return out;
        }

    }


&lt;h3&gt;com.remixtechnology.Draggable.hx&lt;/h3&gt;




    package com.remixtechnology;
    import flash.events.Event;
    import flash.events.MouseEvent;
    import flash.display.DisplayObject;
    class Draggable{
        private var x_offset: Float;
        private var y_offset: Float;
        public var enableDrag: Bool;
        public var displayObject: DisplayObject;
        public function new(d:DisplayObject){
            displayObject = d;
            displayObject.addEventListener(MouseEvent.MOUSE_DOWN, mouse_down);
            displayObject.addEventListener(MouseEvent.MOUSE_UP, mouse_up);
            enableDrag = true;
        }
        private inline function mouse_down( event:MouseEvent ):Void
        {
            displayObject.addEventListener(Event.ENTER_FRAME, enterFrame);
            displayObject.stage.addEventListener(MouseEvent.MOUSE_UP, mouse_up);
            x_offset = displayObject.mouseX;
            y_offset = displayObject.mouseY;
        }
        private function mouse_up( _ ):Void
        {
            displayObject.removeEventListener(Event.ENTER_FRAME, enterFrame);
        }
        private inline function enterFrame( _ ):Void
        {
            if(enableDrag){
                displayObject.x = displayObject.stage.mouseX - x_offset;
                displayObject.y = displayObject.stage.mouseY - y_offset;
            }
        }
    }


&lt;h3&gt;com.remixtechnology.ShadowedTextField.hx&lt;/h3&gt;




    package com.remixtechnology;

    import flash.display.Sprite;
    import flash.text.TextField;
    import flash.text.TextFieldAutoSize;
    import flash.text.TextFormat;
    import flash.text.AntiAliasType;

    class ShadowedTextField extends Sprite
    {

        private var fgColor:UInt;
        private var bgColor:UInt;
        private var xoff:Float;
        private var yoff:Float;

        private var tfFore:TextField;
        private var tfBack:TextField;
        private var fmtFore:TextFormat;
        private var fmtBack:TextFormat;

        private var size:Int;
        private var font:String;

        public function new( ?text:String )
        {
            bgColor = 0x000000;
            fgColor = 0xFFCC00;
            xoff = 1;
            yoff = 1;
            size = 14;
            font = ‘Verdana’;

            mouseChildren = false;
            mouseEnabled = false;

            tfBack = new TextField();
            tfBack.autoSize = TextFieldAutoSize.LEFT;
            tfBack.selectable = false;
            tfBack.x = xoff;
            tfBack.y = yoff;
            addChild(tfBack);

            tfFore = new TextField();
            tfFore.autoSize = TextFieldAutoSize.LEFT;
            tfFore.selectable = false;
            addChild(tfFore);

            fmtFore = new TextFormat();
            fmtFore.color = fgColor;
            fmtFore.size = size;
            fmtFore.font = font;
            fmtFore.bold = true;

            fmtBack = new TextFormat();
            fmtBack.color = bgColor;
            fmtBack.size = size;
            fmtBack.font = font;
            fmtBack.bold = true;

            if(text != null) setText(text);

            super();
        }

        public inline function setText(n:String):Void
        {
            tfFore.text = n;
            tfFore.setTextFormat(fmtFore);

            tfBack.text = n;
            tfBack.setTextFormat(fmtBack);
        }

        public inline function appendText(n:String):Void
        {
            tfFore.appendText(“\n” + n);
            tfFore.setTextFormat(fmtFore);

            tfBack.appendText(“\n” + n);
            tfBack.setTextFormat(fmtBack);
        }

        public inline function setColor(color:UInt):Void
        {
            fmtFore.color = color;
            tfFore.setTextFormat(fmtFore);
        }

        public inline function setShadowColor(color:UInt):Void
        {
            fmtBack.color = color;
            tfBack.setTextFormat(fmtBack);
        }

        public inline function setSize(size:Int):Void{
            fmtFore.size = size;
            tfFore.setTextFormat(fmtFore);

            fmtBack.size = size;
            tfBack.setTextFormat(fmtBack);
        }

        public inline function bold(b:Bool):Void{
            if(b){
                fmtFore.bold = true;
                fmtBack.bold = true;
            }else{
                fmtFore.bold = false;
                fmtBack.bold = false;
            }
        }

    }

          </content>  </entry>
  <entry xml:base="http://remixtechnology.com/">
    <author>
      <name>theRemix</name>
    </author>
    <id>tag:remixtechnology.com,2009-09-24:45386</id>
    <published>2009-09-24T04:22:00Z</published>
    <updated>2009-09-24T04:23:35Z</updated>
    <category term="haXe Projects" />
    <category term="flash" />
    <category term="game" />
    <category term="haxe" />
    <link href="http://remixtechnology.com/view/new-flash-game-polyn" rel="alternate" type="text/html" />
    <title>New flash game Polyn</title>
<content type="html">
            &lt;p&gt;Haven’t posted anything in a while, probably cause i’ve been busy developing my entry for the &lt;a href="http://www.mochimedia.com/contest/may09"&gt;Mochi May 09 “Word Play” contest&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Our entry has been submitted, click on the bee to &lt;a href="http://playpolyn.com"&gt;play Polyn&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://playpolyn.com"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Game designed and illustrated by &lt;a href="http://pnpnt.com"&gt;Kelli Harada pnpnt.com&lt;/a&gt;&lt;br /&gt;
Game developed by me, on about 60 bus rides&lt;br /&gt;
Site designed by &lt;a href="http://pnpnt.com"&gt;Kelli Harada pnpnt.com&lt;/a&gt;&lt;br /&gt;
Site html5’d by me&lt;/p&gt;

&lt;p&gt;built with my favorite swf compiler &lt;a href="/tags/haXe"&gt;haXe&lt;/a&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://remixtechnology.com/">
    <author>
      <name>theRemix</name>
    </author>
    <id>tag:remixtechnology.com,2009-08-23:45380</id>
    <published>2009-08-23T13:18:00Z</published>
    <updated>2009-09-29T04:47:59Z</updated>
    <category term="haXe Projects" />
    <category term="actionscript3" />
    <category term="haxe" />
    <category term="source" />
    <category term="tutorial" />
    <link href="http://remixtechnology.com/view/haxe_stopwatch" rel="alternate" type="text/html" />
    <title>StopWatch class - code snippet</title>
<summary type="html">&lt;p&gt;a simple StopWatch class to measure how long something takes.&lt;/p&gt;



&lt;p&gt;&lt;a href="/view/haXe_stopWatch"&gt;read full article and see source code&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;also on &lt;a href="http://haxe.org/doc/snip/StopWatch"&gt;http://haxe.org/doc/snip/StopWatch&lt;/a&gt;&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;a simple StopWatch class to measure how long something takes.&lt;/p&gt;



&lt;p&gt;&lt;a href="/view/haXe_stopWatch"&gt;read full article and see source code&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;also on &lt;a href="http://haxe.org/doc/snip/StopWatch"&gt;http://haxe.org/doc/snip/StopWatch&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;a simple StopWatch to measure how long something takes.&lt;/p&gt;

&lt;h2&gt;Usage&lt;/h2&gt;



&lt;h2&gt;Source&lt;/h2&gt;

&lt;h3&gt;StopWatch.hx&lt;/h3&gt;


          </content>  </entry>
  <entry xml:base="http://remixtechnology.com/">
    <author>
      <name>theRemix</name>
    </author>
    <id>tag:remixtechnology.com,2009-08-23:45379</id>
    <published>2009-08-23T12:57:00Z</published>
    <updated>2009-08-23T13:02:05Z</updated>
    <category term="haXe Projects" />
    <category term="actionscript3" />
    <category term="haxe" />
    <category term="source" />
    <category term="tutorial" />
    <link href="http://remixtechnology.com/view/haxe_commaformat" rel="alternate" type="text/html" />
    <title>commaFormat(num:Float):String; code snippet</title>
<summary type="html">&lt;p&gt;added another code snippet to &lt;a href="http://haxe.org/doc/snip/commaFormat"&gt;http://haxe.org/doc/snip/commaFormat&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;that commafies a number such as really high scores &lt;/p&gt;

&lt;p&gt;converts 123456 to “123,456”
and 1234567890.12345 to “1,234,567,890.12345”&lt;/p&gt;

&lt;p&gt;&lt;a href="/view/haxe_commaformat"&gt;read full article and source&lt;/a&gt;&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;added another code snippet to &lt;a href="http://haxe.org/doc/snip/commaFormat"&gt;http://haxe.org/doc/snip/commaFormat&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;that commafies a number such as really high scores &lt;/p&gt;

&lt;p&gt;converts 123456 to “123,456”
and 1234567890.12345 to “1,234,567,890.12345”&lt;/p&gt;

&lt;p&gt;&lt;a href="/view/haxe_commaformat"&gt;read full article and source&lt;/a&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;public static inline function commaFormat( num:Float ): String
    var str:String = Std.string(num);
        var str_ar:Array&amp;lt;String&amp;gt; = new Array&amp;lt;String&amp;gt;();
        var pos:Int = 1;
        var i:Int;
        var out:String = "";

        if (str.indexOf(".") == -1 ){
            str_ar = str.split("");
        }else{
            out = str.substr(str.indexOf("."));
            str_ar = str.substr(0, str.indexOf(".")).split("");
        }

        str_ar.reverse();
        for (i in 0...str_ar.length){
            out = str_ar[i]+out;
            if (pos++ == 3) {
                pos = 1;
                out = ((Math.isNaN(Std.parseFloat(str_ar[0])) &amp;amp;&amp;amp; i &amp;gt; 1) || (!Math.isNaN(Std.parseFloat(str_ar[0])) &amp;amp;&amp;amp; i &amp;gt;= 1) &amp;amp;&amp;amp; i &amp;lt; str_ar.length-1) ? ","+out : out;
            }
        }
        return out;
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;trace(commaFormat(123));&lt;/h3&gt;

&lt;p&gt;// output: 123&lt;/p&gt;

&lt;h3&gt;trace(commaFormat(123456));&lt;/h3&gt;

&lt;p&gt;// output: 123,456&lt;/p&gt;

&lt;h3&gt;trace(commaFormat(1234567890.12345));&lt;/h3&gt;

&lt;p&gt;// output: 1,234,567,890.12345&lt;/p&gt;

&lt;p&gt;can be written better, however this should be fast enough in most cases.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;var i:Int;
var s:StopWatch = new StopWatch();
for(i in 0...10000){
    Utils.commaFormat(123123123123123123123);
}
s.stop();
trace(s);
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;strong&gt;0.767 ms&lt;/strong&gt;&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://remixtechnology.com/">
    <author>
      <name>theRemix</name>
    </author>
    <id>tag:remixtechnology.com,2009-08-21:45378</id>
    <published>2009-08-21T23:43:00Z</published>
    <updated>2009-08-22T06:11:47Z</updated>
    <category term="haXe Projects" />
    <category term="actionscript3" />
    <category term="animation" />
    <category term="audio" />
    <category term="haxe" />
    <category term="source" />
    <category term="toy" />
    <link href="http://remixtechnology.com/view/songsincode-jump_around" rel="alternate" type="text/html" />
    <title>jumpAround(audio_level); #songsInCode</title>
<summary type="html">&lt;p&gt;Made another &lt;a href="http://search.twitter.com/search?q=%23songsInCode"&gt;#songsInCode&lt;/a&gt; in &lt;a href="/tags/haXe"&gt;haXe&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;much funner this time.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;if(audio_level &amp;gt; threshold){
    house_of_pain[j].jumpAround(audio_level);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;

You need &lt;a href="http://get.adobe.com/flashplayer/" title="Get Flash"&gt;Flash 10&lt;/a&gt; to view the awesome. It’s a free and fast upgrade.
&lt;/p&gt;  

&lt;p&gt;let it load, press play.&lt;br /&gt;
House of Pain - Jump Around (Deadmau5 remix)&lt;/p&gt;

&lt;p&gt;&lt;a href="/view/songsInCode-jump_around"&gt;read more to see the source code and result in action…&lt;/a&gt;&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;Made another &lt;a href="http://search.twitter.com/search?q=%23songsInCode"&gt;#songsInCode&lt;/a&gt; in &lt;a href="/tags/haXe"&gt;haXe&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;much funner this time.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;if(audio_level &amp;gt; threshold){
    house_of_pain[j].jumpAround(audio_level);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;

You need &lt;a href="http://get.adobe.com/flashplayer/" title="Get Flash"&gt;Flash 10&lt;/a&gt; to view the awesome. It’s a free and fast upgrade.
&lt;/p&gt;  

&lt;p&gt;let it load, press play.&lt;br /&gt;
House of Pain - Jump Around (Deadmau5 remix)&lt;/p&gt;

&lt;p&gt;&lt;a href="/view/songsInCode-jump_around"&gt;read more to see the source code and result in action…&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;For &lt;a href="http://search.twitter.com/search?q=%23songsInCode"&gt;#songsInCode&lt;/a&gt; written and compiled in &lt;a href="/tags/haXe"&gt;haXe&lt;/a&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;if(audio_level &amp;gt; threshold){
    house_of_pain[j].jumpAround(audio_level);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;

You need &lt;a href="http://get.adobe.com/flashplayer/" title="Get Flash"&gt;Flash 10&lt;/a&gt; to view the awesome. It’s a free and fast upgrade.
&lt;/p&gt;  

&lt;p&gt;let it load, press play.&lt;br /&gt;
House of Pain - Jump Around (Deadmau5 remix)&lt;/p&gt;

&lt;h1&gt;Full source&lt;/h1&gt;

&lt;h3&gt;build.hxml&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt;#build file
-cp src
-swf-version 9
-swf-header 500:200:300:FFFFFF
-main JumpAround
-swf deploy/out.swf
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;JumpAround.hx&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt;import flash.media.Sound;
import flash.media.SoundChannel;
import flash.media.SoundMixer;
import flash.media.SoundTransform;
import flash.media.SoundLoaderContext;
import flash.net.URLRequest;
import flash.events.Event;
import flash.events.IOErrorEvent;
import flash.utils.ByteArray;
import flash.Lib;
class JumpAround
{
    private var sound:Sound;
    private var transform: SoundTransform;
    private var channel:SoundChannel;
    private var spectrum: ByteArray;
    private var bl: Int;
    private var cl: Int;
    private var play_but: PlayPauseBut;

    private var house_of_pain: Array&amp;lt;Guy&amp;gt;;
    private static inline var house_of_pain_member_count: Int = 3;
    private var crowd: Array&amp;lt;Extra&amp;gt;;
    private static inline var crowd_count: Int = 8;

    private static inline var gravity: Float = 2.4;
    private static inline var threshold: Float = .26;
    private static inline var fft:Bool = true;
    private static inline var stretch:Int = 1;
    private static inline var PATH_TO_MP3: String = "DeadMau5_JumpAround.mp3";


    public function new()
    {
        house_of_pain = new Array&amp;lt;Guy&amp;gt;();
        crowd = new Array&amp;lt;Extra&amp;gt;();
        var i:Int;
        var guy:Guy;
        var extra:Extra;

        for(i in 0...crowd_count){
            extra = new Extra();
            crowd.push(extra);
            Lib.current.addChild(extra);
            extra.x = Lib.current.stage.stageWidth / crowd_count *i + (Lib.current.stage.stageWidth / crowd_count / 2);
            extra.y = Lib.current.stage.stageHeight - extra.RADIUS*1.5;
        }

        for(i in 0...house_of_pain_member_count){
            guy = new Guy();
            house_of_pain.push(guy);
            Lib.current.addChild(guy);
            guy.x = Lib.current.stage.stageWidth / house_of_pain_member_count *i + (Lib.current.stage.stageWidth / house_of_pain_member_count / 2);
            guy.y = Lib.current.stage.stageHeight - guy.RADIUS;
        }

        transform = new SoundTransform();
        loadSong(PATH_TO_MP3);
        spectrum = new ByteArray();

        bl = Std.int(256/house_of_pain_member_count);
        cl = Std.int(256/crowd_count);
        Lib.current.addEventListener( Event.ENTER_FRAME, loop );
    }

    private inline function loop( _ ): Void
    {
        SoundMixer.computeSpectrum(spectrum,fft,stretch);
        var i:Int;
        var j:Int = 0;
        var cj:Int = 0;
        var audio_level:Float = 0;
        var caudio_level:Float = 0;

        var s:Float = 0;
        var f:Float = 0;
        var cf:Float = 0;
        var avg:Float;
        for(i in 0...255){ // 512 for both channels, 256-1 cause  256/3 * 3 = 255
            s = spectrum.readFloat();
            f += s;
            cf += s;
            if(i % bl == 0){

                audio_level = f / bl;

                // lew end of spectrum gets lower threshold
                if(j == 0 &amp;amp;&amp;amp; audio_level &amp;gt; threshold*.04){
                    house_of_pain[0].jumpAround(audio_level*40);
                }else if(audio_level &amp;gt; threshold){
                    house_of_pain[j].jumpAround(audio_level);
                }
                j++;
                f = 0;
            }

            if(i % cl == 0 &amp;amp;&amp;amp; cj &amp;lt; crowd_count){
                caudio_level = cf / cl;
                // lew end of spectrum gets lower threshold
                if(cj == 0 &amp;amp;&amp;amp; caudio_level &amp;gt; threshold*.05){
                    crowd[0].jumpAround(caudio_level*6);
                }else if(cj &amp;lt; crowd_count/3 &amp;amp;&amp;amp; caudio_level &amp;gt; threshold){
                    crowd[cj].jumpAround(caudio_level);
                }else if(caudio_level &amp;gt; threshold){
                    crowd[cj].jumpAround(caudio_level*.5);
                }
                cj++;
                cf = 0;

            }

        }
        getDown();
    }

    private inline function getDown(  ): Void
    {
        var guy:Guy;
        var extra:Extra;
        for(guy in house_of_pain){
            if(!guy.onTheFloor()){
                guy.y+=gravity;
            }
            if(!guy.handDown()){
                guy.right_hand.y+=gravity;
            }
        }
        for(extra in crowd){
            if(!extra.onTheFloor()){
                extra.y+=gravity;
            }
            if(!extra.handDown()){
                extra.right_hand.y+=gravity;
            }
        }
    }

    private inline function loadSong(file:String):Void
    {
        sound = new Sound();
        var req:URLRequest = new URLRequest(file);
        var context:SoundLoaderContext = new SoundLoaderContext(8000,true);
        sound.addEventListener(IOErrorEvent.IO_ERROR, io_error);
        sound.addEventListener(Event.COMPLETE, soundLoaded);
        sound.load(req,context);
    }

    private inline function soundLoaded(_):Void
    {
        play_but = new PlayPauseBut(sound);
        Lib.current.addChild(play_but);
    }

    private inline function io_error(_):Void{ trace("can't load mp3"); }

    public static function main(): Void
    {
        var m: JumpAround = new JumpAround();
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;ok it’s not the most elegant code…&lt;/p&gt;

&lt;h3&gt;Guy.hx&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt;import flash.display.Sprite;
import flash.Lib;
class Guy extends Sprite{
    private static inline var HAND_RADIUS: Float = 12;
    private var COLOR: UInt;
    private var HAND_COLOR: UInt;
    public var RADIUS: Float;
    private static inline var JUMP_HEIGHT_MULTIPLIER: Float = 90;

    private var left_hand: Sprite;
    public var right_hand: Sprite;
    public function new(radius = 25, color = 0x359040, hand_color = 0xEFD9C8){
        super();
        RADIUS = radius;
        COLOR =  color;
        HAND_COLOR = hand_color; // forgot how to override

        graphics.beginFill(this.COLOR);
        graphics.drawCircle(0,0,RADIUS);
        graphics.endFill();

        left_hand = new Sprite();
        left_hand.graphics.beginFill(HAND_COLOR);
        left_hand.graphics.drawCircle(RADIUS,HAND_RADIUS,HAND_RADIUS);
        left_hand.graphics.endFill();
        addChild(left_hand);

        right_hand = new Sprite();
        right_hand.graphics.beginFill(HAND_COLOR);
        right_hand.graphics.drawCircle(-RADIUS,HAND_RADIUS,HAND_RADIUS);
        right_hand.graphics.endFill();
        addChild(right_hand);
    }

    public inline function onTheFloor(  ): Bool
    {
        if(y &amp;gt;= Lib.current.stage.stageHeight - RADIUS){
            right_hand.y = 0;
            return true;
        }else{
            return false;
        }
    }

    public inline function handDown(  ): Bool
    {
        if(right_hand.y &amp;gt;= 0){
            return true;
        }else{
            return false;
        }
    }

    public inline function jumpAround( _height:Float ): Void
    {
        if(onTheFloor()){
            y-= _height * JUMP_HEIGHT_MULTIPLIER;
            right_hand.y-= _height * HAND_RADIUS*10;
        }
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Extra.hx&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt;class Extra extends Guy{ // not sure why anymore

    public function new(){
        super(35, 0x157020, 0xCFB9A8);
        scaleX = scaleY = .6;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;PlayPauseBut.hx&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt;import com.remixtechnology.ShadowedTextField;
import flash.events.MouseEvent;
import flash.display.Sprite;
import flash.media.Sound;
import flash.media.SoundMixer;
import flash.media.SoundChannel;
class PlayPauseBut extends Sprite{
    private var start_txt: ShadowedTextField;
    private var stop_txt: ShadowedTextField;
    private var sound: Sound;
    private var playing: Bool;
    private var position: Float;
    private var channel: SoundChannel;
    public function new(_sound:Sound){
        sound = _sound;
        super();
        start_txt = new ShadowedTextField("Play");
        start_txt.setColor(0x7799CC);
        start_txt.setSize(24);
        stop_txt = new ShadowedTextField("Pause");
        stop_txt.setColor(0x888888);

        addChild(start_txt);

        addEventListener(MouseEvent.CLICK, click_start);
        position = 0;
    }
    private inline function click_start( _ ): Void
    {
        if(!playing){
            removeChild(start_txt);
            addChild(stop_txt);
            channel = sound.play(position);
            playing = true;
        }else{
            removeChild(stop_txt);
            addChild(start_txt);
            position = channel.position;
            channel.stop();
            playing = false;
        }
    }
    private inline function click_stop( _ ): Void
    {

    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;com.remixtechnology.ShadowedTextField&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt;package com.remixtechnology;

import flash.display.Sprite;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;
import flash.text.AntiAliasType;

class ShadowedTextField extends Sprite
{

    private var fgColor:UInt;
    private var bgColor:UInt;
    private var xoff:Float;
    private var yoff:Float;

    private var tfFore:TextField;
    private var tfBack:TextField;
    private var fmtFore:TextFormat;
    private var fmtBack:TextFormat;

    private var size:Int;
    private var font:String;

    public function new( ?text:String )
    {
        bgColor = 0x000000;
        fgColor = 0xFFCC00;
        xoff = 1;
        yoff = 1;
        size = 14;
        font = 'Verdana';

        mouseChildren = false;
        mouseEnabled = false;

        tfBack = new TextField();
        tfBack.autoSize = TextFieldAutoSize.LEFT;
        tfBack.selectable = false;
        tfBack.x = xoff;
        tfBack.y = yoff;
        addChild(tfBack);

        tfFore = new TextField();
        tfFore.autoSize = TextFieldAutoSize.LEFT;
        tfFore.selectable = false;
        addChild(tfFore);

        fmtFore = new TextFormat();
        fmtFore.color = fgColor;
        fmtFore.size = size;
        fmtFore.font = font;
        fmtFore.bold = true;

        fmtBack = new TextFormat();
        fmtBack.color = bgColor;
        fmtBack.size = size;
        fmtBack.font = font;
        fmtBack.bold = true;

        if(text != null) setText(text);

        super();
    }

    public inline function setText(n:String):Void
    {
        tfFore.text = n;
        tfFore.setTextFormat(fmtFore);

        tfBack.text = n;
        tfBack.setTextFormat(fmtBack);
    }

    public inline function appendText(n:String):Void
    {
        tfFore.appendText("\n" + n);
        tfFore.setTextFormat(fmtFore);

        tfBack.appendText("\n" + n);
        tfBack.setTextFormat(fmtBack);
    }

    public inline function setColor(color:UInt):Void
    {
        fmtFore.color = color;
        tfFore.setTextFormat(fmtFore);
    }

    public inline function setShadowColor(color:UInt):Void
    {
        fmtBack.color = color;
        tfBack.setTextFormat(fmtBack);
    }

    public inline function setSize(size:Int):Void{
        fmtFore.size = size;
        tfFore.setTextFormat(fmtFore);

        fmtBack.size = size;
        tfBack.setTextFormat(fmtBack);
    }

    public inline function bold(b:Bool):Void{
        if(b){
            fmtFore.bold = true;
            fmtBack.bold = true;
        }else{
            fmtFore.bold = false;
            fmtBack.bold = false;
        }
    }

}
&lt;/code&gt;&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://remixtechnology.com/">
    <author>
      <name>theRemix</name>
    </author>
    <id>tag:remixtechnology.com,2009-08-21:45377</id>
    <published>2009-08-21T02:23:00Z</published>
    <updated>2009-08-21T02:24:36Z</updated>
    <category term="haXe Projects" />
    <category term="actionscript3" />
    <category term="animation" />
    <category term="haxe" />
    <category term="source" />
    <category term="toy" />
    <link href="http://remixtechnology.com/view/songsincode-ring_around_the_rosy" rel="alternate" type="text/html" />
    <title>ringAround(rosies); #songsInCode</title>
<summary type="html">&lt;p&gt;Felt like making a &lt;a href="http://search.twitter.com/search?q=%23songsInCode"&gt;#songsInCode&lt;/a&gt; in &lt;a href="/tags/haXe"&gt;haXe&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and just for fun actually writing the code and compiling it to see how it might look.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ringAround(rosies);
for(girl in girls){
    girl.pocket.fill(new Posies());
}
ashes+=2;
for(girl in girls){
    girl.fall(DOWN);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;a href="/view/songsInCode-ring_around_the_rosy"&gt;read more to see the source code and result in action…&lt;/a&gt;&lt;/p&gt;</summary><content type="html">
            &lt;p&gt;Felt like making a &lt;a href="http://search.twitter.com/search?q=%23songsInCode"&gt;#songsInCode&lt;/a&gt; in &lt;a href="/tags/haXe"&gt;haXe&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and just for fun actually writing the code and compiling it to see how it might look.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ringAround(rosies);
for(girl in girls){
    girl.pocket.fill(new Posies());
}
ashes+=2;
for(girl in girls){
    girl.fall(DOWN);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;&lt;a href="/view/songsInCode-ring_around_the_rosy"&gt;read more to see the source code and result in action…&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Felt like making a &lt;a href="http://search.twitter.com/search?q=%23songsInCode"&gt;#songsInCode&lt;/a&gt; in &lt;a href="/tags/haXe"&gt;haXe&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and just for fun actually writing the code and compiling it to see how it might look.&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;ringAround(rosies);
for(girl in girls){
    girl.pocket.fill(new Posies());
}
ashes+=2;
for(girl in girls){
    girl.fall(DOWN);
}
&lt;/code&gt;&lt;/pre&gt;

&lt;p&gt;result… meh.&lt;/p&gt;

&lt;p&gt;

You need &lt;a href="http://get.adobe.com/flashplayer/" title="Get Flash"&gt;Flash 10&lt;/a&gt; to view the awesome. It’s a free and fast upgrade.
&lt;/p&gt;

&lt;h1&gt;Full source&lt;/h1&gt;

&lt;h3&gt;build.hxml&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt;#build file
-cp src
-swf-version 9
-swf-header 550:450:30:F5F0D9
-main RingAroundTheRosy
-swf deploy/out.swf
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;RingAroundTheRosy.hx&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt;/*
    Ring around the rosy
    A pocketful of posies
    "Ashes, Ashes"
    We all fall down!

    ringAround(rosies);
    for(girl in girls){
        girl.pocket.fill(new Posies());
    }
    ashes+=2;
    for(girl in girls){
        girl.fall(DOWN);
    }

    ringAround(rosies);
    for(girl in girls){ girl.pocket.fill(new Posies()); } 
    ashes+=2;
    for(girl in girls){ girl.fall(DOWN); } 
    #songsInCode

*/
import haxe.Timer;
import com.remixtechnology.Utils;
import flash.Lib;
import flash.events.Event;
class RingAroundTheRosy
{
    private var girls: Array&amp;lt;Girl&amp;gt;;
    private var rhyme_timer: Timer;
    private var rhyme_line_counter: Int;
    private var rhyme_lines: Array&amp;lt;String&amp;gt;;
    private var rosies: Rosies;
    private var ashes: Int;

    private static inline var DOWN: String = "DOWN";
    private static inline var GIRL_COUNT: Int = 5;
    private static inline var RHYME_SPEED: Int = 3000; // 3seconds
    private static inline var DANCE_SPEED: Float = .04; // girls rotating in circular motion
    private static inline var DANCE_RADIUS: Float = Rosies.RADIUS + Girl.RADIUS + 20;
    private static inline var DANCE_PADDING: Float = 1.3; // hard coded, but should be calculated off known radiuses
    private static var RHYME_LINES: Array&amp;lt;String&amp;gt; = [
        '"Ring around the rosy"',
        '"A pocketful of posies"',
        '"Ashes, Ashes"',
        '"We all fall down!"'
    ];
    private static var RHYME_IN_CODE_LINES: Array&amp;lt;String&amp;gt; = [
"ringAround(rosies);",
"for(girl in girls){
    girl.pocket.fill(new Posies());
}",
"ashes+=2;",
"for(girl in girls){
    girl.fall(DOWN);
}"
    ];
    private static inline var RHYME_COLOR: UInt = 0x812030;
    private static inline var SPAWN_WICKED_GIRLS_LINE: Int = 0;
    private static inline var FILL_POCKETS_LINE: Int = 1;
    private static inline var SENSELESS_ASHES_LINE: Int = 2;
    private static inline var DESTROY_ALL_GIRLS_LINE: Int = 3;

    public function new()
    {
        rhyme_timer = new Timer(RHYME_SPEED);
        rhyme_timer.run = rhyme_tick;
        rhyme_lines = RHYME_LINES;

        Utils.updateTrace("");
        Utils.stf.setColor(RHYME_COLOR);

        rosies = new Rosies();
        Lib.current.addChild(rosies);

    }

    private inline function rhyme_tick(  ): Void
    {
        Utils.trace(rhyme_lines[rhyme_line_counter]);

        switch(rhyme_line_counter){

            case SPAWN_WICKED_GIRLS_LINE:

                ringAround(rosies);

            case FILL_POCKETS_LINE:

                for(girl in girls){
                    girl.pocket.fill(new Posies());
                }

            case SENSELESS_ASHES_LINE:

                ashes+=2;

            case DESTROY_ALL_GIRLS_LINE:

                for(girl in girls){
                    girl.fall(DOWN);
                }
        }

        if(rhyme_line_counter++ == rhyme_lines.length){
            rhyme_line_counter = 0;
            if(rhyme_lines == RHYME_LINES){
                rhyme_lines = RHYME_IN_CODE_LINES;
            }else{
                rhyme_lines = RHYME_LINES;
            }
            Utils.updateTrace("");
        }
    }

    private inline function ringAround( target:Rosies ): Void
    {
        girls = new Array&amp;lt;Girl&amp;gt;();

        var i:Int;
        var girl:Girl;
        for(i in 0...GIRL_COUNT){

            // initial position
            girl = new Girl(this);
            girls.push(girl);
            girl.pocket.x = Math.sin(i) * Girl.RADIUS;
            girl.pocket.y = Math.cos(i) * Girl.RADIUS;
            girl.angle = i*DANCE_PADDING;
            girl.x = rosies.x + Math.sin(girl.angle) * DANCE_RADIUS;
            girl.y = rosies.y + Math.cos(girl.angle) * DANCE_RADIUS;
            Lib.current.addChild(girl);

            // add loop
            girl.addEventListener(Event.ENTER_FRAME, loop);
        }
    }

    public inline function loop(event:Event):Void{
        var girl:Girl = cast(event.target, Girl);
        girl.x = rosies.x + Math.sin(girl.angle) * DANCE_RADIUS;
        girl.y = rosies.y + Math.cos(girl.angle)  * DANCE_RADIUS;
        girl.angle += DANCE_SPEED;
    }

    public static function main(): Void
    {
        var m: RingAroundTheRosy = new RingAroundTheRosy();
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Girl.hx&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt;import flash.display.Sprite;
import flash.events.Event;
import flash.Lib;
class Girl extends Sprite{

    private var main: RingAroundTheRosy;
    private var fallspeed: Float;

    public var pocket: Pocket;
    public var angle: Float;

    private static inline var COLOR: UInt = 0xF093BC;
    public static inline var RADIUS: Float = 20; // girls that reveal their true weight O_O
    private static inline var FALL_FACTOR: Float = 1.5;

    public function new( _main:RingAroundTheRosy )
    {
        main = _main;
        super();
        graphics.beginFill(COLOR);
        graphics.drawCircle(0,0,RADIUS);
        graphics.endFill();

        pocket = new Pocket(); // yes they can only afford one
        addChild(pocket);

        addEventListener(Event.ENTER_FRAME, loop);

        fallspeed = 1;
    }

    private inline function loop( _ ): Void
    {
        rotation++;
    }

    private function falling( _ ): Void
    {
        y+= fallspeed *= FALL_FACTOR;
        if(y &amp;gt; Lib.current.stage.stageHeight + RADIUS){
            Lib.current.removeChild(this);
            removeEventListener(Event.ENTER_FRAME, loop);
            removeEventListener(Event.ENTER_FRAME, main.loop);
            removeEventListener(Event.ENTER_FRAME, falling);
        }
    }

    public inline function fall( where:String ): Void
    {
        // "where" does nothing really
        addEventListener(Event.ENTER_FRAME, falling);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Pocket.hx&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt;import flash.display.Sprite;
import flash.display.DisplayObject;
class Pocket extends Sprite{

    private static inline var COLOR: UInt = 0xA0538C;
    private static inline var RADIUS: Float = 10;

    public function new(  )
    {
        super();
        graphics.beginFill(COLOR);
        graphics.drawCircle(0,0,RADIUS);
        graphics.endFill();
    }

    public inline function fill( stuff:DisplayObject ): Void
    {
        addChild(stuff);
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Posies.hx&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt;import flash.display.Sprite;
class Posies extends Sprite{

    private static inline var COLOR: UInt = 0x9F8F23;
    private static inline var RADIUS: Float = 6;

    public function new(  )
    {
        super();
        graphics.beginFill(COLOR);
        graphics.drawCircle(0,0,RADIUS);
        graphics.endFill();
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;Rosies.hx&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt;import flash.display.Sprite;
import flash.events.Event;
import flash.Lib;
class Rosies extends Sprite{

    private static inline var COLOR: UInt = 0x450408;
    public static inline var RADIUS: Float = 35;

    public function new(  )
    {
        super();
        graphics.beginFill(COLOR);
        graphics.drawCircle(0,0,RADIUS);
        graphics.endFill();

        addEventListener(Event.ENTER_FRAME, loop);
    }

    private inline function loop( _ ): Void
    {
        x = Lib.current.mouseX;
        y = Lib.current.mouseY;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;com.remixtechnology.Utils&lt;/h3&gt;

&lt;p&gt;snippet, not full class file, only includes methods used for this app&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;package com.remixtechnology;
import flash.Lib;
import flash.Error;
import flash.display.Stage;
import flash.display.Sprite;
import flash.display.DisplayObject;
import flash.display.DisplayObjectContainer;
class Utils{
    public static var stf:ShadowedTextField;


    public static inline function trace(obj:Dynamic):Void{
        if(stf == null){
            stf = new ShadowedTextField();
            Lib.current.stage.addChild(stf);
            stf.setText(Std.string(obj));
        }else{
            stf.appendText(Std.string(obj));
        }
    }
    public static function updateTrace(obj:Dynamic):Void{
        if(stf != null){
            stf.setText(Std.string(obj));
        }else{
            Utils.trace(obj);
        }
    }

}
&lt;/code&gt;&lt;/pre&gt;

&lt;h3&gt;com.remixtechnology.ShadowedTextField&lt;/h3&gt;

&lt;pre&gt;&lt;code&gt;package com.remixtechnology;

import flash.display.Sprite;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;
import flash.text.AntiAliasType;

class ShadowedTextField extends Sprite
{

    private var fgColor:UInt;
    private var bgColor:UInt;
    private var xoff:Float;
    private var yoff:Float;

    private var tfFore:TextField;
    private var tfBack:TextField;
    private var fmtFore:TextFormat;
    private var fmtBack:TextFormat;

    private var size:Int;
    private var font:String;

    public function new( ?text:String )
    {
        bgColor = 0x000000;
        fgColor = 0xFFCC00;
        xoff = 1;
        yoff = 1;
        size = 14;
        font = 'Verdana';

        mouseChildren = false;
        mouseEnabled = false;

        tfBack = new TextField();
        tfBack.autoSize = TextFieldAutoSize.LEFT;
        tfBack.selectable = false;
        tfBack.x = xoff;
        tfBack.y = yoff;
        addChild(tfBack);

        tfFore = new TextField();
        tfFore.autoSize = TextFieldAutoSize.LEFT;
        tfFore.selectable = false;
        addChild(tfFore);

        fmtFore = new TextFormat();
        fmtFore.color = fgColor;
        fmtFore.size = size;
        fmtFore.font = font;
        fmtFore.bold = true;

        fmtBack = new TextFormat();
        fmtBack.color = bgColor;
        fmtBack.size = size;
        fmtBack.font = font;
        fmtBack.bold = true;

        if(text != null) setText(text);

        super();
    }

    public inline function setText(n:String):Void
    {
        tfFore.text = n;
        tfFore.setTextFormat(fmtFore);

        tfBack.text = n;
        tfBack.setTextFormat(fmtBack);
    }

    public inline function appendText(n:String):Void
    {
        tfFore.appendText("\n" + n);
        tfFore.setTextFormat(fmtFore);

        tfBack.appendText("\n" + n);
        tfBack.setTextFormat(fmtBack);
    }

    public inline function setColor(color:UInt):Void
    {
        fmtFore.color = color;
        tfFore.setTextFormat(fmtFore);
    }

    public inline function setShadowColor(color:UInt):Void
    {
        fmtBack.color = color;
        tfBack.setTextFormat(fmtBack);
    }

    public inline function setSize(size:Int):Void{
        fmtFore.size = size;
        tfFore.setTextFormat(fmtFore);

        fmtBack.size = size;
        tfBack.setTextFormat(fmtBack);
    }

    public inline function bold(b:Bool):Void{
        if(b){
            fmtFore.bold = true;
            fmtBack.bold = true;
        }else{
            fmtFore.bold = false;
            fmtBack.bold = false;
        }
    }

}
&lt;/code&gt;&lt;/pre&gt;
          </content>  </entry>
  <entry xml:base="http://remixtechnology.com/">
    <author>
      <name>theRemix</name>
    </author>
    <id>tag:remixtechnology.com,2009-08-20:45376</id>
    <published>2009-08-20T20:53:00Z</published>
    <updated>2009-08-20T20:54:02Z</updated>
    <category term="game" />
    <category term="video" />
    <link href="http://remixtechnology.com/view/insanely_twisted_shadow_world-game_trailer" rel="alternate" type="text/html" />
    <title>Insanely Twisted Shadow World - Game Trailer</title>
<content type="html">
            &lt;p&gt;

You need &lt;a href="http://get.adobe.com/flashplayer/" title="Get Flash"&gt;Flash 10&lt;/a&gt; to view the awesome. It’s a free and fast upgrade.
&lt;/p&gt;

&lt;p&gt;&lt;a href="http://www.gametrailers.com/video/exclusive-extended-insanely-twisted/52779"&gt;Link to HD video on gt.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;do i even need to write about this? watch the video and you’ll see why it deserves to be posted here.&lt;/p&gt;
          </content>  </entry>
  <entry xml:base="http://remixtechnology.com/">
    <author>
      <name>theRemix</name>
    </author>
    <id>tag:remixtechnology.com,2009-08-20:45375</id>
    <published>2009-08-20T20:23:00Z</published>
    <updated>2009-08-20T20:30:42Z</updated>
    <category term="audio" />
    <category term="flash" />
    <category term="toy" />
    <link href="http://remixtechnology.com/view/soytuaire-labuat-com-amazing-flash-interactive-music-video" rel="alternate" type="text/html" />
    <title>Amazing flash Interactive Music Video</title>
<content type="html">
            &lt;p&gt;I rarely post other people’s work on this site unless it’s just too amazing to not talk about…&lt;br /&gt;
…this is one of those times.&lt;/p&gt;

&lt;p&gt;&lt;a href="http://soytuaire.labuat.com"&gt;http://soytuaire.labuat.com&lt;/a&gt;&lt;/p&gt;

&lt;pre&gt;&lt;code&gt;music_video_loader.addEventListener(Event.COMPLETE, jaw_drops);
&lt;/code&gt;&lt;/pre&gt;
          </content>  </entry>
</feed>

