<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>simonsarris - Latest Comments</title><link xmlns="http://www.w3.org/2005/Atom" rel="http://api.friendfeed.com/2008/03#sup" href="http://disqus.com/sup/all.sup#forumcomments-c2bf87ec" type="application/json"/><link>http://simonsarris.disqus.com/</link><description>simonsarris.com</description><atom:link href="http://simonsarris.disqus.com/comments.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 15 May 2012 01:08:16 -0000</lastBuildDate><item><title>Re: How to play Age of Empires II on Windows Vista and Windows 7</title><link>http://simonsarris.com/blog/6-how-to-play-age-of-empires-ii-on-windows-vista-and-windows-7#comment-529070423</link><description>&lt;p&gt; whats your email? i would like to talk to you more about this issue.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Darrelaubrey</dc:creator><pubDate>Tue, 15 May 2012 01:08:16 -0000</pubDate></item><item><title>Re: Understanding the HTML5 Canvas image security rules</title><link>http://simonsarris.com/blog/480-understanding-the-html5-canvas-image-security-rules#comment-518110491</link><description>&lt;p&gt;Sometimes sites are hosted on domains like, for example:&lt;/p&gt;

&lt;p&gt;&lt;a href="http://home.comcast.net/~heidi.quinn/all_stevensline.htm" rel="nofollow"&gt;http://home.comcast.net/~heidi...&lt;/a&gt; (just some random page I found)But what if that site tried to grab something from &lt;a href="http://internal.comcast.net" rel="nofollow"&gt;internal.comcast.net&lt;/a&gt;, effectively taking a file from a comcast employee (presumably they'd be able to access &lt;a href="http://internal.comcast.net" rel="nofollow"&gt;internal.comcast.net&lt;/a&gt; from their computer at work but its unavailable otherwise)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">simonsarris</dc:creator><pubDate>Thu, 03 May 2012 19:46:58 -0000</pubDate></item><item><title>Re: Understanding the HTML5 Canvas image security rules</title><link>http://simonsarris.com/blog/480-understanding-the-html5-canvas-image-security-rules#comment-518035425</link><description>&lt;p&gt;I want to access something in the same domain... but with a different machine... ie &lt;a href="http://m1.myserver.com" rel="nofollow"&gt;m1.myserver.com&lt;/a&gt; and &lt;a href="http://m2.myserver.com" rel="nofollow"&gt;m2.myserver.com&lt;/a&gt;, seems reasonably secure? &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Lance</dc:creator><pubDate>Thu, 03 May 2012 17:35:02 -0000</pubDate></item><item><title>Re: A Gentle Introduction to Making HTML5 Canvas Interactive</title><link>http://simonsarris.com/blog/510-making-html5-canvas-useful#comment-506183467</link><description>&lt;p&gt;I love it!!! Thank you so much. I added an on double click shape remove ability... &lt;/p&gt;

&lt;p&gt;[***Inside CanvasState***]&lt;br&gt;  canvas.addEventListener('dblclick', function(e) {&lt;br&gt;    var mouse = myState.getMouse(e);&lt;br&gt;    // check if we dblclick on existing shape&lt;br&gt;    for (var i = myState.shapes.length-1; i &amp;gt;= 0; i--) {&lt;br&gt;      if (myState.shapes[i].contains(mouse.x, mouse.y)) {&lt;br&gt;        myState.removeShape(i);//found one, remove it&lt;br&gt;        myState.selection = null;//clear the selection&lt;br&gt;        return;&lt;br&gt;      }&lt;br&gt;    }&lt;br&gt;    // dblclick on empty space creates new shape&lt;br&gt;    myState.addShape(new Shape(mouse.x - 10, mouse.y - 10, 20, 20, 'rgba(0,255,0,.6)'));&lt;br&gt;  }, true);&lt;/p&gt;

&lt;p&gt;[***Below addShape***]&lt;br&gt;CanvasState.prototype.removeShape = function(i) {&lt;br&gt;  this.shapes.splice(i, 1);&lt;br&gt;  this.valid = false;&lt;br&gt;}&lt;/p&gt;

&lt;p&gt;*Only problem is it will only remove the uppermost object that was dbl clicked on.. but clicking and dragging only drags the top most shape so I'm not worried.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Brandon</dc:creator><pubDate>Sun, 22 Apr 2012 12:33:06 -0000</pubDate></item><item><title>Re: A Gentle Introduction to Making HTML5 Canvas Interactive</title><link>http://simonsarris.com/blog/510-making-html5-canvas-useful#comment-493974172</link><description>&lt;p&gt;you are a genius man!!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Guest</dc:creator><pubDate>Wed, 11 Apr 2012 01:17:24 -0000</pubDate></item><item><title>Re: Making and Moving Selectable Shapes on an HTML5 Canvas: A Simple Example</title><link>http://simonsarris.com/blog/140-canvas-moving-selectable-shapes#comment-488981993</link><description>&lt;p&gt;Never develop a desktop application, once it reaches 300 lines of code to do something similar, you just might have a heart attack.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">David Miller</dc:creator><pubDate>Fri, 06 Apr 2012 10:53:50 -0000</pubDate></item><item><title>Re: Increasing Performance by Caching Paths on HTML5 Canvas</title><link>http://simonsarris.com/blog/427-increasing-performance-by-caching-paths-on-canvas#comment-486601170</link><description>&lt;p&gt;Thanks! This was so useful! I'll have to change an entire script, but I hope it will perform better. Will be following this blog :)&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Saturnix</dc:creator><pubDate>Wed, 04 Apr 2012 22:44:47 -0000</pubDate></item><item><title>Re: Customizing the HP Envy Quick Launch keys</title><link>http://simonsarris.com/blog/24-envy-keyboard#comment-486140495</link><description>&lt;p&gt;Ugh ok so apparently I did something some long time ago and made the email key to change into opening up a new browser/window.&lt;/p&gt;

&lt;p&gt;I don't remember how I did that... and I kinda want to change it back to mail. Can someone help me? I don't want to mess up my pc :(&lt;/p&gt;

&lt;p&gt;Someone please email me : wildcat11293@hotmail.com&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Dianomana Huang</dc:creator><pubDate>Wed, 04 Apr 2012 12:30:59 -0000</pubDate></item><item><title>Re: A Gentle Introduction to Making HTML5 Canvas Interactive</title><link>http://simonsarris.com/blog/510-making-html5-canvas-useful#comment-485894842</link><description>&lt;p&gt;Great article, just wanted to know if we can set the Background of the canvas&lt;br&gt;?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Vivi</dc:creator><pubDate>Wed, 04 Apr 2012 07:42:32 -0000</pubDate></item><item><title>Re: Understanding the HTML5 Canvas image security rules</title><link>http://simonsarris.com/blog/480-understanding-the-html5-canvas-image-security-rules#comment-478230572</link><description>&lt;p&gt;Hello, first I'd like to say thanks for your articles it is really good job. &lt;br&gt;I'm not sure that I understand everything in this article, does it mean if in my web application using canvas, I want the user to load a picture from his computer or from an external URL (like &lt;a href="https://ssl.gstatic.com/images/logos/google_logo_41.png)" rel="nofollow"&gt;https://ssl.gstatic.com/images...&lt;/a&gt;, let him draw onto it, and then save it in PNG to my server, I can't ?? Thank you very much &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Thomas Haratyk</dc:creator><pubDate>Wed, 28 Mar 2012 06:16:54 -0000</pubDate></item><item><title>Re: A Gentle Introduction to Making HTML5 Canvas Interactive</title><link>http://simonsarris.com/blog/510-making-html5-canvas-useful#comment-476497854</link><description>&lt;p&gt;Great post. I have a theoretical question: do you know any better algorithm to find the clicked shape? It's ok to iterate over all shapes to find the clicked one in a list of 10 shapes, but it can be slow for a list with thousands of objects. And I'm not even talking about mouse hover (my real goal). Thank you.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Hidra</dc:creator><pubDate>Mon, 26 Mar 2012 12:06:50 -0000</pubDate></item><item><title>Re: A Gentle Introduction to Making HTML5 Canvas Interactive</title><link>http://simonsarris.com/blog/510-making-html5-canvas-useful#comment-475460495</link><description>&lt;p&gt;Thanks buddy, great intro, however it doesn't seem to work on iOS devices, i had to add listeners for touchstart, touchmove and touchend to get it working.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nielsrobin</dc:creator><pubDate>Sat, 24 Mar 2012 17:11:20 -0000</pubDate></item><item><title>Re: A Gentle Introduction to Making HTML5 Canvas Interactive</title><link>http://simonsarris.com/blog/510-making-html5-canvas-useful#comment-475460031</link><description>&lt;p&gt;Yup buddy, I did just that, just replace the fill with img:&lt;br&gt;img = new Image();&lt;br&gt;img.src = "something/pic.jpg";&lt;/p&gt;

&lt;p&gt;and then change the draw method to:&lt;br&gt;Shape.prototype.draw = function(ctx) {&lt;br&gt;    ctx.drawImage(this.img, this.x, this.y, this.w, this.h);&lt;br&gt;}&lt;br&gt;works like a charm.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">nielsrobin</dc:creator><pubDate>Sat, 24 Mar 2012 17:10:15 -0000</pubDate></item><item><title>Re: How to play Age of Empires II on Windows Vista and Windows 7</title><link>http://simonsarris.com/blog/6-how-to-play-age-of-empires-ii-on-windows-vista-and-windows-7#comment-474140736</link><description>&lt;p&gt;Apparently the game has issues doing multiplayer games between a windows xp and windows 7 machine =/&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">maslowk</dc:creator><pubDate>Thu, 22 Mar 2012 22:04:21 -0000</pubDate></item><item><title>Re: A Gentle Introduction to Making HTML5 Canvas Interactive</title><link>http://simonsarris.com/blog/510-making-html5-canvas-useful#comment-470260387</link><description>&lt;p&gt;have to import images from URL and would like to make them dropable &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rico</dc:creator><pubDate>Tue, 20 Mar 2012 11:06:44 -0000</pubDate></item><item><title>Re: A Gentle Introduction to Making HTML5 Canvas Interactive</title><link>http://simonsarris.com/blog/510-making-html5-canvas-useful#comment-470258907</link><description>&lt;p&gt;hey, how would I apply this to Images imported ? &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Rico</dc:creator><pubDate>Tue, 20 Mar 2012 11:05:15 -0000</pubDate></item><item><title>Re: Customizing the HP Envy Quick Launch keys</title><link>http://simonsarris.com/blog/24-envy-keyboard#comment-468637263</link><description>&lt;p&gt;will uninstallin cyberlink dvd fix that problem? I mean really, since there wmp, do you really need that program?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mtrumantigeru</dc:creator><pubDate>Sun, 18 Mar 2012 20:10:57 -0000</pubDate></item><item><title>Re: Selectable Shapes Part 2: Resizable, Movable Shapes on HTML5 Canvas</title><link>http://simonsarris.com/blog/225-canvas-selecting-resizing-shape#comment-466892516</link><description>&lt;p&gt;its great&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">K Saha</dc:creator><pubDate>Fri, 16 Mar 2012 09:05:37 -0000</pubDate></item><item><title>Re: Javascript: Allowing a copy function in a base class to create an instance of a subclass</title><link>http://simonsarris.com/blog/291-javascript-copy-function#comment-464990534</link><description>&lt;p&gt;Hi Simon,&lt;/p&gt;

&lt;p&gt;I am trying the example you have given in the post. But copyConstructor doesn't seem to be working for the child class ie, Cat. copyCat instanceof Cat returns false, and copyCat.saySomething() prints "I am an animal".&lt;/p&gt;

&lt;p&gt;var copyCat = c.copy();&lt;br&gt;console.log(copyCat instanceof Animal); // true&lt;br&gt;console.log(copyCat instanceof Cat);    // false&lt;br&gt;console.log(copyCat.saySomething());    // "I am an animal"&lt;/p&gt;

&lt;p&gt;I tried printing the value of this.subConstructor and it's giving undefined.&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Singh Puja</dc:creator><pubDate>Wed, 14 Mar 2012 07:05:09 -0000</pubDate></item><item><title>Re: Making and Moving Selectable Shapes on an HTML5 Canvas: A Simple Example</title><link>http://simonsarris.com/blog/140-canvas-moving-selectable-shapes#comment-455020465</link><description>&lt;p&gt;probably if someone wants to move only 2 rectangles needs less then 10 lines of code with jquery. i'm quite sure that many jquery plugins will help to solve problems like this very fast&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Roberto Orlando</dc:creator><pubDate>Fri, 02 Mar 2012 20:11:23 -0000</pubDate></item><item><title>Re: A Gentle Introduction to Making HTML5 Canvas Interactive</title><link>http://simonsarris.com/blog/510-making-html5-canvas-useful#comment-451161262</link><description>&lt;p&gt;Hi &lt;br&gt;Am new to HTML5 , Your tutorial was very helpful. I would also like to know, how can i add text to the movable rectangle .&lt;/p&gt;

&lt;p&gt;Regards&lt;br&gt;exor&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">exor</dc:creator><pubDate>Tue, 28 Feb 2012 07:36:39 -0000</pubDate></item><item><title>Re: How to play Age of Empires II on Windows Vista and Windows 7</title><link>http://simonsarris.com/blog/6-how-to-play-age-of-empires-ii-on-windows-vista-and-windows-7#comment-441347411</link><description>&lt;p&gt;Actually I am able to play it through internet tcp/ip with hamachi with my win7 and we played some games through time but now it's always saying unable to join game. When we play my buddy is on his old pc but for myself im on my actual and up-to-date one.,. ?!?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Moukmouky2k</dc:creator><pubDate>Thu, 16 Feb 2012 17:47:23 -0000</pubDate></item><item><title>Re: How to play Age of Empires II on Windows Vista and Windows 7</title><link>http://simonsarris.com/blog/6-how-to-play-age-of-empires-ii-on-windows-vista-and-windows-7#comment-441198887</link><description>&lt;p&gt;very WRONG! AOEIII does not work over IPX it works on TCP. All you have to do is allow your firewall to pass AOE II AND AND AND Microsoft directplay helper. Thats all no need to make further changes no static IP nor nothing. Why do you write if you don´t know!!&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Raul</dc:creator><pubDate>Thu, 16 Feb 2012 15:13:27 -0000</pubDate></item><item><title>Re: Selectable Shapes Part 2: Resizable, Movable Shapes on HTML5 Canvas</title><link>http://simonsarris.com/blog/225-canvas-selecting-resizing-shape#comment-438884716</link><description>&lt;p&gt;Great tutorial...!!&lt;br&gt;Is it possible to use circle instead of rectangles? &lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nikhil Dixit</dc:creator><pubDate>Tue, 14 Feb 2012 09:47:13 -0000</pubDate></item><item><title>Re: A Gentle Introduction to Making HTML5 Canvas Interactive</title><link>http://simonsarris.com/blog/510-making-html5-canvas-useful#comment-438473049</link><description>&lt;p&gt;Hey, awesome tuturoail. Can this work with images?&lt;/p&gt;

&lt;p&gt;Lets say I have an image, "imgCat" placed on the canvas. How can I put that into the above code so it makes the image draggable?&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Mitch Samuels</dc:creator><pubDate>Tue, 14 Feb 2012 00:47:26 -0000</pubDate></item></channel></rss>
