<?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>Flash Blog</title>
	<atom:link href="http://blog.flashdesign-store.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://blog.flashdesign-store.com</link>
	<description>All about flash</description>
	<lastBuildDate>Mon, 14 May 2012 11:51:00 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<item>
		<title>Virtual private server ( DotBlock.com)</title>
		<link>http://blog.flashdesign-store.com/?p=611</link>
		<comments>http://blog.flashdesign-store.com/?p=611#comments</comments>
		<pubDate>Thu, 10 May 2012 15:46:07 +0000</pubDate>
		<dc:creator>Horia Condrea</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[private]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[virtual]]></category>
		<category><![CDATA[vps]]></category>

		<guid isPermaLink="false">http://blog.flashdesign-store.com/?p=611</guid>
		<description><![CDATA[Welcome again to my blog, today I will present you a company that I think it is useful for you to know about. I&#8217;m not some kind of specialist in this field, but they manage to surprise me, in a &#8230;<p class="read-more"><a href="http://blog.flashdesign-store.com/?p=611">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p><a href="http://blog.flashdesign-store.com/wp-content/uploads/2012/05/blog_logo.png"><img class="alignleft size-thumbnail wp-image-624" title="blog_logo" src="http://blog.flashdesign-store.com/wp-content/uploads/2012/05/blog_logo-150x150.png" alt="" width="150" height="150" /></a>Welcome again to my blog, today I will present you a company that I think it is useful for you to know about. I&#8217;m not some kind of specialist in this field, but they manage to surprise me, in a very good way, because I think that the prices are suitable, and services offered are very good.  without extending the waiting, <a href="http://www.dotblock.com/" target="_blank">DotBlock</a>  is the company I was talking about. They offer VPS Hosting services. So, probably you are thinking &#8220;Why should I have a VPS (Virtual private server)?&#8221;. Well, there are a couple of reasons, why you should have a VPS?.</p>
<p>1. VPS account is just like operating a dedicated server.<br />
2. You are free to install any software and configure your account the way you want it.<br />
3. Full root access, you can set up any services, or daemons as you like.</p>
<p>With a VPS , you have total control : you can start and stop any applications on your VPS, run any background process as you wish. Virtual Servers provide you with an isolated environment, where other virtual servers can not access your files or memory space. They are so popular because even a small business can afford a VPS server. So if you are looking for a VPS server make sure you browse this page : <a href="http://www.dotblock.com/" target="_blank">DotBlock</a></p>
<div class="shr-publisher-611"></div>]]></content:encoded>
			<wfw:commentRss>http://blog.flashdesign-store.com/?feed=rss2&#038;p=611</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>HoriaCondrea.com</title>
		<link>http://blog.flashdesign-store.com/?p=591</link>
		<comments>http://blog.flashdesign-store.com/?p=591#comments</comments>
		<pubDate>Mon, 12 Mar 2012 11:44:00 +0000</pubDate>
		<dc:creator>Horia Condrea</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[c++]]></category>
		<category><![CDATA[condrea]]></category>
		<category><![CDATA[cpp]]></category>
		<category><![CDATA[horia]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[leason]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://blog.flashdesign-store.com/?p=591</guid>
		<description><![CDATA[I have wrote a couple of articles on my new website, you can check these articles: 1.Getting started with video and audio in HTML5 2.Getting started with C [1] 3.Getting started with C [2] 4.Getting started with C [3] 5.Quick &#8230;<p class="read-more"><a href="http://blog.flashdesign-store.com/?p=591">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>I have wrote a couple of articles on my <a href="http://horiacondrea.com">new website</a>, you can check these articles:</p>
<h3><strong>1.Getting started with video and audio in HTML5</strong><br />
<a title="Getting started with video and audio in HTML5" href="http://horiacondrea.com/2011/12/07/getting-started-with-video-and-audio-in-html5/" target="_blank"><img src="http://horiacondrea.com/wp-content/uploads/2011/12/html5.png" alt="" /></a></h3>
<h3><strong>2.Getting started with C [1]</strong><br />
<a title="Getting started with C [1]" href="http://horiacondrea.com/2012/02/17/getting-started-with-c-1/" target="_blank"><img src="http://horiacondrea.com/wp-content/uploads/2012/02/logo_horia_C.jpg" alt="" /></a></h3>
<h3><strong>3.Getting started with C [2]</strong><br />
<a title="Getting started with C [2]" href="http://horiacondrea.com/2012/02/17/getting-started-with-c-2/" target="_blank"><img src="http://horiacondrea.com/wp-content/uploads/2012/02/c-2.jpg" alt="" /></a></h3>
<h3><strong>4.Getting started with C [3]</strong><br />
<a title="Getting started with C [3]" href="http://horiacondrea.com/2012/02/20/getting-started-with-c-3/" target="_blank"><img src="http://horiacondrea.com/wp-content/uploads/2012/02/c-3.jpg" alt="" /></a></h3>
<h3><strong>5.Quick Tip: How to read an array in C</strong><br />
<a title="Quick Tip: How to read an array in C" href="http://horiacondrea.com/2012/02/22/quick-tip-how-to-read-an-array-in-c/" target="_blank"><img src="http://horiacondrea.com/wp-content/uploads/2012/02/logo_horia_c_quicktip.jpg" alt="" /></a></h3>
<h3><strong>6.Develop Your First Flex Android Application</strong><br />
<a title="Develop Your First Flex Android Application" href="http://horiacondrea.com/2012/02/25/develop-your-first-flex-android-application/" target="_blank"><img src="http://horiacondrea.com/wp-content/uploads/2012/02/android_logo.png" alt="" /></a></h3>
<h3><strong>7.Let’s make some exercises in C</strong><br />
<a title="Let’s make some exercises in C" href="http://horiacondrea.com/2012/02/29/lets-make-some-exercises-in-c/" target="_blank"><img src="http://horiacondrea.com/wp-content/uploads/2012/02/logo_horia_c_examples.jpg" alt="" /></a></h3>
<div class="shr-publisher-591"></div>]]></content:encoded>
			<wfw:commentRss>http://blog.flashdesign-store.com/?feed=rss2&#038;p=591</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Quick Tip: How to use your microphone in AS 3.0</title>
		<link>http://blog.flashdesign-store.com/?p=585</link>
		<comments>http://blog.flashdesign-store.com/?p=585#comments</comments>
		<pubDate>Mon, 28 Nov 2011 21:33:44 +0000</pubDate>
		<dc:creator>Horia Condrea</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[as3.0]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[microphone]]></category>
		<category><![CDATA[quick]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://blog.flashdesign-store.com/?p=585</guid>
		<description><![CDATA[Hello again and thanks for all messages. But please, no more SPAM. Well, let&#8217;s get back to our bussines, today I&#8217;ll present to you a new Quick Tip: How to use your microphone in AS 3.0. A few months ago &#8230;<p class="read-more"><a href="http://blog.flashdesign-store.com/?p=585">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Hello again and thanks for all messages. But please, no more SPAM. Well, let&#8217;s get back to our bussines, today I&#8217;ll present to you a new <a href="http://www.o2.co.uk/broadband/">Quick Tip: How to use your microphone in AS 3.0</a>. A few months ago I posted something about How to use your camera, and now you will learn how to play with your microphone.</p>
<p>The code is not hard at all, I&#8217;m sure that you will understand immediately. But if you have any questions please contact me or leave me a comment:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript actionscript" style="font-family:monospace;">&nbsp;
package
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Bitmap</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">BitmapData</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">geom</span>.<span style="color: #006600;">Rectangle</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">media</span>.<span style="color: #0066CC;">Microphone</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #0066CC;">setInterval</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Mic <span style="color: #0066CC;">extends</span> Sprite
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">microphone</span>:<span style="color: #0066CC;">Microphone</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> volumeBar:Bitmap = <span style="color: #000000; font-weight: bold;">new</span> Bitmap<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> BitmapData<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">100</span>,<span style="color: #cc66cc;">10</span>,<span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Mic<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">this</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>volumeBar<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">microphone</span> = <span style="color: #0066CC;">Microphone</span>.<span style="color: #006600;">getMicrophone</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">microphone</span>.<span style="color: #006600;">setLoopBack</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">microphone</span>.<span style="color: #0066CC;">setUseEchoSuppression</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">setInterval</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">show</span>,<span style="color: #cc66cc;">30</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">show</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">with</span><span style="color: #66cc66;">&#40;</span>volumeBar.<span style="color: #006600;">bitmapData</span><span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				fillRect<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Rectangle<span style="color: #66cc66;">&#40;</span>0,0,<span style="color: #cc66cc;">100</span>,<span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span>, 0x00000000<span style="color: #66cc66;">&#41;</span>;
				fillRect<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Rectangle<span style="color: #66cc66;">&#40;</span>0,0,<span style="color: #0066CC;">microphone</span>.<span style="color: #0066CC;">activityLevel</span>,<span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span>,0xff00ff00<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>As you can see this is not only a simple exemple. In this code a have a rectange that measure the sound intensity recorded by microphone. The <strong>show</strong> function draw the rectangle and make him to oscilate depends of sound intensity.</p>
<div class="shr-publisher-585"></div>]]></content:encoded>
			<wfw:commentRss>http://blog.flashdesign-store.com/?feed=rss2&#038;p=585</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Box2D 2.1a Lesson 2(Tutorial)</title>
		<link>http://blog.flashdesign-store.com/?p=568</link>
		<comments>http://blog.flashdesign-store.com/?p=568#comments</comments>
		<pubDate>Thu, 18 Aug 2011 13:06:11 +0000</pubDate>
		<dc:creator>Horia Condrea</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Box2D]]></category>
		<category><![CDATA[AS 3.0]]></category>
		<category><![CDATA[box2d]]></category>
		<category><![CDATA[Box2D 2.1a]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[lesson]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://blog.flashdesign-store.com/?p=568</guid>
		<description><![CDATA[Hi readers, this is the second lesson about Box2d, a very powerfull engine, not only in flash. If you missed the first lesson, then you will not understand what I am gonig to do here. So, please go to the &#8230;<p class="read-more"><a href="http://blog.flashdesign-store.com/?p=568">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="Box2d Icon" src="http://img339.imageshack.us/img339/7246/b2dicon.png" alt="" width="180" height="180" /> Hi readers, this is the second lesson about Box2d, a very powerfull engine, not only in flash. If you missed the first lesson, then you will not understand what I am gonig to do here. So, please go to the :<a href="http://blog.flashdesign-store.com/?p=560"> Box2D 2.1a Lesson 1(Tutorial)</a>. If you already seen the first tutorial then it will be much easier to understand.</p>
<p>As you know, I promised last time that in the second lesson I will put some graphics on our SWF file. Please be ready beacause in this tutorial we will actualy see something in our project.</p>
<p>So let&#8217;s see what we will doing today, this is the final result:</p>

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_Main_608565921"
			class="flashmovie"
			width="550"
			height="400">
	<param name="movie" value="http://flashdesign-store.com/mywork/Box2d%20Lesson%202/Main.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://flashdesign-store.com/mywork/Box2d%20Lesson%202/Main.swf"
			name="fm_Main_608565921"
			width="550"
			height="400">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
<p>Interesting or not? <img src='http://blog.flashdesign-store.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Now let&#8217;s look a bit at the source code. I don&#8217;t think is so hard, given that in the first tutorial I tried to explain very good, and I think that a many of you guys out there allready understand. Well, this is the code:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript actionscript" style="font-family:monospace;">package
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> Box2D.<span style="color: #006600;">Collision</span>.<span style="color: #006600;">Shapes</span>.<span style="color: #006600;">b2PolygonShape</span>;
	<span style="color: #0066CC;">import</span> Box2D.<span style="color: #006600;">Common</span>.<span style="color: #0066CC;">Math</span>.<span style="color: #006600;">b2Vec2</span>;
	<span style="color: #0066CC;">import</span> Box2D.<span style="color: #006600;">Dynamics</span>.<span style="color: #006600;">b2Body</span>;
	<span style="color: #0066CC;">import</span> Box2D.<span style="color: #006600;">Dynamics</span>.<span style="color: #006600;">b2BodyDef</span>;
	<span style="color: #0066CC;">import</span> Box2D.<span style="color: #006600;">Dynamics</span>.<span style="color: #006600;">b2DebugDraw</span>;
	<span style="color: #0066CC;">import</span> Box2D.<span style="color: #006600;">Dynamics</span>.<span style="color: #006600;">b2FixtureDef</span>;
	<span style="color: #0066CC;">import</span> Box2D.<span style="color: #006600;">Dynamics</span>.<span style="color: #006600;">b2World</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #0066CC;">MovieClip</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">MouseEvent</span>;
&nbsp;
	<span style="color: #66cc66;">&#91;</span>SWF<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;550&quot;</span>, <span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;400&quot;</span>, frameRate=<span style="color: #ff0000;">&quot;30&quot;</span>, <span style="color: #0066CC;">backgroundColor</span>=<span style="color: #ff0000;">&quot;#333333&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Main <span style="color: #0066CC;">extends</span> Sprite
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _world:b2World;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _gravityX:<span style="color: #0066CC;">Number</span> = 0;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _gravityY:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">9.81</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _block:b2Body;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _blockX:<span style="color: #0066CC;">Number</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _blockY:<span style="color: #0066CC;">Number</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _btn:<span style="color: #0066CC;">MovieClip</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">MovieClip</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #0066CC;">static</span> const RATIO:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">30</span>;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Main<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #808080; font-style: italic;">// Set up the world</span>
			setupWorld<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #808080; font-style: italic;">//Create the floor</span>
			createF<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #808080; font-style: italic;">//Create the Block</span>
			createB<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			setupDraw<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">//ENTER_FRAME</span>
			addEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ENTER_FRAME</span>, <span style="color: #0066CC;">onEnterFrame</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// Draw button</span>
			setBtn<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #808080; font-style: italic;">// Reset Position</span>
			_btn.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>, onClick<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> setupDraw<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> sprite:Sprite = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			addChild<span style="color: #66cc66;">&#40;</span>sprite<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> b2DD:b2DebugDraw = <span style="color: #000000; font-weight: bold;">new</span> b2DebugDraw<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			b2DD.<span style="color: #006600;">SetSprite</span><span style="color: #66cc66;">&#40;</span>sprite<span style="color: #66cc66;">&#41;</span>;
			b2DD.<span style="color: #006600;">SetDrawScale</span><span style="color: #66cc66;">&#40;</span>RATIO<span style="color: #66cc66;">&#41;</span>;
			b2DD.<span style="color: #006600;">SetFlags</span><span style="color: #66cc66;">&#40;</span>b2DebugDraw.<span style="color: #006600;">e_shapeBit</span><span style="color: #66cc66;">&#41;</span>;
			b2DD.<span style="color: #006600;">SetLineThickness</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span>;
			b2DD.<span style="color: #006600;">SetFillAlpha</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0.6</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			_world.<span style="color: #006600;">SetDebugDraw</span><span style="color: #66cc66;">&#40;</span>b2DD<span style="color: #66cc66;">&#41;</span>;
			_world.<span style="color: #006600;">DrawDebugData</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> setupWorld<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> gravity:b2Vec2 = <span style="color: #000000; font-weight: bold;">new</span> b2Vec2<span style="color: #66cc66;">&#40;</span>_gravityX, _gravityY<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> ignoreSleeping:<span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">true</span>;
&nbsp;
			_world = <span style="color: #000000; font-weight: bold;">new</span> b2World<span style="color: #66cc66;">&#40;</span>gravity,ignoreSleeping<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> createF<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">floor</span>:b2Body;
			<span style="color: #000000; font-weight: bold;">var</span> floorDef:b2BodyDef;
			<span style="color: #000000; font-weight: bold;">var</span> floorShape:b2PolygonShape;
&nbsp;
			floorDef = <span style="color: #000000; font-weight: bold;">new</span> b2BodyDef<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			floorDef.<span style="color: #0066CC;">position</span>.<span style="color: #0066CC;">Set</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">275</span> <span style="color: #66cc66;">/</span> RATIO, <span style="color: #cc66cc;">400</span> <span style="color: #66cc66;">/</span> RATIO<span style="color: #66cc66;">&#41;</span>;
			floorDef.<span style="color: #0066CC;">type</span> = b2Body.<span style="color: #006600;">b2_staticBody</span>;
&nbsp;
			floorShape = <span style="color: #000000; font-weight: bold;">new</span> b2PolygonShape<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			floorShape.<span style="color: #006600;">SetAsBox</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">250</span> <span style="color: #66cc66;">/</span> RATIO,<span style="color: #cc66cc;">10</span> <span style="color: #66cc66;">/</span> RATIO<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> fixtureDef:b2FixtureDef = <span style="color: #000000; font-weight: bold;">new</span> b2FixtureDef<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			fixtureDef.<span style="color: #006600;">shape</span> = floorShape;
			fixtureDef.<span style="color: #006600;">density</span> = <span style="color: #cc66cc;">1.0</span>;
			fixtureDef.<span style="color: #006600;">friction</span> = <span style="color: #cc66cc;">0.8</span>;
			fixtureDef.<span style="color: #006600;">restitution</span> = <span style="color: #cc66cc;">0.3</span>;
&nbsp;
			<span style="color: #0066CC;">floor</span> = _world.<span style="color: #006600;">CreateBody</span><span style="color: #66cc66;">&#40;</span>floorDef<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">floor</span>.<span style="color: #006600;">CreateFixture</span><span style="color: #66cc66;">&#40;</span>fixtureDef<span style="color: #66cc66;">&#41;</span>;
&nbsp;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> createB<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> blockDef:b2BodyDef;
			<span style="color: #000000; font-weight: bold;">var</span> blockShape:b2PolygonShape;
&nbsp;
			blockDef = <span style="color: #000000; font-weight: bold;">new</span> b2BodyDef<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			blockDef.<span style="color: #0066CC;">position</span>.<span style="color: #0066CC;">Set</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">300</span> <span style="color: #66cc66;">/</span> RATIO,  <span style="color: #cc66cc;">10</span><span style="color: #66cc66;">/</span>  RATIO<span style="color: #66cc66;">&#41;</span>;
			blockDef.<span style="color: #0066CC;">type</span> = b2Body.<span style="color: #006600;">b2_dynamicBody</span>;
&nbsp;
			blockShape = <span style="color: #000000; font-weight: bold;">new</span> b2PolygonShape<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			blockShape.<span style="color: #006600;">SetAsBox</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">25</span> <span style="color: #66cc66;">/</span> RATIO,<span style="color: #cc66cc;">25</span> <span style="color: #66cc66;">/</span> RATIO<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> fixtureDef:b2FixtureDef = <span style="color: #000000; font-weight: bold;">new</span> b2FixtureDef<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			fixtureDef.<span style="color: #006600;">shape</span> = blockShape;
			fixtureDef.<span style="color: #006600;">density</span> = <span style="color: #cc66cc;">1.0</span>;
			fixtureDef.<span style="color: #006600;">friction</span> = <span style="color: #cc66cc;">0.8</span>;
			fixtureDef.<span style="color: #006600;">restitution</span> = <span style="color: #cc66cc;">0.3</span>;
&nbsp;
			_block = _world.<span style="color: #006600;">CreateBody</span><span style="color: #66cc66;">&#40;</span>blockDef<span style="color: #66cc66;">&#41;</span>;
			_block.<span style="color: #006600;">CreateFixture</span><span style="color: #66cc66;">&#40;</span>fixtureDef<span style="color: #66cc66;">&#41;</span>;
&nbsp;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> setBtn<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">with</span><span style="color: #66cc66;">&#40;</span>_btn.<span style="color: #006600;">graphics</span><span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #0066CC;">beginFill</span><span style="color: #66cc66;">&#40;</span>0xcccccc,<span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>
				drawRect<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">25</span>,<span style="color: #cc66cc;">25</span>,<span style="color: #cc66cc;">25</span>,<span style="color: #cc66cc;">25</span><span style="color: #66cc66;">&#41;</span>
				<span style="color: #0066CC;">endFill</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#125;</span>
			addChild<span style="color: #66cc66;">&#40;</span>_btn<span style="color: #66cc66;">&#41;</span>;
			_btn.<span style="color: #006600;">buttonMode</span> = <span style="color: #000000; font-weight: bold;">true</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onClick<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			_block.<span style="color: #006600;">SetSleepingAllowed</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">position</span>:b2Vec2 = <span style="color: #000000; font-weight: bold;">new</span> b2Vec2<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">275</span> <span style="color: #66cc66;">/</span> RATIO, 0 <span style="color: #66cc66;">/</span> RATIO<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> angle:<span style="color: #0066CC;">Number</span> = <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">random</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #cc66cc;">360</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">PI</span> <span style="color: #66cc66;">/</span> <span style="color: #cc66cc;">180</span>;
			_block.<span style="color: #006600;">SetPositionAndAngle</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">position</span>,angle<span style="color: #66cc66;">&#41;</span>;
&nbsp;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">onEnterFrame</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			_world.<span style="color: #006600;">Step</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">/</span> <span style="color: #cc66cc;">30</span> ,<span style="color: #cc66cc;">10</span>, <span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span>;
			_world.<span style="color: #006600;">ClearForces</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			_world.<span style="color: #006600;">DrawDebugData</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>_block.<span style="color: #006600;">GetPosition</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">y</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>You can now play with the gravity, density, friction, restitution, etc and you can see what each can do. If you have any questions please leave a comment or contact me, I will try to answer to  any question. See  ya next time.</p>
<p><a href="http://blog.flashdesign-store.com/?p=560"> Box2D 2.1a Lesson 1(Tutorial)</a></p>
<div class="shr-publisher-568"></div>]]></content:encoded>
			<wfw:commentRss>http://blog.flashdesign-store.com/?feed=rss2&#038;p=568</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Box2D 2.1a Lesson 1(Tutorial)</title>
		<link>http://blog.flashdesign-store.com/?p=560</link>
		<comments>http://blog.flashdesign-store.com/?p=560#comments</comments>
		<pubDate>Wed, 20 Jul 2011 08:12:45 +0000</pubDate>
		<dc:creator>Horia Condrea</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Box2D]]></category>
		<category><![CDATA[Box2D 2.1a]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[leasson]]></category>
		<category><![CDATA[physics]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://blog.flashdesign-store.com/?p=560</guid>
		<description><![CDATA[Hello again, this is the first lesson for teaching Box2D. Don&#8217;t worry is not so hard, and if you realy like physics, is hard not to like what Box2D can do. You need to know that Box2D is in origin &#8230;<p class="read-more"><a href="http://blog.flashdesign-store.com/?p=560">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p><img class="alignleft" title="Box2d Icon" src="http://img339.imageshack.us/img339/7246/b2dicon.png" alt="" width="180" height="180" />Hello again, this is the first lesson for teaching <strong>Box2D</strong>. Don&#8217;t worry is not so hard, and if you realy like <em>physics</em>, is hard not to like what <strong>Box2D</strong> can do. You need to know that Box2D is in origin a <em>Physics Engine</em> for C++ programing. So you will see that are a lot of differences betwen writing code in pure AS 3.0 for a real object move, and writing code for a real object move in Box2D. But, let&#8217;s stop talking, and see how this engine works.</p>
<p>If we want to do an object that moves, we first need to create a <em>World</em>, is exactly  like in our lifes. This World need to have gravity and need to know if he will igone or not static bodies. We will see later how will this look in a code.</p>
<p>Like I said this engine works like the real <em>word</em>, so he don&#8217;t work in PIXEL(this is very important, for you to know), this engine works in METERS. Again this is very important, you will see later how to make an application on a monitor that works in pixels.</p>
<p>In<strong> Box2D</strong> of course  we will work with objects. Let&#8217;s see how we will make an object:</p>
<div id="__ss_8638991" style="width: 600px;"><strong style="display: block; margin: 12px 0 4px;"><a title="Box2D (Object)" href="http://www.slideshare.net/CondreaHoratiu/box-8638991" target="_blank">Box2D (Object)</a></strong>&nbsp;</p>
<div style="padding: 5px 0 12px;">View more <a href="http://www.slideshare.net/" target="_blank">presentations</a> from <a href="http://www.slideshare.net/CondreaHoratiu" target="_blank">Condrea Horatiu</a></div>
</div>
<p>Those are only the basic things that we will use, but are enough for making an object. In future lessons we will talk more about other interesting things that you will learn.</p>
<p>After you read this, you are ready to understand how this application works. For this first lesson I made a very very very simple application. We will make an object and put him to fall into space with a gravity of 9.8 meters per seccond.</p>
<p>You won&#8217;t be able to see anything graphic for this project, you will be only able to see Y coordinate for  our block that will fall down. I know that this is not very fun for you, and I&#8217;m sorry for that, but I promise that in the next lesson , I will show you how to make a graphic for your object.</p>
<p>Code:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript actionscript" style="font-family:monospace;">package
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> Box2D.<span style="color: #006600;">Collision</span>.<span style="color: #006600;">Shapes</span>.<span style="color: #006600;">b2PolygonShape</span>;
	<span style="color: #0066CC;">import</span> Box2D.<span style="color: #006600;">Common</span>.<span style="color: #0066CC;">Math</span>.<span style="color: #006600;">b2Vec2</span>;
	<span style="color: #0066CC;">import</span> Box2D.<span style="color: #006600;">Dynamics</span>.<span style="color: #006600;">b2Body</span>;
	<span style="color: #0066CC;">import</span> Box2D.<span style="color: #006600;">Dynamics</span>.<span style="color: #006600;">b2BodyDef</span>;
	<span style="color: #0066CC;">import</span> Box2D.<span style="color: #006600;">Dynamics</span>.<span style="color: #006600;">b2FixtureDef</span>;
	<span style="color: #0066CC;">import</span> Box2D.<span style="color: #006600;">Dynamics</span>.<span style="color: #006600;">b2World</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Main <span style="color: #0066CC;">extends</span> Sprite
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _world:b2World;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _block:b2Body;
		<span style="color: #0066CC;">private</span> <span style="color: #0066CC;">static</span> const RATIO:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">30</span>;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Main<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #808080; font-style: italic;">//// Set up the world</span>
			createWorld<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #808080; font-style: italic;">//Create the Block</span>
			createB<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #808080; font-style: italic;">// Give this World some life</span>
			addEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ENTER_FRAME</span>, <span style="color: #0066CC;">onEnterFrame</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> createWorld<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #808080; font-style: italic;">// Set up the gravity</span>
			<span style="color: #000000; font-weight: bold;">var</span> gravity:b2Vec2 = <span style="color: #000000; font-weight: bold;">new</span> b2Vec2<span style="color: #66cc66;">&#40;</span>0 , <span style="color: #cc66cc;">9.8</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #808080; font-style: italic;">// Tell the world to ignore sleeping objects</span>
			<span style="color: #000000; font-weight: bold;">var</span> doSleep:<span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">true</span>;
&nbsp;
			_world = <span style="color: #000000; font-weight: bold;">new</span> b2World<span style="color: #66cc66;">&#40;</span>gravity, doSleep<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> createB<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> blockDef:b2BodyDef;
			<span style="color: #000000; font-weight: bold;">var</span> blockShape:b2PolygonShape;
&nbsp;
			blockDef = <span style="color: #000000; font-weight: bold;">new</span> b2BodyDef<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			blockDef.<span style="color: #0066CC;">position</span>.<span style="color: #0066CC;">Set</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">300</span> <span style="color: #66cc66;">/</span> RATIO, 0 <span style="color: #66cc66;">/</span>  RATIO<span style="color: #66cc66;">&#41;</span>;
			blockDef.<span style="color: #0066CC;">type</span> = b2Body.<span style="color: #006600;">b2_dynamicBody</span>;
&nbsp;
			blockShape = <span style="color: #000000; font-weight: bold;">new</span> b2PolygonShape<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			blockShape.<span style="color: #006600;">SetAsBox</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">20</span> <span style="color: #66cc66;">/</span> RATIO,<span style="color: #cc66cc;">25</span> <span style="color: #66cc66;">/</span> RATIO<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> fixtureDef:b2FixtureDef = <span style="color: #000000; font-weight: bold;">new</span> b2FixtureDef<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			fixtureDef.<span style="color: #006600;">shape</span> = blockShape;
			fixtureDef.<span style="color: #006600;">density</span> = <span style="color: #cc66cc;">1.0</span>;
			fixtureDef.<span style="color: #006600;">friction</span> = <span style="color: #cc66cc;">0.8</span>;
			fixtureDef.<span style="color: #006600;">restitution</span> = <span style="color: #cc66cc;">0.3</span>;
&nbsp;
			_block = _world.<span style="color: #006600;">CreateBody</span><span style="color: #66cc66;">&#40;</span>blockDef<span style="color: #66cc66;">&#41;</span>;
			_block.<span style="color: #006600;">CreateFixture</span><span style="color: #66cc66;">&#40;</span>fixtureDef<span style="color: #66cc66;">&#41;</span>;
&nbsp;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">onEnterFrame</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			_world.<span style="color: #006600;">Step</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">10</span>,<span style="color: #cc66cc;">10</span>,<span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span>;
			_world.<span style="color: #006600;">ClearForces</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>_block.<span style="color: #006600;">GetPosition</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">y</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Let&#8217;s take a look again in this code, we have 3 private variables. The first one represents the World, the second one the body, and the last one help as to convert pixels to meters. As I said at the begining, Box2D works in meters.<br />
After that I create the world function -createWorld- . I think this is clear I give the world a gravity of 9.8 on Y, and I set the world to ignore sleeping objects. On the -createB- function, I creat our body, I give him a position:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript actionscript" style="font-family:monospace;">blockDef.<span style="color: #0066CC;">position</span>.<span style="color: #0066CC;">Set</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">300</span> <span style="color: #66cc66;">/</span> RATIO, 0 <span style="color: #66cc66;">/</span>  RATIO<span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>and a form (Width and Hight):</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript actionscript" style="font-family:monospace;"> blockShape.<span style="color: #006600;">SetAsBox</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">20</span> <span style="color: #66cc66;">/</span> RATIO,<span style="color: #cc66cc;">25</span> <span style="color: #66cc66;">/</span> RATIO<span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>Now, let&#8217;s see if your block is falling down or not. As you can see I have a -trace- statement at the end of the code, that will show as the Y coordinate for  our block. Let&#8217;s test this and see what kind of result we will obtain.<br />
<img src="http://img808.imageshack.us/img808/6196/box2d.png" alt="Box2D" /><br />
As you can see our result is exactly as I expected. As you can see, my block is falling. And he will not stop because in this world that we created we don&#8217;t  have any other objects  that can interact with him. So, because of that he  will fall continuously.</p>
<p>That was the first lesson about how to get started with Box2D. I hope you enjoy this, and see you soon at the next tutorials. THANKS.</p>
<p style="text-align: right;"><a href="http://blog.flashdesign-store.com/?p=568">Box2D 2.1a Lesson 2(Tutorial)</a></p>
<div class="shr-publisher-560"></div>]]></content:encoded>
			<wfw:commentRss>http://blog.flashdesign-store.com/?feed=rss2&#038;p=560</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Contact Form in AS 3.0 with PHP Tutorial</title>
		<link>http://blog.flashdesign-store.com/?p=552</link>
		<comments>http://blog.flashdesign-store.com/?p=552#comments</comments>
		<pubDate>Fri, 08 Jul 2011 07:38:55 +0000</pubDate>
		<dc:creator>Horia Condrea</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[AS 3.0]]></category>
		<category><![CDATA[contact]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[form]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://blog.flashdesign-store.com/?p=552</guid>
		<description><![CDATA[Hi, today I found a very nice -PSD Contact Form - and with that design I made a very simple contact form with PHP. Is not very hard to understand. Bellow is an image with the contact form design, and &#8230;<p class="read-more"><a href="http://blog.flashdesign-store.com/?p=552">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Hi, today I found a very nice <a href="http://www.garryaylottdesign.co.uk/post/2335258839/free-psd-simple-contact-form">-PSD Contact Form </a>- and with that design I made a very simple contact form with PHP. Is not very hard to understand. Bellow is an image with the contact form design, and all the Instance Name that I use:<br />
<img src="http://www.flashdesign-store.com/Horia/Contact/contact.gif" alt="Contact Form in AS 3.0" /></p>
<h3>Step 1</h3>
<p>Download that PSD file, or make your own design for this <strong>Contact Form Project</strong>, open Adobe Flash Professional, make a new ActinScript 3.0 Project and importat the PSD file, or make there a new design. If you want to use my code, name your TextFiled as mine.  All your TextFields  are  INPUT.</p>
<h3>Step 2</h3>
<p>Now let&#8217;s get started with coding. This is the code:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript actionscript" style="font-family:monospace;">package
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLLoader</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLRequest</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLVariables</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLLoaderDataFormat</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLRequestMethod</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">MouseEvent</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">text</span>.<span style="color: #0066CC;">TextField</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> <span style="color: #0066CC;">index</span> <span style="color: #0066CC;">extends</span> Sprite
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> loader:URLLoader = <span style="color: #000000; font-weight: bold;">new</span> URLLoader<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> req:URLRequest = <span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;contact.php&quot;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> variables:URLVariables = <span style="color: #000000; font-weight: bold;">new</span> URLVariables<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">index</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			option<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			init<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		protected <span style="color: #000000; font-weight: bold;">function</span> option<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			loader.<span style="color: #006600;">dataFormat</span> = URLLoaderDataFormat.<span style="color: #006600;">VARIABLES</span>;
			req.<span style="color: #006600;">method</span> = URLRequestMethod.<span style="color: #006600;">POST</span>;
&nbsp;
			name_txt.<span style="color: #0066CC;">tabIndex</span> = 0;
			company_txt.<span style="color: #0066CC;">tabIndex</span> = <span style="color: #cc66cc;">1</span>;
			email_txt.<span style="color: #0066CC;">tabIndex</span> = <span style="color: #cc66cc;">2</span>;
			msg_txt.<span style="color: #0066CC;">tabIndex</span> = <span style="color: #cc66cc;">3</span>;
&nbsp;
			<span style="color: #0066CC;">button</span>.<span style="color: #006600;">buttonMode</span> = <span style="color: #000000; font-weight: bold;">true</span>;
&nbsp;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		protected <span style="color: #000000; font-weight: bold;">function</span> init<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">button</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>, onClick<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		protected <span style="color: #000000; font-weight: bold;">function</span> onClick<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
&nbsp;
			variables.<span style="color: #006600;">senderName</span> = name_txt.<span style="color: #0066CC;">text</span>;
			variables.<span style="color: #006600;">senderEmail</span> = email_txt.<span style="color: #0066CC;">text</span>;
			variables.<span style="color: #006600;">senderMsg</span> = msg_txt.<span style="color: #0066CC;">text</span>;
			variables.<span style="color: #006600;">senderCompany</span> = company_txt.<span style="color: #0066CC;">text</span>;
			req.<span style="color: #0066CC;">data</span> = variables;
			loader.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span>req<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<h3>Step 3</h3>
<p>Our ActionScript Project is ready, because we need this to work , all that we need now is a PHP file, a file that will actualy send uor message to a mail address.</p>
<p>So, PHP:</p>

<div class="wp_syntax"><div class="code"><pre class="php php" style="font-family:monospace;"><span style="color: #339933;">&lt;!--</span>?php
<span style="color: #000088;">$headers</span>  <span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;MIME-Version: 1.0<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;
<span style="color: #000088;">$headers</span> <span style="color: #339933;">.=</span> <span style="color: #0000ff;">&quot;Content-type: text/html; charset=iso-8859-1<span style="color: #000099; font-weight: bold;">\r</span><span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #990000;">empty</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="">'senderEmail'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #990000;">echo</span><span style="color: #0000ff;">&quot;no email address found&quot;</span>;
	<span style="color: #990000;">exit</span>;
<span style="color: #009900;">&#125;</span>
<span style="color: #000088;">$senderName</span>		<span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="">'senderName'</span><span style="color: #009900;">&#93;</span>;
<span style="color: #000088;">$senderEmail</span>	<span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="">'senderEmail'</span><span style="color: #009900;">&#93;</span>;
<span style="color: #000088;">$senderCompany</span>	<span style="color: #339933;">=</span> <span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="">'senderCompany'</span><span style="color: #009900;">&#93;</span>;
<span style="color: #000088;">$senderMsg</span>		<span style="color: #339933;">=</span> <span style="color: #990000;">nl2br</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$_POST</span><span style="color: #009900;">&#91;</span><span style="">'senderMsg'</span><span style="color: #009900;">&#93;</span><span style="color: #009900;">&#41;</span>;
<span style="color: #000088;">$sitename</span>		<span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Your Site Name&quot;</span>;
<span style="color: #000088;">$to</span> 			<span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;office@flashdesign-store.com&quot;</span>;
<span style="color: #000088;">$ToName</span> 		<span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Your Name&quot;</span>;
<span style="color: #000088;">$date</span> 			<span style="color: #339933;">=</span> <span style="color: #990000;">date</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">&quot;m/d/Y H:i:s&quot;</span><span style="color: #009900;">&#41;</span>;
<span style="color: #000088;">$ToSubject</span> 		<span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;Email From $senderName via $senderEmail&quot;</span>;
<span style="color: #000088;">$comments</span> 		<span style="color: #339933;">=</span> <span style="color: #000088;">$msgPost</span>;
<span style="color: #000088;">$EmailBody</span> 		<span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;A visitor to $sitename has left the following message&lt;br /--&gt;
              	Sent By: $senderName @$senderCompany
&nbsp;
				Message Sent:
&nbsp;
$senderMsg
&nbsp;
&quot;</span>;
<span style="color: #000088;">$EmailFooter</span>	<span style="color: #339933;">=</span> <span style="color: #0000ff;">&quot;
Sent: $date
&nbsp;
&quot;</span>;
<span style="color: #000088;">$Message</span> 		<span style="color: #339933;">=</span> <span style="color: #000088;">$EmailBody</span><span style="color: #339933;">.</span><span style="color: #000088;">$EmailFooter</span>;
<span style="color: #000088;">$ok</span> <span style="color: #339933;">=</span> <span style="color: #990000;">mail</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$to</span><span style="color: #339933;">,</span> <span style="color: #000088;">$ToSubject</span><span style="color: #339933;">,</span> <span style="color: #000088;">$Message</span><span style="color: #339933;">,</span> <span style="color: #000088;">$headers</span> <span style="color: #339933;">.</span> <span style="color: #0000ff;">&quot;From:$senderName &amp;lt;&quot;</span><span style="color: #339933;">.</span><span style="color: #000088;">$to</span><span style="color: #339933;">.</span><span style="color: #0000ff;">&quot;&amp;gt;&quot;</span><span style="color: #009900;">&#41;</span>;
<span style="color: #b1b100;">if</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$ok</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span>
	<span style="color: #990000;">echo</span> <span style="color: #0000ff;">&quot;retval=1&quot;</span>;
<span style="color: #009900;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #009900;">&#123;</span>
	<span style="color: #990000;">echo</span> <span style="color: #0000ff;">&quot;retval=0&quot;</span>;
<span style="color: #009900;">&#125;</span>
&nbsp;
?<span style="color: #339933;">&amp;</span>gt;</pre></div></div>

<p>Now, this is ready, put your project on a server and you&#8217;ll see that it will work. But edit this PHP file with your own details.</p>
<p><a href='#' onclick='javascript:window.open("/?feed=rss2&download=7","Window1","menubar=no,width=400,height=200,toolbar=no, left="+((screen.width/2)-200)+", top="+((screen.height/2)-100));return false;' style="background:url('http://blog.flashdesign-store.com/wp-content/plugins/download-manager/icon/download.png') no-repeat;padding:3px 12px 12px 28px;font:bold 10pt verdana;">Download</a><br><small style='margin-left:30px;'>Downloaded 201 times</small></p>
<div class="shr-publisher-552"></div>]]></content:encoded>
			<wfw:commentRss>http://blog.flashdesign-store.com/?feed=rss2&#038;p=552</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>SWF Protector</title>
		<link>http://blog.flashdesign-store.com/?p=548</link>
		<comments>http://blog.flashdesign-store.com/?p=548#comments</comments>
		<pubDate>Tue, 05 Jul 2011 12:30:25 +0000</pubDate>
		<dc:creator>Horia Condrea</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[protect]]></category>
		<category><![CDATA[protector]]></category>
		<category><![CDATA[swf]]></category>

		<guid isPermaLink="false">http://blog.flashdesign-store.com/?p=548</guid>
		<description><![CDATA[Hello everybody, as you know Flash Player has a bad reputation, because he has a problem with his protection. Well a few days ago, I was asked if I want to make a review for a SWF protector, i came &#8230;<p class="read-more"><a href="http://blog.flashdesign-store.com/?p=548">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Hello everybody, as you know Flash Player has a bad reputation, because he has a problem with his protection. Well a few days ago, I was asked if I want to make a review for a SWF protector, i came across this sofware called SWF Protector. I started to make some tests, and I was really surprised when I saw that he realy makes a very good job.<br />
Below is an example of a trying a decompilation. The SWF that I used is my last project, posted on my blog. If you are a reader of my blog you know that my last project is that <a href="http://blog.flashdesign-store.com/?p=540">Bounce Effect</a></p>
<p>So, this is the code that I extract from the SWF without having a protection:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript actionscript" style="font-family:monospace;">&nbsp;
package  
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #0066CC;">MovieClip</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">geom</span>.<span style="color: #006600;">Rectangle</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">geom</span>.<span style="color: #006600;">ColorTransform</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">geom</span>.<span style="color: #006600;">Transform</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Ball <span style="color: #0066CC;">extends</span> <span style="color: #0066CC;">MovieClip</span>
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> speedX:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">10</span>;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> speedY:<span style="color: #0066CC;">int</span> = -<span style="color: #cc66cc;">10</span>;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Ball<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> 
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">super</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			addEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ENTER_FRAME</span>, onE<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> cT:ColorTransform = <span style="color: #000000; font-weight: bold;">new</span> ColorTransform<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			cT.<span style="color: #0066CC;">color</span> = <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">random</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> 0xFFFFFF;
			transform.<span style="color: #006600;">colorTransform</span> = cT;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onE<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			x += speedX;
			y += speedY;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> bounds:Rectangle = <span style="color: #0066CC;">getBounds</span><span style="color: #66cc66;">&#40;</span>parent<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>bounds.<span style="color: #0066CC;">left</span> <span style="color: #66cc66;">&lt;</span> 0 || bounds.<span style="color: #0066CC;">right</span> <span style="color: #66cc66;">&gt;</span> <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageWidth</span><span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				speedX <span style="color: #66cc66;">*</span>= -<span style="color: #cc66cc;">1</span>;
			<span style="color: #66cc66;">&#125;</span>
&nbsp;
			<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>bounds.<span style="color: #006600;">top</span> <span style="color: #66cc66;">&lt;</span> 0 || bounds.<span style="color: #006600;">bottom</span> <span style="color: #66cc66;">&gt;</span> <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageHeight</span><span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				speedY <span style="color: #66cc66;">*</span>= -<span style="color: #cc66cc;">1</span>;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>And this is the code that I extract with protection:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript actionscript" style="font-family:monospace;">&nbsp;
package
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">geom</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span><span style="color: #66cc66;">*</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Ball <span style="color: #0066CC;">extends</span> flash.<span style="color: #006600;">display</span>.<span style="color: #0066CC;">MovieClip</span>
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Ball<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #66cc66;">!</span><span style="color: #000000; font-weight: bold;">false</span>;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		internal <span style="color: #000000; font-weight: bold;">function</span> onE<span style="color: #66cc66;">&#40;</span>arg1:flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">!</span><span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				-<span style="color: #000000; font-weight: bold;">true</span>;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> speedX:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">10</span>;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> speedY:<span style="color: #0066CC;">int</span> = -<span style="color: #cc66cc;">10</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #66cc66;">*</span>;
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #66cc66;">*</span>;
&nbsp;
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">!</span><span style="color: #000000; font-weight: bold;">false</span><span style="color: #66cc66;">&#41;</span>
	<span style="color: #66cc66;">&#123;</span>
		;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>As you can see, without a protection the source code is note safe.</p>
<p>SWF Protector is a highly reliable encryption solution, which will thoroughly protect all of your Flash files from all kinds of SWF decompilers. SWF Protector fully protects ActionScript, so your artwork is impossible to steal. It uses four different protection algorithms that allow SWF file playback in Flash Player, but conceal the source code completely. You will be able to encrypt all ActionScript classes, or select specific ones that contain most sensitive code.<br />
You can see more <a href="http://www.dcomsoft.com/">HERE</a></p>
<div class="shr-publisher-548"></div>]]></content:encoded>
			<wfw:commentRss>http://blog.flashdesign-store.com/?feed=rss2&#038;p=548</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bounce Effect</title>
		<link>http://blog.flashdesign-store.com/?p=540</link>
		<comments>http://blog.flashdesign-store.com/?p=540#comments</comments>
		<pubDate>Mon, 13 Jun 2011 13:19:32 +0000</pubDate>
		<dc:creator>Horia Condrea</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[bounce]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://blog.flashdesign-store.com/?p=540</guid>
		<description><![CDATA[Hello again. I come back with a simple exemple of &#8216;bouncing on stage&#8217;. Very simple to understand, and if you have any questions, feel free to ask. I have a lot on my head right now, sorry for my little &#8230;<p class="read-more"><a href="http://blog.flashdesign-store.com/?p=540">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>Hello again. I come back with a simple exemple of &#8216;bouncing on stage&#8217;. Very simple to understand, and if you have any questions, feel free to ask. I have a lot on my head right now, sorry for my little introduction for this ActionScript class.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript actionscript" style="font-family:monospace;">package  
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #0066CC;">MovieClip</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">geom</span>.<span style="color: #006600;">Rectangle</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">geom</span>.<span style="color: #006600;">ColorTransform</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">geom</span>.<span style="color: #006600;">Transform</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Ball <span style="color: #0066CC;">extends</span> <span style="color: #0066CC;">MovieClip</span>
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> speedX:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">10</span>;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> speedY:<span style="color: #0066CC;">int</span> = -<span style="color: #cc66cc;">10</span>;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Ball<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> 
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #808080; font-style: italic;">// constructor code</span>
			addEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ENTER_FRAME</span>, onE<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> cT:ColorTransform = <span style="color: #000000; font-weight: bold;">new</span> ColorTransform<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			cT.<span style="color: #0066CC;">color</span> = <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">random</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> 0xFFFFFF;
			transform.<span style="color: #006600;">colorTransform</span> = cT;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onE<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			x += speedX;
			y += speedY;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> bounds:Rectangle = <span style="color: #0066CC;">getBounds</span><span style="color: #66cc66;">&#40;</span>parent<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>bounds.<span style="color: #0066CC;">left</span> <span style="color: #66cc66;">&lt;</span> 0 || bounds.<span style="color: #0066CC;">right</span> <span style="color: #66cc66;">&gt;</span> <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageWidth</span><span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				speedX <span style="color: #66cc66;">*</span>= -<span style="color: #cc66cc;">1</span>;
			<span style="color: #66cc66;">&#125;</span>
&nbsp;
			<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>bounds.<span style="color: #006600;">top</span> <span style="color: #66cc66;">&lt;</span> 0 || bounds.<span style="color: #006600;">bottom</span> <span style="color: #66cc66;">&gt;</span> <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageHeight</span><span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				speedY <span style="color: #66cc66;">*</span>= -<span style="color: #cc66cc;">1</span>;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #66cc66;">&#125;</span></pre></div></div>


<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_index_1632496978"
			class="flashmovie"
			width="550"
			height="400">
	<param name="movie" value="http://www.flashdesign-store.com/mywork/Bounce/index.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashdesign-store.com/mywork/Bounce/index.swf"
			name="fm_index_1632496978"
			width="550"
			height="400">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object><br />
<a href='#' onclick='javascript:window.open("/?feed=rss2&download=6","Window1","menubar=no,width=400,height=200,toolbar=no, left="+((screen.width/2)-200)+", top="+((screen.height/2)-100));return false;' style="background:url('http://blog.flashdesign-store.com/wp-content/plugins/download-manager/icon/download.png') no-repeat;padding:3px 12px 12px 28px;font:bold 10pt verdana;">Download</a><br><small style='margin-left:30px;'>Downloaded 364 times</small></p>
<div class="shr-publisher-540"></div>]]></content:encoded>
			<wfw:commentRss>http://blog.flashdesign-store.com/?feed=rss2&#038;p=540</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Quick Tip: How to Load XML File in AS 3.0</title>
		<link>http://blog.flashdesign-store.com/?p=470</link>
		<comments>http://blog.flashdesign-store.com/?p=470#comments</comments>
		<pubDate>Fri, 27 May 2011 09:42:08 +0000</pubDate>
		<dc:creator>Horia Condrea</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[AS 3.0]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[how]]></category>
		<category><![CDATA[to]]></category>
		<category><![CDATA[XML]]></category>

		<guid isPermaLink="false">http://blog.flashdesign-store.com/?p=470</guid>
		<description><![CDATA[There is another quick tip:&#8221;How to Load XML File in AS 3.0&#8243;. All you need to do is to create an XML file. And then look at my code over there, and try to do it yourself. Is not hard &#8230;<p class="read-more"><a href="http://blog.flashdesign-store.com/?p=470">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p>There is another quick tip:&#8221;How to Load XML File in AS 3.0&#8243;. All you need to do is to create an XML file. And then look at my code over there, and try to do it yourself. Is not hard to understand. One important thing, for this project the XML file, will be in the some folder with the &#8216;.fla&#8217; and &#8216;.as&#8217; file.</p>
<p>Code:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript actionscript" style="font-family:monospace;">package
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLRequest</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLLoader</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> main <span style="color: #0066CC;">extends</span> Sprite
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">xml</span>:<span style="color: #0066CC;">XML</span>;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> main<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			loadXML<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;main.xml&quot;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> loadXML<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">name</span>:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">name</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> reqURL:URLRequest = <span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">name</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> loadURL:URLLoader = <span style="color: #000000; font-weight: bold;">new</span> URLLoader<span style="color: #66cc66;">&#40;</span>reqURL<span style="color: #66cc66;">&#41;</span>;
			loadURL.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">COMPLETE</span>, <span style="color: #0066CC;">show</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">show</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">trace</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">XML</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>.<span style="color: #0066CC;">target</span>.<span style="color: #0066CC;">data</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><a href='#' onclick='javascript:window.open("/?feed=rss2&download=4","Window1","menubar=no,width=400,height=200,toolbar=no, left="+((screen.width/2)-200)+", top="+((screen.height/2)-100));return false;' style="background:url('http://blog.flashdesign-store.com/wp-content/plugins/download-manager/icon/download.png') no-repeat;padding:3px 12px 12px 28px;font:bold 10pt verdana;">Download</a><br><small style='margin-left:30px;'>Downloaded 134 times</small></p>
<div class="shr-publisher-470"></div>]]></content:encoded>
			<wfw:commentRss>http://blog.flashdesign-store.com/?feed=rss2&#038;p=470</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Adobe Flash Builder 4.5 – Free to Students and the Unemployed</title>
		<link>http://blog.flashdesign-store.com/?p=499</link>
		<comments>http://blog.flashdesign-store.com/?p=499#comments</comments>
		<pubDate>Sun, 15 May 2011 07:22:46 +0000</pubDate>
		<dc:creator>Horia Condrea</dc:creator>
				<category><![CDATA[News]]></category>
		<category><![CDATA[4.5]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[builder]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[free]]></category>
		<category><![CDATA[students]]></category>
		<category><![CDATA[unemployed]]></category>

		<guid isPermaLink="false">http://blog.flashdesign-store.com/?p=499</guid>
		<description><![CDATA[For Students and Faculty The rules for this program: 1. Your student ID showing current enrollment, or 2. Your faculty ID showing current employment, or 3. Your employee ID showing current employment, or 4. A letter on an educational institution &#8230;<p class="read-more"><a href="http://blog.flashdesign-store.com/?p=499">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<p><strong>For Students and Faculty<br />
</strong><br />
The rules for this program:</p>
<p>1. Your student ID showing current enrollment, or<br />
2. Your faculty ID showing current employment, or<br />
3. Your employee ID showing current employment, or<br />
4. A letter on an educational institution letterhead stating that you are either a current student, a current faculty member or a current employee of the institution.</p>
<p><strong>For the Unemployed:</strong></p>
<p>1. I am not employed and not otherwise paid to develop software applications or web pages<br />
2. Adobe Flash Builder 4.5 Software I receive under this program is licensed by Adobe only for my personal use to learn about Adobe Flex and improve my skills<br />
3. I will not use the software obtained under this program for production or commercial purposes<br />
4. I will not transfer the license to the software obtained under this program to any other person or entity, including to my employer should I become employed.</p>
<p>Visit <a href="http://www.adobe.com/devnet-apps/flex/free/index.html">this page</a> to sign–up.</p>
<div class="shr-publisher-499"></div>]]></content:encoded>
			<wfw:commentRss>http://blog.flashdesign-store.com/?feed=rss2&#038;p=499</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
