<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Oren Yomtov&#039;s Website &#187; Tips</title>
	<atom:link href="http://orenyomtov.com/topic/tips/feed" rel="self" type="application/rss+xml" />
	<link>http://orenyomtov.com</link>
	<description>Web development</description>
	<lastBuildDate>Mon, 06 Sep 2010 14:27:49 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.1-alpha</generator>
		<item>
		<title>What is WordPress?</title>
		<link>http://orenyomtov.com/what-is-wordpress.html</link>
		<comments>http://orenyomtov.com/what-is-wordpress.html#comments</comments>
		<pubDate>Mon, 10 May 2010 18:15:45 +0000</pubDate>
		<dc:creator>Oren Yomtov</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[Lecture]]></category>
		<category><![CDATA[StartupSeeds]]></category>
		<category><![CDATA[Video]]></category>
		<category><![CDATA[YouTube]]></category>

		<guid isPermaLink="false">http://orenyomtov.com/?p=490</guid>
		<description><![CDATA[If the question intrigues you, this video of me lecturing about it will probably answer it for you. This video was shot last month in a user-generated content meeting organized by <a href="http://www.startupseeds.com/">StartupSeeds</a>.

<object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/Q0cSH4w0UjU&#038;hl=en_US&#038;fs=1&#038;rel=0&#038;color1=0x2b405b&#038;color2=0x6b8ab6"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Q0cSH4w0UjU&#038;hl=en_US&#038;fs=1&#038;rel=0&#038;color1=0x2b405b&#038;color2=0x6b8ab6" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object>

The lecture is in Hebrew but there are English subtitles available.... <a href="http://orenyomtov.com/what-is-wordpress.html" class="read_more">Learn more about What is WordPress?</a>]]></description>
			<content:encoded><![CDATA[<p>If the question intrigues you, this video of me lecturing about it will probably answer it for you. This video was shot last month in a user-generated content meeting organized by <a href="http://www.startupseeds.com/">StartupSeeds</a>.</p>
<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/Q0cSH4w0UjU&#038;hl=en_US&#038;fs=1&#038;rel=0&#038;color1=0x2b405b&#038;color2=0x6b8ab6"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Q0cSH4w0UjU&#038;hl=en_US&#038;fs=1&#038;rel=0&#038;color1=0x2b405b&#038;color2=0x6b8ab6" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></p>
<p>The lecture is in Hebrew but there are English subtitles available.</p>
]]></content:encoded>
			<wfw:commentRss>http://orenyomtov.com/what-is-wordpress.html/feed</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Box2d Flash (ActionScript 3) Compile Errors Fix</title>
		<link>http://orenyomtov.com/box2d-flash-action-script-3-compile-errors-fix.html</link>
		<comments>http://orenyomtov.com/box2d-flash-action-script-3-compile-errors-fix.html#comments</comments>
		<pubDate>Thu, 11 Feb 2010 19:55:35 +0000</pubDate>
		<dc:creator>Oren Yomtov</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[Box2D]]></category>
		<category><![CDATA[Error]]></category>
		<category><![CDATA[Fix]]></category>
		<category><![CDATA[Physics]]></category>
		<category><![CDATA[Physics Engine]]></category>

		<guid isPermaLink="false">http://orenyomtov.com/?p=450</guid>
		<description><![CDATA[<p><a href="http://orenyomtov.com/downloads/box2d-errors.jpg"><img src="http://orenyomtov.com/downloads/box2d-errors-e1265920008936.jpg" alt="box2d warnings" title="box2d warnings" width="500" height="122" class="alignright size-full wp-image-456" /></a>When I started developing in flash using the <a href="http://box2dflash.sourceforge.net/">Box2d physics engine</a>, I had this problem which held me back for a couple of hair pulling hours. So I thought, why not spare other people from this misery?</p>
<h3>The Problem&#8217;s Symptoms</h3>
<p>If you encountered any of these error messages when compiling a Box2d flash project:<br />
<code style="display:block;overflow:scroll">b2World.as, Line 871</code>... <a href="http://orenyomtov.com/box2d-flash-action-script-3-compile-errors-fix.html" class="read_more">Learn more about Box2d Flash (ActionScript 3) Compile Errors Fix</a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://orenyomtov.com/downloads/box2d-errors.jpg"><img src="http://orenyomtov.com/downloads/box2d-errors-e1265920008936.jpg" alt="box2d warnings" title="box2d warnings" width="500" height="122" class="alignright size-full wp-image-456" /></a>When I started developing in flash using the <a href="http://box2dflash.sourceforge.net/">Box2d physics engine</a>, I had this problem which held me back for a couple of hair pulling hours. So I thought, why not spare other people from this misery?</p>
<h3>The Problem&#8217;s Symptoms</h3>
<p>If you encountered any of these error messages when compiling a Box2d flash project:<br />
<code style="display:block;overflow:scroll">b2World.as, Line 871 - 1046: Type was not found or was not a compile-time constant: Vector. - public function RayCastAll(point1:b2Vec2, point2:b2Vec2):Vector.<b2Fixture><br />
b2World.as, Line 917 - Warning: 3590: void used where a Boolean value was expected.  The expression will be type coerced to Boolean. - return (m_flags &#038; e_locked) > 0;<br />
Input.as, Line 155 - Warning: 3590: void used where a Boolean value was expected.  The expression will be type coerced to Boolean. - mouseReleased = !e.buttonDown;<br />
Input.as, Line 189 - Warning: 3590: void used where a Boolean value was expected.  The expression will be type coerced to Boolean. - return (keyState[k] > 0);<br />
Input.as, Line 199 - Warning: 3590: void used where a Boolean value was expected.  The expression will be type coerced to Boolean. - return (keyState[k] == 1);<br />
Input.as, Line 208 - Warning: 3590: void used where a Boolean value was expected.  The expression will be type coerced to Boolean. - return (keyState[k] == -1);<br />
Input.as, Line 217 - Warning: 3590: void used where a Boolean value was expected.  The expression will be type coerced to Boolean. - return (keyBuffer[i][0] == k &#038;&#038; keyBuffer[i][1] <= t);<br />
1046: Type was not found or was not a compile-time constant: b2PolygonDef. - var the_box:b2PolygonDef;<br />
1067: Implicit coercion of a value of type Box2D.Collision:b2AABB to an unrelated type Box2D.Common.Math:b2Vec2. - the_world=new b2World(environment,gravity,true);<br />
1137: Incorrect number of arguments.  Expected no more than 2. - the_world=new b2World(environment,gravity,true);<br />
1178: Attempted access of inaccessible property m_sprite through a reference with static type Box2D.Dynamics:b2DebugDraw. - debug_draw.m_sprite=debug_sprite;<br />
1178: Attempted access of inaccessible property m_drawScale through a reference with static type Box2D.Dynamics:b2DebugDraw. - debug_draw.m_drawScale=30;<br />
1178: Attempted access of inaccessible property m_fillAlpha through a reference with static type Box2D.Dynamics:b2DebugDraw. - debug_draw.m_fillAlpha=0.5;<br />
1178: Attempted access of inaccessible property m_lineThickness through a reference with static type Box2D.Dynamics:b2DebugDraw. - debug_draw.m_lineThickness=1;<br />
1178: Attempted access of inaccessible property m_drawFlags through a reference with static type Box2D.Dynamics:b2DebugDraw. - debug_draw.m_drawFlags=b2DebugDraw.e_shapeBit;<br />
1180: Call to a possibly undefined method b2PolygonDef. - the_box = new b2PolygonDef();<br />
1061: Call to a possibly undefined method CreateShape through a reference with static type Box2D.Dynamics:b2Body. - final_body.CreateShape(the_box);<br />
1061: Call to a possibly undefined method SetMassFromShapes through a reference with static type Box2D.Dynamics:b2Body. - final_body.SetMassFromShapes();<br />
1046: Type was not found or was not a compile-time constant: b2PolygonDef. - var the_box:b2PolygonDef;<br />
1180: Call to a possibly undefined method b2PolygonDef. - final_body.CreateShape(the_box);<br />
1061: Call to a possibly undefined method SetMassFromShapes through a reference with static type Box2D.Dynamics:b2Body. - final_body.SetMassFromShapes();<br />
1136: Incorrect number of arguments.  Expected 3. - the_world.Step(1/30, 10);<br />
Warning: 3590: Box2D.Common.Math:b2Vec2 used where a Boolean value was expected.  The expression will be type coerced to Boolean. - the_world=new b2World(environment,gravity,true);<br />
1046: Type was not found or was not a compile-time constant: b2World. - public var the_world:b2World;<br />
1046: Type was not found or was not a compile-time constant: b2AABB. - var environment:b2AABB = new b2AABB();<br />
1046: Type was not found or was not a compile-time constant: b2Vec2. - var gravity:b2Vec2=new b2Vec2(0.0,10.0);<br />
1046: Type was not found or was not a compile-time constant: b2DebugDraw. - var debug_draw:b2DebugDraw = new b2DebugDraw();<br />
1046: Type was not found or was not a compile-time constant: b2Body. - var final_body:b2Body;<br />
1046: Type was not found or was not a compile-time constant: b2BodyDef. - var the_body:b2BodyDef;<br />
1046: Type was not found or was not a compile-time constant: b2PolygonDef. - var the_box:b2PolygonDef;<br />
1180: Call to a possibly undefined method b2AABB. - var environment:b2AABB = new b2AABB();<br />
1180: Call to a possibly undefined method b2Vec2. - var gravity:b2Vec2=new b2Vec2(0.0,10.0);<br />
1180: Call to a possibly undefined method b2World. - the_world=new b2World(environment,gravity,true);<br />
1180: Call to a possibly undefined method b2DebugDraw. - var debug_draw:b2DebugDraw = new b2DebugDraw();<br />
1120: Access of undefined property b2DebugDraw. - debug_draw.m_drawFlags=b2DebugDraw.e_shapeBit;<br />
1180: Call to a possibly undefined method b2BodyDef. - the_body = new b2BodyDef();<br />
1180: Call to a possibly undefined method b2PolygonDef. - the_box = new b2PolygonDef();<br />
1046: Type was not found or was not a compile-time constant: b2Body. - var final_body:b2Body;<br />
1046: Type was not found or was not a compile-time constant: b2BodyDef. - var the_body:b2BodyDef;<br />
1046: Type was not found or was not a compile-time constant: b2PolygonDef. - var the_box:b2PolygonDef;<br />
1180: Call to a possibly undefined method b2BodyDef. - the_body = new b2BodyDef();<br />
1180: Call to a possibly undefined method b2PolygonDef. - the_box = new b2PolygonDef();<br />
1172: Definition Box2D.Dynamics could not be found. - import Box2D.Dynamics.*;<br />
1172: Definition Box2D.Collision could not be found. - import Box2D.Collision.*;<br />
1172: Definition Box2D.Collision.Shapes could not be found. - import Box2D.Collision.Shapes.*;<br />
1172: Definition Box2D.Common.Math could not be found. - import Box2D.Common.Math.*;</code><br />
I have the solution.</p>
<h3>Possible Causes</h3>
<p>There are two main causes for these type of errors:</p>
<ol>
<li>The Box2d code you are compiling doesn't match the Box2d source files' version.</li>
<li>Flash can not locate the Box2d engine source files.</li>
</ol>
<h4>Version Difference</h4>
<p>Personally, I first encountered the first cause. As it seems, when the Box2d guys updated their <abbr title="Subversion">SVN</abbr> and downloads for the latest version (for the time writing this post: 2.1 alpha <abbr title="as known as">aka</abbr> 2.1a), they forgot to also update their code samples. So if one <a href="http://sourceforge.net/projects/box2dflash/">downloads</a> the latest version and tries to compile the example projects, it simply won't work. Instead, flash will throw some of the errors listed above.</p>
<p>In addition, all of the online resources and tutorials regarding Box2D don't work with the latest Box2D version. I have yet to find an article or a code sample that works flawlessly with the latest version. They really rewrote major parts of the engine thus making lots of code (if not all) incompatible.</p>
<h4>Missing Box2D files</h4>
<p>The second cause is also very common. When compiling any project which uses the Box2d physics engine, Abobe must be able to find the needed Box2d source files. Adobe Flash looks for the files in the projects directory (is our case, for a Box2D subdirectory), and at the locations which one can specify in the preferences menu.</p>
<h3>The Solutions</h3>
<p>These solutions have solved my problems. If these won't help you, or if you have a better solution that you'd like to suggest - comment below.</p>
<h4>Version Difference</h4>
<p>As I've mentioned before, the examples in the latest Box2D download don't match the correct version and almost any code sample you will find online won't work with the latest version of Box2D.</p>
<p>Visit their <a href="http://sourceforge.net/projects/box2dflash/files/">full download page</a> which contains all previous versions and <a href="http://sourceforge.net/projects/box2dflash/files/box2dflash/Box2DFlashAS3_2.0.2/Box2DFlashAS3_2.0.2_.zip/download">download version 2.0.2</a>. All the examples work great in this package. And any other code should also work using this version.</p>
<h4>Missing Box2D files</h4>
<p>Many times, Adobe Flash (also <a href="http://www.flashdevelop.org/">Flash Develop</a> and any other Flash <abbr title="Integrated development environment">IDE</abbr>) won't find the correct Box2D directory to use. As a result it will throw those errors.</p>
<p>To fix this, you have two options:</p>
<ol>
<li>You can simply copy the correct Box2D source folder (a folder named <code>Box2D</code>) to the directory of your project. For instance, if your project lies under <code>C:\projects\box2d-demo\demo.fla</code>, you will need to copy the Box2D folder there. In the end the Box2D folder should lie at <code>C:\projects\box2d-demo\Box2D</code>.</li>
<li>The second option is to inform your IDE about the location of your Box2D folder. I use this option and I store my Box2D directory at <code>C:\Documents and Settings\Oren Yomtov\My Documents\FlashUtilities\Box2D</code>.
<p>To inform your IDE, follow the following steps:</p>
<p>In Adobe Flash:</p>
<ol>
<li>Open your project in Adobe Flash.</li>
<li>Navigate to "Edit->Preferences...".</li>
<li>Click the "ActionScript" tab/category.</li>
<li>Click the "ActionScript 3.0 Settings..." button.</li>
<li>Click the "Browser To Path" (folder/cross icon) button under "Source path:".</li>
<li>Browse to the folder which contains the Box2D folder and click "OK".</li>
<li>Click "OK" twice to save the changes.</li>
</ol>
<p>In Flash Develop (If you use it):</p>
<ol>
<li>Open Flash Develop</li>
<li>Navigate to "Project->Settings..."</li>
<li>Click the "Classpaths" tab.</li>
<li>Click the "Add Classpath..." button.</li>
<li>Browse to the folder which contains the Box2D folder and click "OK".</li>
<li>Click "OK" to save the changes.</li>
</ol>
<p><span class="smaller">NOTE: If you use both, you will need to configure both.<br />
Do not browse directly to the Box2D folder. Instead, browse to it's parent folder.<span></li>
</ol>
<p>Now recompile your code and it should all work.</p>
<p>By the way, if you are looking for video tutorials on the Box2D engine - check out <a href="http://www.kerp.net/box2d/">Todd's great videos</a>. They are very detailed and fun. Good luck.</p>
]]></content:encoded>
			<wfw:commentRss>http://orenyomtov.com/box2d-flash-action-script-3-compile-errors-fix.html/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Google Reader Tip &#8211; Subscribe in One Click</title>
		<link>http://orenyomtov.com/google-reader-tip-subscribe-in-one-click.html</link>
		<comments>http://orenyomtov.com/google-reader-tip-subscribe-in-one-click.html#comments</comments>
		<pubDate>Sat, 30 Jan 2010 14:33:24 +0000</pubDate>
		<dc:creator>Oren Yomtov</dc:creator>
				<category><![CDATA[Technology]]></category>
		<category><![CDATA[Tips]]></category>
		<category><![CDATA[Bookmark]]></category>
		<category><![CDATA[Drag & Drop]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[Google Chrome]]></category>
		<category><![CDATA[Google Reader]]></category>
		<category><![CDATA[Link]]></category>
		<category><![CDATA[RSS]]></category>
		<category><![CDATA[Subscribe]]></category>

		<guid isPermaLink="false">http://orenyomtov.com/?p=426</guid>
		<description><![CDATA[<p><a href="http://orenyomtov.com/downloads/google-reader.png"><img src="http://orenyomtov.com/downloads/google-reader.png" alt="Google Reader" title="Google Reader" width="178" height="40" class="alignright size-full wp-image-427" /></a>Surfing the web, you find many interesting websites or blogs which you want to subscribe to. But the never-ending search for the <abbr title="Really Simple Syndication">RSS</abbr> link is a burden we all share. If you are using <a href="http://www.google.com/reader">Google Reader</a>, I may have the perfect solution for you.</p>
<p>Bookmark or favorite the following <abbr title="Uniform Resource Locator">URL</abbr>:<code style="display:block;overflow:scroll">javascript:var%20b=document.body;var%20GR________bookmarklet_domain='http://www.google.com';if(b&#038;&#038;!document.xmlVersion){void(z=document.createElement('script'));void(z.src='http://www.google.com/reader/ui/subscribe-bookmarklet.js');void(b.appendChild(z));}else{location='http://www.google.com/reader/view/feed/'+encodeURIComponent(location.href)}</code>Using <a href="http://www.google.com/chrome/">Google Chrome</a>... <a href="http://orenyomtov.com/google-reader-tip-subscribe-in-one-click.html" class="read_more">Learn more about Google Reader Tip &#8211; Subscribe in One Click</a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://orenyomtov.com/downloads/google-reader.png"><img src="http://orenyomtov.com/downloads/google-reader.png" alt="Google Reader" title="Google Reader" width="178" height="40" class="alignright size-full wp-image-427" /></a>Surfing the web, you find many interesting websites or blogs which you want to subscribe to. But the never-ending search for the <abbr title="Really Simple Syndication">RSS</abbr> link is a burden we all share. If you are using <a href="http://www.google.com/reader">Google Reader</a>, I may have the perfect solution for you.</p>
<p>Bookmark or favorite the following <abbr title="Uniform Resource Locator">URL</abbr>:<code style="display:block;overflow:scroll">javascript:var%20b=document.body;var%20GR________bookmarklet_domain='http://www.google.com';if(b&#038;&#038;!document.xmlVersion){void(z=document.createElement('script'));void(z.src='http://www.google.com/reader/ui/subscribe-bookmarklet.js');void(b.appendChild(z));}else{location='http://www.google.com/reader/view/feed/'+encodeURIComponent(location.href)}</code>Using <a href="http://www.google.com/chrome/">Google Chrome</a> or <a href="http://www.mozilla.com/firefox/">Firefox</a>, you can drag this link to your bookmarks bar &#8211; <a href="javascript:var%20b=document.body;var%20GR________bookmarklet_domain='http://www.google.com';if(b&#038;&#038;!document.xmlVersion){void(z=document.createElement('script'));void(z.src='http://www.google.com/reader/ui/subscribe-bookmarklet.js');void(b.appendChild(z));}else{location='http://www.google.com/reader/view/feed/'+encodeURIComponent(location.href)}">Subscribe</a>.</p>
<p>Now, you may skip the RSS link seeking and simply click the <a href="javascript:var%20b=document.body;var%20GR________bookmarklet_domain='http://www.google.com';if(b&#038;&#038;!document.xmlVersion){void(z=document.createElement('script'));void(z.src='http://www.google.com/reader/ui/subscribe-bookmarklet.js');void(b.appendChild(z));}else{location='http://www.google.com/reader/view/feed/'+encodeURIComponent(location.href)}">link</a> you have just bookmarked.</p>
<p>In my browser, Google Chrome, it looks like this:<br />
<a href="http://orenyomtov.com/downloads/subscribe-bookmark.jpg"><img src="http://orenyomtov.com/downloads/subscribe-bookmark.jpg" alt="Subscribe Bookmark" title="Subscribe Bookmark" width="171" height="60" class="aligncenter size-full wp-image-434" /></a></p>
<p>If you want to check it out, feel free to give it a shot and subscribe to my <a href="http://orenyomtov.com/">blog</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://orenyomtov.com/google-reader-tip-subscribe-in-one-click.html/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
