<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0"><channel><title>Flash Blog</title><link>http://blog.flashdesign-store.com</link><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/flashdesign-store" /><description>All about flash</description><language>en</language><lastBuildDate>Sat, 21 Jan 2012 16:15:26 PST</lastBuildDate><sy:updatePeriod xmlns:sy="http://purl.org/rss/1.0/modules/syndication/">hourly</sy:updatePeriod><sy:updateFrequency xmlns:sy="http://purl.org/rss/1.0/modules/syndication/">1</sy:updateFrequency><xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/flashdesign-store" /><feedburner:info uri="flashdesign-store" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><itunes:explicit>no</itunes:explicit><itunes:subtitle>All about flash</itunes:subtitle><feedburner:feedFlare href="http://add.my.yahoo.com/rss?url=http%3A%2F%2Ffeeds.feedburner.com%2Fflashdesign-store" src="http://us.i1.yimg.com/us.yimg.com/i/us/my/addtomyyahoo4.gif">Subscribe with My Yahoo!</feedburner:feedFlare><feedburner:feedFlare href="http://www.newsgator.com/ngs/subscriber/subext.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fflashdesign-store" src="http://www.newsgator.com/images/ngsub1.gif">Subscribe with NewsGator</feedburner:feedFlare><feedburner:feedFlare href="http://feeds.my.aol.com/add.jsp?url=http%3A%2F%2Ffeeds.feedburner.com%2Fflashdesign-store" src="http://o.aolcdn.com/favorites.my.aol.com/webmaster/ffclient/webroot/locale/en-US/images/myAOLButtonSmall.gif">Subscribe with My AOL</feedburner:feedFlare><feedburner:feedFlare href="http://www.bloglines.com/sub/http://feeds.feedburner.com/flashdesign-store" src="http://www.bloglines.com/images/sub_modern11.gif">Subscribe with Bloglines</feedburner:feedFlare><feedburner:feedFlare href="http://www.netvibes.com/subscribe.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fflashdesign-store" src="http://www.netvibes.com/img/add2netvibes.gif">Subscribe with Netvibes</feedburner:feedFlare><feedburner:feedFlare href="http://fusion.google.com/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fflashdesign-store" src="http://buttons.googlesyndication.com/fusion/add.gif">Subscribe with Google</feedburner:feedFlare><feedburner:feedFlare href="http://www.pageflakes.com/subscribe.aspx?url=http%3A%2F%2Ffeeds.feedburner.com%2Fflashdesign-store" src="http://www.pageflakes.com/ImageFile.ashx?instanceId=Static_4&amp;fileName=ATP_blu_91x17.gif">Subscribe with Pageflakes</feedburner:feedFlare><feedburner:feedFlare href="http://www.plusmo.com/add?url=http%3A%2F%2Ffeeds.feedburner.com%2Fflashdesign-store" src="http://plusmo.com/res/graphics/fbplusmo.gif">Subscribe with Plusmo</feedburner:feedFlare><feedburner:feedFlare href="http://www.thefreedictionary.com/_/hp/AddRSS.aspx?http%3A%2F%2Ffeeds.feedburner.com%2Fflashdesign-store" src="http://img.tfd.com/hp/addToTheFreeDictionary.gif">Subscribe with The Free Dictionary</feedburner:feedFlare><feedburner:feedFlare href="http://www.bitty.com/manual/?contenttype=rssfeed&amp;contentvalue=http%3A%2F%2Ffeeds.feedburner.com%2Fflashdesign-store" src="http://www.bitty.com/img/bittychicklet_91x17.gif">Subscribe with Bitty Browser</feedburner:feedFlare><feedburner:feedFlare href="http://www.live.com/?add=http%3A%2F%2Ffeeds.feedburner.com%2Fflashdesign-store" src="http://tkfiles.storage.msn.com/x1piYkpqHC_35nIp1gLE68-wvzLZO8iXl_JMledmJQXP-XTBOLfmQv4zhj4MhcWEJh_GtoBIiAl1Mjh-ndp9k47If7hTaFno0mxW9_i3p_5qQw">Subscribe with Live.com</feedburner:feedFlare><feedburner:feedFlare href="http://mix.excite.eu/add?feedurl=http%3A%2F%2Ffeeds.feedburner.com%2Fflashdesign-store" src="http://image.excite.co.uk/mix/addtomix.gif">Subscribe with Excite MIX</feedburner:feedFlare><feedburner:feedFlare href="http://www.webwag.com/wwgthis.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fflashdesign-store" src="http://www.webwag.com/images/wwgthis.gif">Subscribe with Webwag</feedburner:feedFlare><feedburner:feedFlare href="http://www.podcastready.com/oneclick_bookmark.php?url=http%3A%2F%2Ffeeds.feedburner.com%2Fflashdesign-store" src="http://www.podcastready.com/images/podcastready_button.gif">Subscribe with Podcast Ready</feedburner:feedFlare><feedburner:feedFlare href="http://www.wikio.com/subscribe?url=http%3A%2F%2Ffeeds.feedburner.com%2Fflashdesign-store" src="http://www.wikio.com/shared/img/add2wikio.gif">Subscribe with Wikio</feedburner:feedFlare><feedburner:feedFlare href="http://www.dailyrotation.com/index.php?feed=http%3A%2F%2Ffeeds.feedburner.com%2Fflashdesign-store" src="http://www.dailyrotation.com/rss-dr2.gif">Subscribe with Daily Rotation</feedburner:feedFlare><item><title>ImTOO FLV Converter</title><link>http://feedproxy.google.com/~r/flashdesign-store/~3/9v0LLoLYoFk/</link><category>ActionScript 3.0</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Horia Condrea</dc:creator><pubDate>Sat, 21 Jan 2012 16:15:26 PST</pubDate><guid isPermaLink="false">http://blog.flashdesign-store.com/?p=588</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p>ImTOO FLV Converter is a professional FLV video converter software to convert FLV to AVI, MP4, DivX, etc. It is also a video to FLV converter to convert AVI to FLV, MP4 to FLV, WMV to FLV video format. Likewise, it can convert audio files such as MP3 to FLV and SWF audios as a FLV audio converter.</p>
<p>ImTOO FLV Converter helps you convert Flash video (FLV) to all types of videos for playback on portable media devices. It is able to:<a href="http://www.imtoo.com/flv-converter.html">Convert FLV to MP4, FLV to AVI, FLV to WMV/MOV/DivX/3GP; Convert AVI to FLV, MP4 to FLV, MKV to FLV, MOV to FLV, etc.</a></p>
<p>With ImTOO FLV Converter, you can conveniently upload the output FLV videos to YouTube.com and other video websites, and enjoy MP4 videos converted from your desired YouTube FLV videos on iPod, PSP, iPhone, and WMV videos on Xbox.</p>
<div class="shr-publisher-588"></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/flashdesign-store?a=9v0LLoLYoFk:on9GH4ZTHJk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/flashdesign-store?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashdesign-store?a=9v0LLoLYoFk:on9GH4ZTHJk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/flashdesign-store?i=9v0LLoLYoFk:on9GH4ZTHJk:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/flashdesign-store/~4/9v0LLoLYoFk" height="1" width="1"/>]]></content:encoded><description>ImTOO FLV Converter is a professional FLV video converter software to convert FLV to AVI, MP4, DivX, etc. It is also a video to FLV converter to convert AVI to FLV, MP4 to FLV, WMV to FLV video format. Likewise, &amp;#8230;&lt;p class="read-more"&gt;&lt;a href="http://blog.flashdesign-store.com/?p=588"&gt;Read more &amp;#187;&lt;/a&gt;&lt;/p&gt;</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blog.flashdesign-store.com/?feed=rss2&amp;p=588</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://blog.flashdesign-store.com/?p=588</feedburner:origLink></item><item><title>Quick Tip: How to use your microphone in AS 3.0</title><link>http://feedproxy.google.com/~r/flashdesign-store/~3/HR0hr6MXsaE/</link><category>ActionScript 3.0</category><category>Flex</category><category>as3.0</category><category>flash</category><category>microphone</category><category>quick</category><category>tip</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Horia Condrea</dc:creator><pubDate>Mon, 28 Nov 2011 13:33:44 PST</pubDate><guid isPermaLink="false">http://blog.flashdesign-store.com/?p=585</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![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: <strong>How to use your microphone in AS 3.0</strong></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><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/flashdesign-store?a=HR0hr6MXsaE:kBHsdqyFlGE:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/flashdesign-store?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashdesign-store?a=HR0hr6MXsaE:kBHsdqyFlGE:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/flashdesign-store?i=HR0hr6MXsaE:kBHsdqyFlGE:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/flashdesign-store/~4/HR0hr6MXsaE" height="1" width="1"/>]]></content:encoded><description>Hello again and thanks for all messages. But please, no more SPAM. Well, let&amp;#8217;s get back to our bussines, today I&amp;#8217;ll present to you a new Quick Tip: How to use your microphone in AS 3.0. A few months ago &amp;#8230;&lt;p class="read-more"&gt;&lt;a href="http://blog.flashdesign-store.com/?p=585"&gt;Read more &amp;#187;&lt;/a&gt;&lt;/p&gt;</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blog.flashdesign-store.com/?feed=rss2&amp;p=585</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://blog.flashdesign-store.com/?p=585</feedburner:origLink></item><item><title>Box2D 2.1a Lesson 2(Tutorial)</title><link>http://feedproxy.google.com/~r/flashdesign-store/~3/lLbbkJVHjTE/</link><category>ActionScript 3.0</category><category>Box2D</category><category>AS 3.0</category><category>box2d</category><category>Box2D 2.1a</category><category>flash</category><category>lesson</category><category>tutorial</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Horia Condrea</dc:creator><pubDate>Thu, 18 Aug 2011 06:06:11 PDT</pubDate><guid isPermaLink="false">http://blog.flashdesign-store.com/?p=568</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![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_413600844"
			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_413600844"
			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><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/flashdesign-store?a=lLbbkJVHjTE:EchIlYmKNtk:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/flashdesign-store?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashdesign-store?a=lLbbkJVHjTE:EchIlYmKNtk:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/flashdesign-store?i=lLbbkJVHjTE:EchIlYmKNtk:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/flashdesign-store/~4/lLbbkJVHjTE" height="1" width="1"/>]]></content:encoded><description>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 &amp;#8230;&lt;p class="read-more"&gt;&lt;a href="http://blog.flashdesign-store.com/?p=568"&gt;Read more &amp;#187;&lt;/a&gt;&lt;/p&gt;</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blog.flashdesign-store.com/?feed=rss2&amp;p=568</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">1</slash:comments><enclosure url="http://flashdesign-store.com/mywork/Box2d%20Lesson%202/Main.swf" length="141656" type="application/x-shockwave-flash" /><media:content url="http://flashdesign-store.com/mywork/Box2d%20Lesson%202/Main.swf" fileSize="141656" type="application/x-shockwave-flash" /><itunes:explicit>no</itunes:explicit><itunes:subtitle>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 &amp;#8230;Read more &amp;#187;</itunes:subtitle><itunes:summary>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 &amp;#8230;Read more &amp;#187;</itunes:summary><itunes:keywords>ActionScript 3.0, Box2D, AS 3.0, box2d, Box2D 2.1a, flash, lesson, tutorial</itunes:keywords><feedburner:origLink>http://blog.flashdesign-store.com/?p=568</feedburner:origLink></item><item><title>Box2D 2.1a Lesson 1(Tutorial)</title><link>http://feedproxy.google.com/~r/flashdesign-store/~3/IfTfpXcQNwM/</link><category>ActionScript 3.0</category><category>Box2D</category><category>Box2D 2.1a</category><category>flash</category><category>leasson</category><category>physics</category><category>tutorial</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Horia Condrea</dc:creator><pubDate>Wed, 20 Jul 2011 01:12:45 PDT</pubDate><guid isPermaLink="false">http://blog.flashdesign-store.com/?p=560</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![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><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/flashdesign-store?a=IfTfpXcQNwM:1aVfniE-r0g:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/flashdesign-store?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashdesign-store?a=IfTfpXcQNwM:1aVfniE-r0g:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/flashdesign-store?i=IfTfpXcQNwM:1aVfniE-r0g:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/flashdesign-store/~4/IfTfpXcQNwM" height="1" width="1"/>]]></content:encoded><description>Hello again, this is the first lesson for teaching Box2D. Don&amp;#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 &amp;#8230;&lt;p class="read-more"&gt;&lt;a href="http://blog.flashdesign-store.com/?p=560"&gt;Read more &amp;#187;&lt;/a&gt;&lt;/p&gt;</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blog.flashdesign-store.com/?feed=rss2&amp;p=560</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">2</slash:comments><feedburner:origLink>http://blog.flashdesign-store.com/?p=560</feedburner:origLink></item><item><title>Contact Form in AS 3.0 with PHP Tutorial</title><link>http://feedproxy.google.com/~r/flashdesign-store/~3/NpGGDkfJTSc/</link><category>ActionScript 3.0</category><category>AS 3.0</category><category>contact</category><category>flash</category><category>form</category><category>php</category><category>tutorial</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Horia Condrea</dc:creator><pubDate>Fri, 08 Jul 2011 00:38:55 PDT</pubDate><guid isPermaLink="false">http://blog.flashdesign-store.com/?p=552</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![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 96 times</small></p>
<div class="shr-publisher-552"></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/flashdesign-store?a=NpGGDkfJTSc:-wq_NCdjnwY:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/flashdesign-store?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashdesign-store?a=NpGGDkfJTSc:-wq_NCdjnwY:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/flashdesign-store?i=NpGGDkfJTSc:-wq_NCdjnwY:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/flashdesign-store/~4/NpGGDkfJTSc" height="1" width="1"/>]]></content:encoded><description>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 &amp;#8230;&lt;p class="read-more"&gt;&lt;a href="http://blog.flashdesign-store.com/?p=552"&gt;Read more &amp;#187;&lt;/a&gt;&lt;/p&gt;</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blog.flashdesign-store.com/?feed=rss2&amp;p=552</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">1</slash:comments><feedburner:origLink>http://blog.flashdesign-store.com/?p=552</feedburner:origLink></item><item><title>SWF Protector</title><link>http://feedproxy.google.com/~r/flashdesign-store/~3/UTq4NyXXA5E/</link><category>ActionScript 3.0</category><category>files</category><category>flash</category><category>protect</category><category>protector</category><category>swf</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Horia Condrea</dc:creator><pubDate>Tue, 05 Jul 2011 05:30:25 PDT</pubDate><guid isPermaLink="false">http://blog.flashdesign-store.com/?p=548</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![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><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/flashdesign-store?a=UTq4NyXXA5E:mvgeH4QLS6g:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/flashdesign-store?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashdesign-store?a=UTq4NyXXA5E:mvgeH4QLS6g:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/flashdesign-store?i=UTq4NyXXA5E:mvgeH4QLS6g:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/flashdesign-store/~4/UTq4NyXXA5E" height="1" width="1"/>]]></content:encoded><description>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 &amp;#8230;&lt;p class="read-more"&gt;&lt;a href="http://blog.flashdesign-store.com/?p=548"&gt;Read more &amp;#187;&lt;/a&gt;&lt;/p&gt;</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blog.flashdesign-store.com/?feed=rss2&amp;p=548</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://blog.flashdesign-store.com/?p=548</feedburner:origLink></item><item><title>Bounce Effect</title><link>http://feedproxy.google.com/~r/flashdesign-store/~3/WYfdKc_Sjpk/</link><category>ActionScript 3.0</category><category>Flex</category><category>bounce</category><category>class</category><category>flash</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Horia Condrea</dc:creator><pubDate>Mon, 13 Jun 2011 06:19:32 PDT</pubDate><guid isPermaLink="false">http://blog.flashdesign-store.com/?p=540</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![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_1888602268"
			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_1888602268"
			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 313 times</small></p>
<div class="shr-publisher-540"></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/flashdesign-store?a=WYfdKc_Sjpk:uMwwCpJHXWA:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/flashdesign-store?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashdesign-store?a=WYfdKc_Sjpk:uMwwCpJHXWA:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/flashdesign-store?i=WYfdKc_Sjpk:uMwwCpJHXWA:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/flashdesign-store/~4/WYfdKc_Sjpk" height="1" width="1"/>]]></content:encoded><description>Hello again. I come back with a simple exemple of &amp;#8216;bouncing on stage&amp;#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 &amp;#8230;&lt;p class="read-more"&gt;&lt;a href="http://blog.flashdesign-store.com/?p=540"&gt;Read more &amp;#187;&lt;/a&gt;&lt;/p&gt;</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blog.flashdesign-store.com/?feed=rss2&amp;p=540</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">1</slash:comments><enclosure url="http://www.flashdesign-store.com/mywork/Bounce/index.swf" length="1235" type="application/x-shockwave-flash" /><media:content url="http://www.flashdesign-store.com/mywork/Bounce/index.swf" fileSize="1235" type="application/x-shockwave-flash" /><itunes:explicit>no</itunes:explicit><itunes:subtitle>Hello again. I come back with a simple exemple of &amp;#8216;bouncing on stage&amp;#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 &amp;#8230;Read more &amp;#187;</itunes:subtitle><itunes:summary>Hello again. I come back with a simple exemple of &amp;#8216;bouncing on stage&amp;#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 &amp;#8230;Read more &amp;#187;</itunes:summary><itunes:keywords>ActionScript 3.0, Flex, bounce, class, flash</itunes:keywords><feedburner:origLink>http://blog.flashdesign-store.com/?p=540</feedburner:origLink></item><item><title>Quick Tip: How to Load XML File in AS 3.0</title><link>http://feedproxy.google.com/~r/flashdesign-store/~3/6cjYUPYBeqU/</link><category>ActionScript 3.0</category><category>AS 3.0</category><category>file</category><category>flash</category><category>how</category><category>to</category><category>XML</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Horia Condrea</dc:creator><pubDate>Fri, 27 May 2011 02:42:08 PDT</pubDate><guid isPermaLink="false">http://blog.flashdesign-store.com/?p=470</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![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 105 times</small></p>
<div class="shr-publisher-470"></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/flashdesign-store?a=6cjYUPYBeqU:kz6CY2y_s-E:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/flashdesign-store?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashdesign-store?a=6cjYUPYBeqU:kz6CY2y_s-E:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/flashdesign-store?i=6cjYUPYBeqU:kz6CY2y_s-E:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/flashdesign-store/~4/6cjYUPYBeqU" height="1" width="1"/>]]></content:encoded><description>There is another quick tip:&amp;#8221;How to Load XML File in AS 3.0&amp;#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 &amp;#8230;&lt;p class="read-more"&gt;&lt;a href="http://blog.flashdesign-store.com/?p=470"&gt;Read more &amp;#187;&lt;/a&gt;&lt;/p&gt;</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blog.flashdesign-store.com/?feed=rss2&amp;p=470</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://blog.flashdesign-store.com/?p=470</feedburner:origLink></item><item><title>Adobe Flash Builder 4.5 – Free to Students and the Unemployed</title><link>http://feedproxy.google.com/~r/flashdesign-store/~3/6C9y6ZJchLY/</link><category>News</category><category>4.5</category><category>adobe</category><category>builder</category><category>flash</category><category>free</category><category>students</category><category>unemployed</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Horia Condrea</dc:creator><pubDate>Sun, 15 May 2011 00:22:46 PDT</pubDate><guid isPermaLink="false">http://blog.flashdesign-store.com/?p=499</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![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><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/flashdesign-store?a=6C9y6ZJchLY:G2nUwpu1Egw:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/flashdesign-store?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashdesign-store?a=6C9y6ZJchLY:G2nUwpu1Egw:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/flashdesign-store?i=6C9y6ZJchLY:G2nUwpu1Egw:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/flashdesign-store/~4/6C9y6ZJchLY" height="1" width="1"/>]]></content:encoded><description>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 &amp;#8230;&lt;p class="read-more"&gt;&lt;a href="http://blog.flashdesign-store.com/?p=499"&gt;Read more &amp;#187;&lt;/a&gt;&lt;/p&gt;</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blog.flashdesign-store.com/?feed=rss2&amp;p=499</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">0</slash:comments><feedburner:origLink>http://blog.flashdesign-store.com/?p=499</feedburner:origLink></item><item><title>Quick Tip: How to use your web camera in AS 3.0</title><link>http://feedproxy.google.com/~r/flashdesign-store/~3/lmC7mu6xJ5Q/</link><category>ActionScript 3.0</category><category>Flex</category><category>AS 3.0</category><category>camera</category><category>flash</category><category>how</category><category>quick</category><category>tip</category><category>tutorial</category><category>web</category><category>webcam</category><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Horia Condrea</dc:creator><pubDate>Sun, 01 May 2011 14:01:40 PDT</pubDate><guid isPermaLink="false">http://blog.flashdesign-store.com/?p=467</guid><content:encoded xmlns:content="http://purl.org/rss/1.0/modules/content/"><![CDATA[<p><strong>In the following code, I will access the camera that I have at my computer.</strong></p>
<p>Video type objects can be used to render images from the webcam. <em>flash.media.Camera</em> class extends <em>EventDispatcher</em> &#8211; are inherited property / events / methods in this class. The camera will be attached to a <em>Video</em> object using the method <em>attachCamera. A camera object will not be added through the operator &#8220;new &#8220;, the reason being that, every time, we must access the same memory area in which we find images from the webcam.Assume that the system is attached a single webcam.</p>
<p></em>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;">media</span>.<span style="color: #0066CC;">Video</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">media</span>.<span style="color: #0066CC;">Camera</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</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> v:<span style="color: #0066CC;">Video</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Video</span><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> c:<span style="color: #0066CC;">Camera</span> = <span style="color: #0066CC;">Camera</span>.<span style="color: #006600;">getCamera</span><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> main<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> 
		<span style="color: #66cc66;">&#123;</span>
			v.<span style="color: #006600;">attachCamera</span><span style="color: #66cc66;">&#40;</span>c<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">this</span>.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>v<span style="color: #66cc66;">&#41;</span>;
			c.<span style="color: #0066CC;">setMode</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">320</span>,<span style="color: #cc66cc;">240</span>,<span style="color: #cc66cc;">32</span>,<span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<div class="shr-publisher-467"></div><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/flashdesign-store?a=lmC7mu6xJ5Q:uyG9P5vLs6Q:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/flashdesign-store?d=yIl2AUoC8zA" border="0"></img></a> <a href="http://feeds.feedburner.com/~ff/flashdesign-store?a=lmC7mu6xJ5Q:uyG9P5vLs6Q:gIN9vFwOqvQ"><img src="http://feeds.feedburner.com/~ff/flashdesign-store?i=lmC7mu6xJ5Q:uyG9P5vLs6Q:gIN9vFwOqvQ" border="0"></img></a>
</div><img src="http://feeds.feedburner.com/~r/flashdesign-store/~4/lmC7mu6xJ5Q" height="1" width="1"/>]]></content:encoded><description>In the following code, I will access the camera that I have at my computer. Video type objects can be used to render images from the webcam. flash.media.Camera class extends EventDispatcher &amp;#8211; are inherited property / events / methods in &amp;#8230;&lt;p class="read-more"&gt;&lt;a href="http://blog.flashdesign-store.com/?p=467"&gt;Read more &amp;#187;&lt;/a&gt;&lt;/p&gt;</description><wfw:commentRss xmlns:wfw="http://wellformedweb.org/CommentAPI/">http://blog.flashdesign-store.com/?feed=rss2&amp;p=467</wfw:commentRss><slash:comments xmlns:slash="http://purl.org/rss/1.0/modules/slash/">1</slash:comments><feedburner:origLink>http://blog.flashdesign-store.com/?p=467</feedburner:origLink></item><media:rating>nonadult</media:rating></channel></rss>

