<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>timshaya</title>
	<atom:link href="http://timshaya.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://timshaya.wordpress.com</link>
	<description>Hello Programmistan!</description>
	<lastBuildDate>Fri, 20 Jan 2012 19:37:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='timshaya.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>timshaya</title>
		<link>http://timshaya.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://timshaya.wordpress.com/osd.xml" title="timshaya" />
	<atom:link rel='hub' href='http://timshaya.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Javascript Animation Example Using requestAnimFrame, Basic Trigonometry &amp; HTML5 Canvas &#8211; Part 3</title>
		<link>http://timshaya.wordpress.com/2012/01/10/javascript-animation-example-using-requestanimframe-basic-trigonometry-html5-canvas-part-3/</link>
		<comments>http://timshaya.wordpress.com/2012/01/10/javascript-animation-example-using-requestanimframe-basic-trigonometry-html5-canvas-part-3/#comments</comments>
		<pubDate>Tue, 10 Jan 2012 21:19:31 +0000</pubDate>
		<dc:creator>tim</dc:creator>
				<category><![CDATA[html5]]></category>
		<category><![CDATA[inheritance]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[oop]]></category>
		<category><![CDATA[prototypal]]></category>

		<guid isPermaLink="false">http://timshaya.wordpress.com/?p=612</guid>
		<description><![CDATA[Updating previous version to remove the use of &#8220;new function()&#8221; from the JS code. Alternate JS version, without classical inheritance The original code works fine but it feels weird to be using classical inheritance in a prototypal language &#8211; &#8220;new function&#8221; inside &#8220;TIMSHAYA.Triganimation = new function()&#8221;. Below is version of the JS code that removes [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timshaya.wordpress.com&amp;blog=7378811&amp;post=612&amp;subd=timshaya&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Updating <a href="http://timshaya.wordpress.com/2012/01/09/javascript-animation-example-using-requestanimframe-basic-trigonometry-html5-canvas-part-2/">previous version</a> to remove the use of &#8220;new function()&#8221; from the JS code. </p>
<h3>Alternate JS version, without classical inheritance</h3>
<p>The original code works fine but it feels weird to be using classical inheritance in a prototypal language &#8211; &#8220;new function&#8221; inside &#8220;TIMSHAYA.Triganimation = new function()&#8221;. Below is version of the JS code that removes &#8220;new function&#8221; and replaces it with &#8220;function()&#8221;, adding a &#8220;return&#8221; statement that in turn exposes the public &#8220;init&#8221; method, while maintaining closure (inner function init()&#8217;s access to it&#8217;s external function&#8217;s private members like &#8220;numsqr&#8221;, &#8220;drawRect()&#8221; &amp; &#8220;animate()&#8221;).</p>
<p>KEEP IN MIND: using the &#8220;new function&#8221; version might turn out to be faster in some cases as far as performance goes. <a href="http://jsperf.com/new-function-v-function">In this case</a>, jsPerf shows that Chrome 16 is the only browser where &#8220;new function&#8221; is faster than the inline version (unless I&#8217;m screwing up the test somehow).  </p>
<p>Note: Don&#8217;t forget to define requestAnimFrame (see HTML file <a href="http://timshaya.wordpress.com/2012/01/09/javascript-animation-example-using-requestanimframe-basic-trigonometry-html5-canvas-part-2/">here</a>).<br />
<pre class="brush: jscript;">
var TIMSHAYA   = TIMSHAYA || {}; //create your own namespace 

(function(whichCanvas){ 

   TIMSHAYA.Triganimation = function(){     
            var numsqr = 40;
            var mShapes = [];   
            var canvas = document.getElementById(whichCanvas);
            var context = canvas.getContext(&quot;2d&quot;);    

            function drawRect(myRect)
            {            
                context.beginPath();
                context.rect(myRect.x, myRect.y, myRect.width, myRect.height);
                
                context.fillStyle = &quot;#8ED6FF&quot;;
                context.fill();
                context.lineWidth = myRect.borderWidth;
                context.strokeStyle = &quot;black&quot;;
                context.stroke();
            }

            function animate(lastTime, mShapes, animProp)
            {
                if (animProp.animate) 
                {            
                    var date = new Date();
                    var time = date.getTime();
                    var timeDiff = time - lastTime;

                    for(var j = 0; j &lt; numsqr; j++)
                    {
                        mShapes[j].x = mShapes[j].centerX + Math.cos( mShapes[j].angle * Math.PI/180 ) * mShapes[j].radius;   
                        mShapes[j].y = mShapes[j].centerY + Math.sin( mShapes[j].angle * Math.PI/180 ) * mShapes[j].radius; 

                        (mShapes[j].angle &lt; 360) ? mShapes[j].angle += 1 : mShapes[j].angle = 0;      
                    }                            
                    lastTime = time;
                    
                    // clear canvas
                    context.clearRect(0, 0, canvas.width, canvas.height);
                    
                    // draw                    
                    for(var l = 0; l &lt; numsqr; l++)
                       drawRect(mShapes[l]);                    
                    
                    // request new frame
                    requestAnimFrame(function(){
                        animate(lastTime,  mShapes, animProp);
                    })
                }
            }
         
            return {
                init: function() {           
                        
                         for(var i = 0; i &lt; numsqr; i++)
                         {                     
                             mShapes[i] = {
                                angle:0,
                                width:20,
                                height:20,
                                x: 100 + i*10,
                                y: 270,
                                centerX: 290,
                                centerY: 290,      
                                radius: 250 - (1 + i * 5),            
                                borderWidth: 1
                            }
                         }
                     
                        var animProp = {
                            animate: false
                        }
                      
                        document.getElementById(whichCanvas).addEventListener(&quot;click&quot;, function(){
                            if (animProp.animate) {
                                animProp.animate = false;
                            }
                            else {
                                animProp.animate = true;
                                var date = new Date();
                                var time = date.getTime();
                                animate(time,  mShapes, animProp);
                            }
                        })
                      
                        for(var k = 0; k &lt; numsqr; k++)
                           drawRect( mShapes[k] );                                   
                    
                }    
            };        

    }(); 
 
    TIMSHAYA.Triganimation.init();

})(&quot;myCanvas&quot;);

</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timshaya.wordpress.com/612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timshaya.wordpress.com/612/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timshaya.wordpress.com/612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timshaya.wordpress.com/612/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/timshaya.wordpress.com/612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/timshaya.wordpress.com/612/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/timshaya.wordpress.com/612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/timshaya.wordpress.com/612/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timshaya.wordpress.com/612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timshaya.wordpress.com/612/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timshaya.wordpress.com/612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timshaya.wordpress.com/612/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timshaya.wordpress.com/612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timshaya.wordpress.com/612/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timshaya.wordpress.com&amp;blog=7378811&amp;post=612&amp;subd=timshaya&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://timshaya.wordpress.com/2012/01/10/javascript-animation-example-using-requestanimframe-basic-trigonometry-html5-canvas-part-3/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/021d7b69ed9737e46fc3a4b1e1082081?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tim</media:title>
		</media:content>
	</item>
		<item>
		<title>Javascript Animation Example Using requestAnimFrame, Basic Trigonometry &amp; HTML5 Canvas &#8211; Part 2</title>
		<link>http://timshaya.wordpress.com/2012/01/09/javascript-animation-example-using-requestanimframe-basic-trigonometry-html5-canvas-part-2/</link>
		<comments>http://timshaya.wordpress.com/2012/01/09/javascript-animation-example-using-requestanimframe-basic-trigonometry-html5-canvas-part-2/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 21:13:17 +0000</pubDate>
		<dc:creator>tim</dc:creator>
				<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[optimization]]></category>

		<guid isPermaLink="false">http://timshaya.wordpress.com/?p=611</guid>
		<description><![CDATA[Once you have the original HTML5 Canvas example working, here&#8217;s a cleaner version of the code that eliminates global variables, adds a namespace and cleans up the html a bit. The HTML file: The Javascript file Make sure it&#8217;s located here: &#8220;js/triganimation.js&#8221;:<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timshaya.wordpress.com&amp;blog=7378811&amp;post=611&amp;subd=timshaya&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Once you have the <a href="http://timshaya.wordpress.com/2012/01/06/quick-javascript-animation-using-requestanimframe-basic-trigonometry-html5-canvas/">original HTML5 Canvas example</a> working, here&#8217;s a cleaner version of the code that  eliminates global variables, adds a namespace and cleans up the html a bit.</p>
<h3>The HTML file:</h3>
<p><pre class="brush: jscript;">
&lt;!DOCTYPE HTML&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;style&gt;
            body { margin: 0px; padding: 0px; }            
            #myCanvas { border: 1px solid #9C9898; }
        &lt;/style&gt;
    &lt;/head&gt;
    &lt;body onmousedown=&quot;return false;&quot;&gt;

        Click the below canvas to start the animation: &lt;br /&gt;
        &lt;canvas id=&quot;myCanvas&quot; width=&quot;600&quot; height=&quot;600&quot;&gt;&lt;/canvas&gt;

       &lt;script&gt;
            window.requestAnimFrame = (function(callback){
                return window.requestAnimationFrame ||
                window.webkitRequestAnimationFrame ||
                window.mozRequestAnimationFrame ||
                window.oRequestAnimationFrame ||
                window.msRequestAnimationFrame ||
                function(callback){
                    window.setTimeout(callback, 1000 / 60);
                };
            })();            
        &lt;/script&gt;
        &lt;script src=&quot;js/triganimation.js&quot;&gt;&lt;/script&gt; 

    &lt;/body&gt;
&lt;/html&gt;
</pre></p>
<h3>The Javascript file</h3>
<p>Make sure it&#8217;s located here: &#8220;js/triganimation.js&#8221;:<br />
<pre class="brush: jscript;">
var TIMSHAYA   = TIMSHAYA || {}; //create your own namespace 

(function(whichCanvas){ 

   TIMSHAYA.Triganimation = new function() 
    {     
        var numsqr = 40;
        var mShapes = [];   
        var canvas = document.getElementById(whichCanvas);
        var context = canvas.getContext(&quot;2d&quot;);    

        function drawRect(myRect)
        {            
            context.beginPath();
            context.rect(myRect.x, myRect.y, myRect.width, myRect.height);
            
            context.fillStyle = &quot;#8ED6FF&quot;;
            context.fill();
            context.lineWidth = myRect.borderWidth;
            context.strokeStyle = &quot;black&quot;;
            context.stroke();
        }

        function animate(lastTime, mShapes, animProp)
        {
            if (animProp.animate) 
            {            
                var date = new Date();
                var time = date.getTime();
                var timeDiff = time - lastTime;

                for(var j = 0; j &lt; numsqr; j++)
                {
                    mShapes[j].x = mShapes[j].centerX + Math.cos( mShapes[j].angle * Math.PI/180 ) * mShapes[j].radius;   
                    mShapes[j].y = mShapes[j].centerY + Math.sin( mShapes[j].angle * Math.PI/180 ) * mShapes[j].radius; 

                    (mShapes[j].angle &lt; 360) ? mShapes[j].angle += 1 : mShapes[j].angle = 0;      
                }                            
                lastTime = time;
                
                // clear canvas
                context.clearRect(0, 0, canvas.width, canvas.height);
                
                // draw                    
                for(var l = 0; l &lt; numsqr; l++)
                   drawRect(mShapes[l]);                    
                
                // request new frame
                requestAnimFrame(function(){
                    animate(lastTime,  mShapes, animProp);
                })
            }
        }

        this.init = function()
        {           
            //alert(&quot;this = &quot; + this.name );
             for(var i = 0; i &lt; numsqr; i++)
             {                     
                 mShapes[i] = {
                    angle:0,
                    width:20,
                    height:20,
                    x: 100 + i*10,
                    y: 250,
                    centerX: 290,
                    centerY: 290,      
                    radius: 250 - (1 + i * 5),            
                    borderWidth: 1
                }
             }
         
            var animProp = {
                animate: false
            }
          
            document.getElementById(whichCanvas).addEventListener(&quot;click&quot;, function(){
                if (animProp.animate) {
                    animProp.animate = false;
                }
                else {
                    animProp.animate = true;
                    var date = new Date();
                    var time = date.getTime();
                    animate(time,  mShapes, animProp);
                }
            });
          
            for(var k = 0; k &lt; numsqr; k++)
               drawRect( mShapes[k] );                                   
        }
    } 
 
    TIMSHAYA.Triganimation.init();

})(&quot;myCanvas&quot;);
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timshaya.wordpress.com/611/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timshaya.wordpress.com/611/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timshaya.wordpress.com/611/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timshaya.wordpress.com/611/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/timshaya.wordpress.com/611/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/timshaya.wordpress.com/611/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/timshaya.wordpress.com/611/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/timshaya.wordpress.com/611/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timshaya.wordpress.com/611/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timshaya.wordpress.com/611/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timshaya.wordpress.com/611/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timshaya.wordpress.com/611/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timshaya.wordpress.com/611/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timshaya.wordpress.com/611/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timshaya.wordpress.com&amp;blog=7378811&amp;post=611&amp;subd=timshaya&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://timshaya.wordpress.com/2012/01/09/javascript-animation-example-using-requestanimframe-basic-trigonometry-html5-canvas-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/021d7b69ed9737e46fc3a4b1e1082081?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tim</media:title>
		</media:content>
	</item>
		<item>
		<title>Javascript Animation Example Using requestAnimFrame, Basic Trigonometry &amp; HTML5 Canvas &#8211; Part 1</title>
		<link>http://timshaya.wordpress.com/2012/01/06/quick-javascript-animation-using-requestanimframe-basic-trigonometry-html5-canvas/</link>
		<comments>http://timshaya.wordpress.com/2012/01/06/quick-javascript-animation-using-requestanimframe-basic-trigonometry-html5-canvas/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 22:33:48 +0000</pubDate>
		<dc:creator>tim</dc:creator>
				<category><![CDATA[html5]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[trigonometry]]></category>

		<guid isPermaLink="false">http://timshaya.wordpress.com/?p=591</guid>
		<description><![CDATA[Just playing around with animating HTML5 Canvas elements with Javascript. I started with this basic horizontally moving rectangle, then added some trig code to move multiple objects around in a circle. Here&#8217;s a demo. If the Math.sin() &#38; Math.cos() is confusing, watch the video tutorials on Trig and Unit Circle in particular at the Khan [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timshaya.wordpress.com&amp;blog=7378811&amp;post=591&amp;subd=timshaya&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Just playing around with animating HTML5 Canvas elements with Javascript. I started with this <a href="http://www.html5canvastutorials.com/advanced/html5-canvas-start-and-stop-an-animation/">basic horizontally moving rectangle</a>, then added some trig code to move multiple objects around in a circle. Here&#8217;s a <a href="http://timshaya.com/rd/js/canvas/trig1/">demo</a>. </p>
<p>If the Math.sin() &amp; Math.cos() is confusing, watch the video tutorials on <a href="http://www.khanacademy.org/video/basic-trigonometry?playlist=Trigonometry">Trig</a> and <a href="http://www.khanacademy.org/video/the-unit-circle-definition-of-trigonometric-function?playlist=Trigonometry">Unit Circle</a> in particular at the Khan Academy. </p>
<p><pre class="brush: jscript;">
&lt;!DOCTYPE HTML&gt;
&lt;html&gt;
    &lt;head&gt;
        &lt;style&gt;
            body {
                margin: 0px;
                padding: 0px;
            }
            
            #myCanvas {
                border: 1px solid #9C9898;
            }
        &lt;/style&gt;
        &lt;script&gt;
            var numsqr = 40;
            var mShapes = [];

            window.requestAnimFrame = (function(callback){
                return window.requestAnimationFrame ||
                window.webkitRequestAnimationFrame ||
                window.mozRequestAnimationFrame ||
                window.oRequestAnimationFrame ||
                window.msRequestAnimationFrame ||
                function(callback){
                    window.setTimeout(callback, 1000 / 60);
                };
            })();
            
            function drawRect(myRectangle){
                var canvas = document.getElementById(&quot;myCanvas&quot;);
                var context = canvas.getContext(&quot;2d&quot;);
                context.beginPath();
                context.rect(myRectangle.x, myRectangle.y, myRectangle.width, myRectangle.height);
                
                context.fillStyle = &quot;#8ED6FF&quot;;
                context.fill();
                context.lineWidth = myRectangle.borderWidth;
                context.strokeStyle = &quot;black&quot;;
                context.stroke();
            }
            
            function animate(lastTime,  mShapes, animProp){
                if (animProp.animate) {
                    var canvas = document.getElementById(&quot;myCanvas&quot;);
                    var context = canvas.getContext(&quot;2d&quot;);
                    
                    // update
                    var date = new Date();
                    var time = date.getTime();
                    var timeDiff = time - lastTime;
        
                    for(var j = 0; j &lt; numsqr; j++){
                        
                        //circles around a midpoint in a larger circle, specified by the radius                              
                        mShapes[j].x = mShapes[j].centerX + Math.cos( mShapes[j].angle * Math.PI/180 ) * mShapes[j].radius;   
                        mShapes[j].y = mShapes[j].centerY + Math.sin( mShapes[j].angle * Math.PI/180 ) * mShapes[j].radius; 

                        (mShapes[j].angle &lt; 360) ? mShapes[j].angle += 1 : mShapes[j].angle = 0;      
                    }                            
                    lastTime = time;
                    
                    // clear
                    context.clearRect(0, 0, canvas.width, canvas.height);
                    
                    // draw                    
                    for(var l = 0; l &lt; numsqr; l++)
                       drawRect(mShapes[l]);                    
                    
                    // request new frame
                    requestAnimFrame(function(){
                        animate(lastTime,  mShapes, animProp);
                    });
                }
            }
            
            window.onload = function(){

                 for(var i = 0; i &lt; numsqr; i++){                     
                     mShapes[i] = {
                        angle:0,
                        width:20,
                        height:20,
                        x: 100 + i*10,
                        y: 250,
                        centerX: 290,
                        centerY: 290,      
                        radius: 250 - (1 + i * 5),            
                        borderWidth: 1
                    };
                 }
                    
                /*
                 * make the animation properties an object
                 * so that it can be modified by reference
                 * from an event
                 */
                var animProp = {
                    animate: false
                };
                
                // add click listener to canvas
                document.getElementById(&quot;myCanvas&quot;).addEventListener(&quot;click&quot;, function(){
                    if (animProp.animate) {
                        animProp.animate = false;
                    }
                    else {
                        animProp.animate = true;
                        var date = new Date();
                        var time = date.getTime();
                        animate(time,  mShapes, animProp);
                    }
                });
              
                for(var k = 0; k &lt; numsqr; k++)
                     drawRect( mShapes[k] );   
                 
            };
        &lt;/script&gt;
    &lt;/head&gt;
    &lt;body onmousedown=&quot;return false;&quot;&gt;
        &lt;canvas id=&quot;myCanvas&quot; width=&quot;600&quot; height=&quot;600&quot;&gt;&lt;/canvas&gt;
    &lt;/body&gt;
&lt;/html&gt;
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timshaya.wordpress.com/591/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timshaya.wordpress.com/591/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timshaya.wordpress.com/591/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timshaya.wordpress.com/591/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/timshaya.wordpress.com/591/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/timshaya.wordpress.com/591/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/timshaya.wordpress.com/591/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/timshaya.wordpress.com/591/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timshaya.wordpress.com/591/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timshaya.wordpress.com/591/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timshaya.wordpress.com/591/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timshaya.wordpress.com/591/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timshaya.wordpress.com/591/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timshaya.wordpress.com/591/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timshaya.wordpress.com&amp;blog=7378811&amp;post=591&amp;subd=timshaya&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://timshaya.wordpress.com/2012/01/06/quick-javascript-animation-using-requestanimframe-basic-trigonometry-html5-canvas/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/021d7b69ed9737e46fc3a4b1e1082081?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tim</media:title>
		</media:content>
	</item>
		<item>
		<title>Matrix Math Practice in AS3.0 with TweenMax &amp; transformMatrix Plugin</title>
		<link>http://timshaya.wordpress.com/2012/01/06/matrix-math-practice-in-as3-0-with-tweenmax/</link>
		<comments>http://timshaya.wordpress.com/2012/01/06/matrix-math-practice-in-as3-0-with-tweenmax/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 17:00:22 +0000</pubDate>
		<dc:creator>tim</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[algebra]]></category>
		<category><![CDATA[matrix math]]></category>

		<guid isPermaLink="false">http://timshaya.wordpress.com/?p=586</guid>
		<description><![CDATA[<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timshaya.wordpress.com&amp;blog=7378811&amp;post=586&amp;subd=timshaya&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><pre class="brush: as3;">
package
{
	import flash.display.MovieClip;
	import flash.display.Shape;
	import flash.display.Sprite;
	import flash.geom.Matrix;
	import com.greensock.TweenMax;
	import com.greensock.plugins.*;
	
	[SWF (width=&quot;500&quot;, height=&quot;500&quot;, backgroundColor=&quot;#CCCCCC&quot;, frameRate=&quot;30&quot;)]		
	public class MatrixMathTesting extends Sprite
	{
		private var mc:MovieClip = new MovieClip();
		private var wishMatrix:Matrix = new Matrix;
		
		public function MatrixMathTesting()
		{
			TweenPlugin.activate([TransformMatrixPlugin]);
			
			mc.x = 250;
			mc.y = 250;
			addChild( mc );
			
			var sq:Shape = new Shape();
			sq.graphics.beginFill( 0x000000, .5 );
			sq.graphics.drawRect( 0, 0, 100, 100 );
			sq.graphics.endFill();			
			
			mc.addChild( sq );			
			
			var ar:Array = [ [2,   0], 		//[x-scale (a), y-skew (b)]
					  		 [0.5, 1],		//[ x-skew (c), y-scale (d) ]
					   		 [mc.x, mc.y] ]; //[x-position (tx), y-position (ty)] 
			
			transformMC( wishMatrix, ar );
			
			TweenMax.delayedCall( 2, removeTransform, [wishMatrix] );
			 
		}
	
		public function transformMC( m:Matrix, arr:Array ):void 
		{
			TweenMax.to(mc, 1, {transformMatrix:{ a:arr[0][0],  b:arr[0][1], 
										          c:arr[1][0],  d:arr[1][1], 
												  tx:arr[2][0], ty:arr[2][1] }});						
		}
		
		public function transformMCSimple( m:Matrix, arr:Array ):void 
		{			
			m.a  = arr[0][0];  //	 x-scale
			m.b  = arr[0][1];  //  	 y-skew
			m.c  = arr[1][0];  //	 x-skew 
			m.d  = arr[1][1];  //		 y-scale
			m.tx = arr[2][0]; //	 x-position 
			m.ty = arr[2][1]; //	 y-position 
			
			mc.transform.matrix = wishMatrix;
		}
		
		public function removeTransform( m:Matrix ):void
		{		
			//tween back to an identity matrix		
			TweenMax.to(mc, 1, {transformMatrix:{a:1, b:0, c:0, d:1, tx:mc.x, ty:mc.y }}); 
		}
		
		public function removeTransformSimple( m:Matrix ):void
		{		
			//no anmation, back to identity matrix (removes all previous transformations)
			m.a  = 1; m.b  = 0; 
			m.c  = 0; m.d  = 1;  
			m.tx = m.tx; m.ty = m.ty;			
			
			mc.transform.matrix = m;			
		}		
		
	}
}
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timshaya.wordpress.com/586/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timshaya.wordpress.com/586/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timshaya.wordpress.com/586/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timshaya.wordpress.com/586/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/timshaya.wordpress.com/586/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/timshaya.wordpress.com/586/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/timshaya.wordpress.com/586/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/timshaya.wordpress.com/586/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timshaya.wordpress.com/586/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timshaya.wordpress.com/586/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timshaya.wordpress.com/586/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timshaya.wordpress.com/586/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timshaya.wordpress.com/586/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timshaya.wordpress.com/586/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timshaya.wordpress.com&amp;blog=7378811&amp;post=586&amp;subd=timshaya&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://timshaya.wordpress.com/2012/01/06/matrix-math-practice-in-as3-0-with-tweenmax/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/021d7b69ed9737e46fc3a4b1e1082081?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tim</media:title>
		</media:content>
	</item>
		<item>
		<title>Quick port of &#8220;Mac Dock Style Menu with AS3.0&#8243; into a single class</title>
		<link>http://timshaya.wordpress.com/2011/10/19/quick-port-of-mac-dock-style-menu-with-as3-0-into-a-single-class/</link>
		<comments>http://timshaya.wordpress.com/2011/10/19/quick-port-of-mac-dock-style-menu-with-as3-0-into-a-single-class/#comments</comments>
		<pubDate>Wed, 19 Oct 2011 16:01:09 +0000</pubDate>
		<dc:creator>tim</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[as3]]></category>

		<guid isPermaLink="false">http://timshaya.wordpress.com/?p=575</guid>
		<description><![CDATA[Here&#8217;s a Document Class version of an ActiveTuts+ tutorial called Create a Mac Dock Style Menu with AS3. Here&#8217;s what I changed: removed each button&#8217;s dependence on 3-level deep inheritance (OverButton &#62; DockButton &#62; DockItem) removed each Library symbol&#8217;s linkage to OverButton.as simplified the menu a bit for the purposes of this example, so that [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timshaya.wordpress.com&amp;blog=7378811&amp;post=575&amp;subd=timshaya&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a Document Class version of an <a href="http://active.tutsplus.com/tutorials/actionscript/create-a-mac-dock-style-menu-with-as3/">ActiveTuts+ tutorial</a> called <em>Create a Mac Dock Style Menu with AS3</em>. </p>
<p>Here&#8217;s what I changed: </p>
<ul>
<li>removed each button&#8217;s dependence on 3-level deep inheritance (OverButton &gt; DockButton &gt; DockItem)</li>
<li>removed each Library symbol&#8217;s linkage to OverButton.as</li>
<li>simplified the menu a bit for the purposes of this example, so that only the X axis moves. It&#8217;s easy enough to add in the Y axis &amp; scale variables, if/when needed. You should be able to extend DockMenu.as to add the extra features, like Y axis movement &amp; Scaling or add those vars directly.</li>
</ul>
<p><pre class="brush: as3;">
package 
{	
	import flash.display.MovieClip;
	import flash.display.Sprite;
	import flash.events.Event;
	import flash.events.MouseEvent;
	import flash.geom.Rectangle;
	import com.greensock.TweenMax;
	import flash.display.DisplayObjectContainer;
	
	public class DockMenu extends MovieClip
	{					
		protected var maxXDistance:Number = 50;
		protected var menuXes:Array = []; 
		protected var menuBtns:Array = []; 
		
		public function DockMenu():void 
		{
			addEventListener( Event.ADDED_TO_STAGE, init );			
		}					
	
		public function init(e:Event=null):void
		{			
			removeEventListener( Event.ADDED_TO_STAGE, init );						
			
			//uncheck &quot;Export for Actionscript&quot; for each of 
            //the button mc's in the Library			
			menuBtns = [star, config, apple, photo, shop, cont ]; 
			
			for( var f:uint=0; f &lt; 6; f++ )
			{
				menuXes[f] = menuBtns[f].x; 
				menuBtns[f].buttonMode = true;
				menuBtns[f].mouseChildren = false; 
				var bounds:Rectangle = getBounds( menuBtns[f] );
				var hit:Sprite = new Sprite();
				hit.graphics.beginFill( 0,0 );
				hit.graphics.drawRect( bounds.x, bounds.y, bounds.width, bounds.height );		
				menuBtns[f].addChild( hit );
			}
			
			stage.addEventListener( MouseEvent.MOUSE_MOVE, mouseMove );
			stage.addEventListener( Event.MOUSE_LEAVE, mouseLeave );			
		}
		
		public function mouseMove(e:MouseEvent):void
		{								
			for( var g:uint=0; g &lt; 6; g++ )
			{
				var xDistance:Number = mouseX - menuXes[g]; 
				xDistance = xDistance &gt; maxXDistance ? maxXDistance : xDistance; 			
				xDistance = xDistance &lt; -maxXDistance ? -maxXDistance : xDistance;
				var posX:Number = menuXes[g] - xDistance * 0.2; 
				TweenMax.to( menuBtns[g], .2, { x:posX } );		
			}		
		}
				
		public function mouseLeave(e:Event):void
		{			
			for( var h:uint=0; h &lt; 6; h++ )
				TweenMax.to( menuBtns[h], .3, { x:menuXes[h] } );
		}
	}	
}
</pre></p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timshaya.wordpress.com/575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timshaya.wordpress.com/575/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timshaya.wordpress.com/575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timshaya.wordpress.com/575/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/timshaya.wordpress.com/575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/timshaya.wordpress.com/575/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/timshaya.wordpress.com/575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/timshaya.wordpress.com/575/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timshaya.wordpress.com/575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timshaya.wordpress.com/575/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timshaya.wordpress.com/575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timshaya.wordpress.com/575/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timshaya.wordpress.com/575/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timshaya.wordpress.com/575/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timshaya.wordpress.com&amp;blog=7378811&amp;post=575&amp;subd=timshaya&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://timshaya.wordpress.com/2011/10/19/quick-port-of-mac-dock-style-menu-with-as3-0-into-a-single-class/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/021d7b69ed9737e46fc3a4b1e1082081?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tim</media:title>
		</media:content>
	</item>
		<item>
		<title>Google / DoubleClick Studio V2 Components break when Flashbug add-on is installed in Firefox</title>
		<link>http://timshaya.wordpress.com/2011/09/20/google-doubleclick-studio-v2-components-break-when-flashbug-add-on-is-installed-in-firefox/</link>
		<comments>http://timshaya.wordpress.com/2011/09/20/google-doubleclick-studio-v2-components-break-when-flashbug-add-on-is-installed-in-firefox/#comments</comments>
		<pubDate>Tue, 20 Sep 2011 19:26:58 +0000</pubDate>
		<dc:creator>tim</dc:creator>
				<category><![CDATA[banners]]></category>
		<category><![CDATA[rich media]]></category>

		<guid isPermaLink="false">http://timshaya.wordpress.com/?p=624</guid>
		<description><![CDATA[We had this problem with DoubleClick&#8217;s Version 2 components, version 2.1.3. A buddy of mine lost hours of dev time trying to debug this problem &#8211; thanks Won! After installing the .mxp everything appeared to work ok, but as soon as you tried to select the component and edit any of it&#8217;s settings in the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timshaya.wordpress.com&amp;blog=7378811&amp;post=624&amp;subd=timshaya&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>We had this problem with DoubleClick&#8217;s Version 2 components, version 2.1.3. A buddy of mine lost hours of dev time trying to debug this problem &#8211; thanks Won! </p>
<p>After installing the .mxp everything appeared to work ok, but as soon as you tried to select the component and edit any of it&#8217;s settings in the Component Inspector, the radio buttons, check boxes &amp; text fields in the inspector turned out to be totally unclickable. </p>
<p>The only solution that worked for us was to completely uninstall Flashbug add-on from Firefox. Disabling it didn&#8217;t work, we had to totally uninstall. It&#8217;s annoying, yes.    </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timshaya.wordpress.com/624/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timshaya.wordpress.com/624/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timshaya.wordpress.com/624/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timshaya.wordpress.com/624/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/timshaya.wordpress.com/624/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/timshaya.wordpress.com/624/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/timshaya.wordpress.com/624/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/timshaya.wordpress.com/624/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timshaya.wordpress.com/624/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timshaya.wordpress.com/624/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timshaya.wordpress.com/624/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timshaya.wordpress.com/624/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timshaya.wordpress.com/624/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timshaya.wordpress.com/624/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timshaya.wordpress.com&amp;blog=7378811&amp;post=624&amp;subd=timshaya&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://timshaya.wordpress.com/2011/09/20/google-doubleclick-studio-v2-components-break-when-flashbug-add-on-is-installed-in-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/021d7b69ed9737e46fc3a4b1e1082081?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tim</media:title>
		</media:content>
	</item>
		<item>
		<title>Flash Builder &amp; Apparat example: BUILD FAILED &#8220;java.io.IOException: Cannot run program &#8220;&#8230;/mxmlc&#8221; (in directory &#8220;&#8230;/apparat-ant-example&#8221;): error=2, No such file or directory</title>
		<link>http://timshaya.wordpress.com/2011/06/29/flash-builder-apparat-example-build-failed-java-io-ioexception-cannot-run-program-mxmlc-in-directory-apparat-ant-example-error2-no-such-file-or-directory/</link>
		<comments>http://timshaya.wordpress.com/2011/06/29/flash-builder-apparat-example-build-failed-java-io-ioexception-cannot-run-program-mxmlc-in-directory-apparat-ant-example-error2-no-such-file-or-directory/#comments</comments>
		<pubDate>Wed, 29 Jun 2011 21:55:27 +0000</pubDate>
		<dc:creator>tim</dc:creator>
				<category><![CDATA[actionscript]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[apparat]]></category>
		<category><![CDATA[java]]></category>

		<guid isPermaLink="false">http://timshaya.wordpress.com/?p=569</guid>
		<description><![CDATA[Made sure my Flash Builder 4.5 on OSX 10.5 is set to use Java 1.6 (out of the box it came set to use JVM 1.5). Followed the instructions on webdevotion.be and cultcreative.com. When it came time to do &#8220;Run As &#62; Ant Build&#8221; I kept getting this error: After trying a bunch of things, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timshaya.wordpress.com&amp;blog=7378811&amp;post=569&amp;subd=timshaya&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Made sure my Flash Builder 4.5 on OSX 10.5 is set to use Java 1.6 (out of the box it came set to use JVM 1.5).</p>
<p>Followed the instructions on <a href="http://webdevotion.be/blog/2010/06/02/how-to-get-up-and-running-with-apparat/">webdevotion.be</a> and <a href="http://www.cultcreative.com/tutorials/2010/09/flash-builder-and-apparat/">cultcreative.com</a>.</p>
<p>When it came time to do &#8220;Run As &gt; Ant Build&#8221; I kept getting this error:<br />
<pre class="brush: java;">
Buildfile: /your_path_to_example_folder/apparat-ant-example/build/build.xml
clean:
compile:

BUILD FAILED
/your_path_to_example_folder/apparat-ant-example/build/build.xml:64:
Execute failed: java.io.IOException: Cannot run program &quot;/Applications/Adobe%20Flash%20Builder%204.5/sdks/4.5.0/bin/mxmlc&quot;
(in directory &quot;/your_path_to_example_folder/apparat-ant-example&quot;): error=2, No such file or directory

Total time: 860 milliseconds
</pre></p>
<p>After trying a bunch of things, it turned out it was a permissions problem. </p>
<p>To fix it, I swapped Flex SDK to one outside of /Applications/ folder. Inside the project&#8217;s build.properties I updated FLEX_HOME line to:<br />
<pre class="brush: xml;">
FLEX_HOME=/your_path_to_sdk/Flex_SDKs/4.1.0
</pre><br />
instead of<br />
<pre class="brush: xml;">
FLEX_HOME=/Applications/Flash%20Builder%204.5/sdks/4.5.0
</pre><br />
and it worked.  </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timshaya.wordpress.com/569/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timshaya.wordpress.com/569/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timshaya.wordpress.com/569/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timshaya.wordpress.com/569/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/timshaya.wordpress.com/569/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/timshaya.wordpress.com/569/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/timshaya.wordpress.com/569/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/timshaya.wordpress.com/569/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timshaya.wordpress.com/569/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timshaya.wordpress.com/569/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timshaya.wordpress.com/569/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timshaya.wordpress.com/569/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timshaya.wordpress.com/569/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timshaya.wordpress.com/569/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timshaya.wordpress.com&amp;blog=7378811&amp;post=569&amp;subd=timshaya&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://timshaya.wordpress.com/2011/06/29/flash-builder-apparat-example-build-failed-java-io-ioexception-cannot-run-program-mxmlc-in-directory-apparat-ant-example-error2-no-such-file-or-directory/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/021d7b69ed9737e46fc3a4b1e1082081?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tim</media:title>
		</media:content>
	</item>
		<item>
		<title>NetStream.Play.StreamNotFound Error and AS3.0 Video Player with Facebook CDN mp4 Files</title>
		<link>http://timshaya.wordpress.com/2011/06/09/netstream-play-streamnotfound-error-and-as3-0-video-player-with-facebook-cdn-mp4-files/</link>
		<comments>http://timshaya.wordpress.com/2011/06/09/netstream-play-streamnotfound-error-and-as3-0-video-player-with-facebook-cdn-mp4-files/#comments</comments>
		<pubDate>Thu, 09 Jun 2011 21:33:11 +0000</pubDate>
		<dc:creator>tim</dc:creator>
				<category><![CDATA[as3]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[cdn]]></category>
		<category><![CDATA[StreamNotFound]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://timshaya.wordpress.com/?p=560</guid>
		<description><![CDATA[While coding a Flash video player for an iFrame-based mostly-HTML Facebook app a .NET / Front End developer &#38; I ran into this annoying problem. When we tried to load videos stored in via a Facebook account (in mp4 format) on an Akamai (or competitor&#8217;s) CDN server (with server url similar to http://video.ak.fbcdn.net) into our [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timshaya.wordpress.com&amp;blog=7378811&amp;post=560&amp;subd=timshaya&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>While coding a Flash video player for an iFrame-based mostly-HTML Facebook app a .NET / Front End developer &amp; I ran into this annoying problem.  </p>
<p>When we tried to load videos stored in via a Facebook account (in mp4 format) on an Akamai (or competitor&#8217;s) <a href="http://en.wikipedia.org/wiki/Content_delivery_network">CDN</a> server (with server url similar to http://video.ak.fbcdn.net) into our custom progressive download video player kept giving us the &#8220;NetStream.Play.StreamNotFound&#8221; error.  </p>
<p>We tried everything from looking at HTTP Headers, to finding an Adobe Employee&#8217;s post on Adobe forums that said this might not be possible (with Strobe Media Player &amp; Facebook CDN video) to considering alternative hosting. Googling didn&#8217;t reveal too many results on this specific issue. <a href="http://forums.adobe.com/thread/772152?decorator=print&amp;displayFullThread=true">This one</a> was perhaps the most informative.   </p>
<p>In the end, the .NET / Javascript developer I was working with decided to try URL encoding the string that was passed to the video player via a FlashVar. That fixed the problem! </p>
<p>The best part is that now, we can meet our needs AND avoid having to figure out an alternative hosting solution. </p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timshaya.wordpress.com/560/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timshaya.wordpress.com/560/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timshaya.wordpress.com/560/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timshaya.wordpress.com/560/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/timshaya.wordpress.com/560/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/timshaya.wordpress.com/560/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/timshaya.wordpress.com/560/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/timshaya.wordpress.com/560/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timshaya.wordpress.com/560/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timshaya.wordpress.com/560/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timshaya.wordpress.com/560/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timshaya.wordpress.com/560/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timshaya.wordpress.com/560/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timshaya.wordpress.com/560/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timshaya.wordpress.com&amp;blog=7378811&amp;post=560&amp;subd=timshaya&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://timshaya.wordpress.com/2011/06/09/netstream-play-streamnotfound-error-and-as3-0-video-player-with-facebook-cdn-mp4-files/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/021d7b69ed9737e46fc3a4b1e1082081?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tim</media:title>
		</media:content>
	</item>
		<item>
		<title>Some Notes on an Unsuccessful Install Attempt of Particle Code for AS3.0 Developers on OS X 10.5.8</title>
		<link>http://timshaya.wordpress.com/2011/05/23/installing-particle-code-for-as3-0-developers-on-os-x-10-5-8/</link>
		<comments>http://timshaya.wordpress.com/2011/05/23/installing-particle-code-for-as3-0-developers-on-os-x-10-5-8/#comments</comments>
		<pubDate>Mon, 23 May 2011 22:48:24 +0000</pubDate>
		<dc:creator>tim</dc:creator>
				<category><![CDATA[as3]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[particle code]]></category>

		<guid isPermaLink="false">http://timshaya.wordpress.com/?p=556</guid>
		<description><![CDATA[Particle Code (BETA) is a new Eclipse plugin that aims to allow AS3.0 &#38; Java developers (and soon C#) to be able to port their applications to HTML5, iOS, Android, WindowsPhone, Blackberry &#38; WebOS via the Particle SDK. After lots of back &#38; forth, it looks like the reason this install failed is because I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timshaya.wordpress.com&amp;blog=7378811&amp;post=556&amp;subd=timshaya&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.particlecode.com/">Particle Code</a> (BETA) is a new Eclipse plugin that aims to allow AS3.0 &amp; Java developers (and soon C#) to be able to port their applications to HTML5, iOS, Android, WindowsPhone, Blackberry &amp; WebOS via the Particle SDK. </p>
<p>After lots of back &amp; forth, it looks like the reason this install failed is because I tried to install Python 2.6 manually while using MacPorts to install the Python Image Library. <strong>The recommended way is to use Macports (or similar) to install both with all necessary components.</strong> </p>
<p><strong>1. Sign up for their website account &amp; they&#8217;ll email you a login/pass</strong><br />
<strong>2. To install on OS X 10.5.8, you need: </strong></p>
<ul>
<li> JDK 1.6 (64-bit)</li>
<li> Python 2.6</li>
<li> &#8211; Python Imaging Library (PIL) 1.1.7 or newer</li>
<li> &#8211; Eclipse 3.4+ (64-bit)</li>
</ul>
<p><strong>3. Check if you have JDK 1.6 installed:</strong></p>
<ul>
<li> go to Applications/Utilities/Java Preferences </li>
<li> if you see Java SE 1.6 under the General tab, drag it up to the top of the list</li>
<li>then open Terminal, type &#8220;java -version&#8221; at the prompt, you should see something like &#8216;java version &#8220;1.6.0_24&#8243;&#8216; </li>
</ul>
<p><strong>4. Check if you have Python 2.6 installed </strong></p>
<ul>
<li>in Terminal type &#8220;python -h&#8221;</li>
<li>you should see a path like: /System/Library/Frameworks/Python.framework/Versions/2.5/&#8230;. (Mac OS X 10.5 comes with Python 2.5)</li>
</ul>
<p>&#8220;/2.5/&#8221; in that path means you have to install Python 2.6 [1]: </p>
<p>http://www.python.org/download/releases/2.6.6/</p>
<p>After you run the installer, entering &#8220;python &#8211; h&#8221; in Terminal should show &#8220;/2.6/&#8221; as your default Python version: /Library/Frameworks/Python.framework/Versions/2.6/</p>
<p><strong>5. Download the Python Image Library 1.1.7</strong></p>
<ul>
<li>it should auto unzip into a folder on you desktop, open it</li>
<li> There&#8217;re manual ways to install it that take a bunch of steps &amp; possible manual installs<br />
of additional components required; look for a file named README in the PIL folder </li>
<li> there&#8217;re 2 tools that are supposed to simplify installing PIL: MacPorts &amp; Fink, both require Xcode  to be installed on your machine. </li>
<li>Main advantage of MacPorts in general: &#8220;Installs automatically any required support software, known as dependencies, for a given port.&#8221; http://guide.macports.org/</li>
<li>I installed MacPorts for Leppard from here: http://www.macports.org/install.php</li>
<li>run &#8220;sudo port -v selfupdate&#8221; to make sure MacPorts is up to date</li>
</ul>
<p>I ran &#8220;sudo port install py26-pil&#8221; and got a whopping list of dependencies to be installed for PIL (which MacPorts did for me):</p>
<blockquote><p>
&#8212;&gt;  Computing dependencies for py26-pil<br />
&#8212;&gt;  Dependencies to be installed: freetype zlib jpeg lcms tiff py26-tkinter python26 bzip2 db46 gdbm gettext expat libiconv gperf ncurses ncursesw openssl python_select readline sqlite3 tk Xft2 fontconfig pkgconfig xrender xorg-libX11 xorg-bigreqsproto xorg-inputproto xorg-kbproto xorg-libXau xorg-xproto xorg-libXdmcp xorg-libxcb python27 xorg-libpthread-stubs xorg-xcb-proto libxml2 xorg-util-macros xorg-xcmiscproto xorg-xextproto xorg-xf86bigfontproto xorg-xtrans xorg-renderproto tcl xorg-libXScrnSaver xorg-libXext xorg-scrnsaverproto&#8230;
</p></blockquote>
<p>This took a little while&#8230; wait until you see this line: [Process completed]&#8230; </p>
<p>NOTE: MacPorts may try to make Python 2.7 or later your default version of Python.<br />
Since ParticleCode doesn&#8217;t work with Python 2.7 or 3.x, you might need to manually switch to 2.6: <br />
&#8220;To make python 2.6 the default (i.e. the version you get when you run &#8216;python&#8217;), please run:  	sudo port select &#8211;set python python26&#8243;</p>
<p><strong>6. Install Eclipse, if you need to. </strong></p>
<p>I already have Eclipse 3.6 installed, so the only thing that needs doing is the memory allocation part specified on ParticleCode.com&#8217;s download page. </p>
<p><strong>7. Install ParticleCode plugin for Eclipse&#8230;.  </strong></p>
<p>NOTES:<br />
========<br />
1. &#8220;The Particle Platform will not work with Python 2.7 or Python 3 distributions.&#8221;</p>
<p>http://www.particlecode.com/account/download/#python</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timshaya.wordpress.com/556/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timshaya.wordpress.com/556/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timshaya.wordpress.com/556/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timshaya.wordpress.com/556/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/timshaya.wordpress.com/556/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/timshaya.wordpress.com/556/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/timshaya.wordpress.com/556/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/timshaya.wordpress.com/556/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timshaya.wordpress.com/556/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timshaya.wordpress.com/556/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timshaya.wordpress.com/556/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timshaya.wordpress.com/556/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timshaya.wordpress.com/556/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timshaya.wordpress.com/556/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timshaya.wordpress.com&amp;blog=7378811&amp;post=556&amp;subd=timshaya&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://timshaya.wordpress.com/2011/05/23/installing-particle-code-for-as3-0-developers-on-os-x-10-5-8/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/021d7b69ed9737e46fc3a4b1e1082081?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tim</media:title>
		</media:content>
	</item>
		<item>
		<title>SVN Error &#8220;PROPFIND request failed&#8221;&#8230; &#8220;authorization failed&#8221;</title>
		<link>http://timshaya.wordpress.com/2011/04/27/svn-error-propfind-request-failed-authorization-failed/</link>
		<comments>http://timshaya.wordpress.com/2011/04/27/svn-error-propfind-request-failed-authorization-failed/#comments</comments>
		<pubDate>Wed, 27 Apr 2011 15:46:16 +0000</pubDate>
		<dc:creator>tim</dc:creator>
				<category><![CDATA[svn]]></category>
		<category><![CDATA[Versions]]></category>
		<category><![CDATA[authorization failed]]></category>
		<category><![CDATA[propfind]]></category>
		<category><![CDATA[versions]]></category>

		<guid isPermaLink="false">http://timshaya.wordpress.com/?p=544</guid>
		<description><![CDATA[Every time I change my network password SVN craps out on me. When I try to login to my SVN client (Versions 1.1) I get this error: PROPFIND request failed on &#8216;/my/repo/path&#8217; PROPFIND of &#8216;/my/repo/path&#8217;: authorization failed (http://subversion_host_path.com) I&#8217;ve tried getting someone else to log me in but then still got this error when I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timshaya.wordpress.com&amp;blog=7378811&amp;post=544&amp;subd=timshaya&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Every time I change my network password SVN craps out on me. When I try to login to my  SVN client (<a href="http://versionsapp.com/">Versions 1.1</a>) I get this error:  </p>
<blockquote><p>PROPFIND request failed on &#8216;/my/repo/path&#8217;<br />
PROPFIND of &#8216;/my/repo/path&#8217;: authorization failed (http://subversion_host_path.com)</p></blockquote>
<p>I&#8217;ve tried getting someone else to log me in but then still got this error when I tried to Commit files:</p>
<blockquote><p>
Commit failed (details follow):<br />
OPTIONS request failed on &#8216;/my/repo/path/my_specific_files_directory&#8217;<br />
OPTIONS of &#8216;/my/repo/path/my_specific_files_directory&#8217;: authorization failed (&#8216;http://subversion_host_path.com&#8217;)</p></blockquote>
<p>This series of steps finally fixed it:</p>
<p>1. deleted all Repository Bookmarks in Versions svn client<br />
2. deleted Versions&#8217; preferences in myusername/Library/Preferences/<br />
3. deleted the http://subversion_host_path.com keychain entry in Keychain Access<br />
4. tried to creat a New Repository Bookmark &#8211; it worked AFTER i added a &#8220;/&#8221; at the end of the repo path: &#8216;http://subversion_host_path.com/my/repo/path&#8217;</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/timshaya.wordpress.com/544/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/timshaya.wordpress.com/544/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/timshaya.wordpress.com/544/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/timshaya.wordpress.com/544/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/timshaya.wordpress.com/544/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/timshaya.wordpress.com/544/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/timshaya.wordpress.com/544/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/timshaya.wordpress.com/544/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/timshaya.wordpress.com/544/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/timshaya.wordpress.com/544/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/timshaya.wordpress.com/544/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/timshaya.wordpress.com/544/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/timshaya.wordpress.com/544/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/timshaya.wordpress.com/544/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=timshaya.wordpress.com&amp;blog=7378811&amp;post=544&amp;subd=timshaya&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://timshaya.wordpress.com/2011/04/27/svn-error-propfind-request-failed-authorization-failed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/021d7b69ed9737e46fc3a4b1e1082081?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">tim</media:title>
		</media:content>
	</item>
	</channel>
</rss>
