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

<channel>
	<title>Flash Blog</title>
	<atom:link href="http://blog.flashdesign-store.com/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://blog.flashdesign-store.com</link>
	<description>All about flash</description>
	<lastBuildDate>Fri, 14 May 2010 17:55:27 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Flash Decompiler Trillix</title>
		<link>http://blog.flashdesign-store.com/?p=284</link>
		<comments>http://blog.flashdesign-store.com/?p=284#comments</comments>
		<pubDate>Fri, 14 May 2010 17:55:27 +0000</pubDate>
		<dc:creator>Horatiu Condrea</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>

		<guid isPermaLink="false">http://blog.flashdesign-store.com/?p=284</guid>
		<description><![CDATA[A few days ago, I came across a software which I found quite interesting. Flash Decompiler Trillix is a SWF to FLA converter. So far I have not used any kind of Flash Decompiler, but this software reproduce a very good ActionScript code. Well, I said the code is good, not ideal. Is perfect to [...]]]></description>
			<content:encoded><![CDATA[<p>A few days ago, I came across a software which I found quite interesting.   <a href="http://www.eltima.com/products/flashdecompiler/">Flash Decompiler Trillix </a> is a SWF to FLA converter.   So far I have not used any  kind of Flash Decompiler, but this software reproduce a very good ActionScript code. Well,   I said the code is good, not ideal.   Is perfect to reproduce your FLA for small projects, if your computer crash and damage the FLA file, but the SWF is still ok, also is able to restore your original Flex source.   </p>
<p>What I think is interesting is that you can edit the SWF file directly from your <strong>Flash Decompiler Trillix</strong>  without knowing codeing. Is true that you can&#8217;t do to much with the edit tools, but is enough to get around and make some changes.  </p>
<p>What is again very useful, is that you can extract SWF elements such: Flash Video to AVI, MPEG, FLV and FLA, save sounds as WAV or MP3, images &#8211; as PNG, JPEG and BMP, texts as RTF, TXT and HTML. </p>
<p>The software design is simple and you can easy see the tools.</p>
<p>And last, but not least you can capture SWF movies from the Internet with Flash Decompiler! <strong>Save Flash Movie</strong>, have 2 web plug-ins for Internet Explorer and FireFox. So, if you want to save a flash movie to your hard disk from the internet, you can do that . And after that if you want you can edit the Flash movie, with the edit tools.</p>
<p>And now this is the full features list:</p>
<p>    * Full support of Flash 5, 6, 7, 8, 9 and 10 including AS 2.0 and 3.0<br />
    * Extract all Flash file resources into various formats<br />
    * Support of SWF files built in Flex (v2 and v3 supported)<br />
    * Extract Flash video into AVI, MPEG and other playable formats<br />
    * Batch decompilation and conversion of Flash movies<br />
    * Edit more Flash objects now without converting to FLA: images, texts, hyperlinks, sounds, colors and lines<br />
    * New scalable shining interface with ribbon bar<br />
    * Advanced built-in Flash player to preview and playback your Flash movies<br />
    * ASCII, Hex, Pi-code and common ActionScripts representation (not in AS 3.0)<br />
    * Detailed configuration of SWF to FLA conversion (motion tweens, library, FLA format, AS and other settings)<br />
    * Take screenshots of Flash file played<br />
    * Unique global ActionScripts search in all tasks simultaneously<br />
    * Simple and effective adding of multiple files or folders to the Tasks list<br />
    * Easily change the background color of any SWF file<br />
    * Detailed tag information panel<br />
    * Save Flash Movie in Internet Explorer and FireFox plug-ins are supplied for simple saving of SWF movies online<br />
    * The software is digitally signed to verify Eltima quality and software authenticity<br />
    * Many other convenient features for professional Flash decompilation</p>
<p>If you think, you need such a software visit Flash Decompiler Trillix   <a href="http://www.eltima.com/products/flashdecompiler/">page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flashdesign-store.com/?feed=rss2&amp;p=284</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XML Video Player (AS 3.0)</title>
		<link>http://blog.flashdesign-store.com/?p=280</link>
		<comments>http://blog.flashdesign-store.com/?p=280#comments</comments>
		<pubDate>Fri, 12 Mar 2010 10:23:24 +0000</pubDate>
		<dc:creator>Horatiu Condrea</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>

		<guid isPermaLink="false">http://blog.flashdesign-store.com/?p=280</guid>
		<description><![CDATA[Here is a new flash component you can see it here: XML Video Player Description: This player can be set to any size you want by changing the player width and height It plays any kind of video file that Flash Player supports ( FLV / H.264 encoded video including MP4, M4V, M4A, MOV, Mp4v, [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a new flash component you can see it here: <a href="http://www.flashcomponents.net/component/professional_xml_video_player_v_1.0.html">XML Video Player</a></p>
<p>Description:</p>
<p>This player can be set to any size you want by changing the player width and height</p>
<p>It plays any kind of video file that Flash Player supports ( FLV / H.264 encoded video including MP4, M4V, M4A, MOV, Mp4v, F4V).</p>
<p>To be able to play H.264 video you need Player 9.0.115.0 or later.</p>
<p>The entire graphic is in one MovieClip so it is easy to change the skin in case you need to adapt the graphic design of this Video Player</p>
<p>Features ::</p>
<p>- XML driven content<br />
- Video streaming with buffer<br />
- Full screen video mode supported<br />
- Unlimited amount of videos an be displayed<br />
- Play<br />
- Pause<br />
- Scrollable seek bar<br />
- FLV time duration<br />
- FLV Title<br />
- Volume Control<br />
- Fullscreen (just a click)</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flashdesign-store.com/?feed=rss2&amp;p=280</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Professional  XML  MP3  Player</title>
		<link>http://blog.flashdesign-store.com/?p=273</link>
		<comments>http://blog.flashdesign-store.com/?p=273#comments</comments>
		<pubDate>Wed, 24 Feb 2010 15:48:29 +0000</pubDate>
		<dc:creator>Horatiu Condrea</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>

		<guid isPermaLink="false">http://blog.flashdesign-store.com/?p=273</guid>
		<description><![CDATA[Here is a new flash component you can see it here: Profesional XML Mp3 Player And a short description: Features: - Play Button - Pause Button; - Prev Button; - Next Button; - Current time and Total Time; - Volume Bar; - Name of the current MP3 file that is playing; - Album Cover. -Unlimited [...]]]></description>
			<content:encoded><![CDATA[<p>Here is a new flash component you can see it here: <a href="http://www.flashcomponents.net/component/advanced_xml_mp3_player-rejected.html">Profesional XML Mp3 Player</a></p>
<p></p>
<p>And a short description:</p>
<p>
<strong>
<p>Features:</p>
<p>- Play Button</p>
<p>- Pause Button;</p>
<p>- Prev Button;</p>
<p>- Next Button;</p>
<p>- Current time and Total Time;</p>
<p>- Volume Bar;</p>
<p>- Name of the current MP3 file that is playing;</p>
<p>- Album Cover.</p>
<p>-Unlimited number of MP3 files.</p>
<p>XML settings:</p>
<p>- artist_name &#8211; the artist name</p>
<p>- song_title &#8211; the song tile</p>
<p>- image_path &#8211; the image path for each song</p>
<p>- mp3_path &#8211; the path for each .mp3 file </p>
<p></strong></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flashdesign-store.com/?feed=rss2&amp;p=273</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Scope</title>
		<link>http://blog.flashdesign-store.com/?p=261</link>
		<comments>http://blog.flashdesign-store.com/?p=261#comments</comments>
		<pubDate>Sat, 06 Feb 2010 19:22:21 +0000</pubDate>
		<dc:creator>Horatiu Condrea</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>

		<guid isPermaLink="false">http://blog.flashdesign-store.com/?p=261</guid>
		<description><![CDATA[A few days ago, I found a website that I think has all the qualities to become one of the most popular sites in the area -buy and sell flash components-. I will not say more, take a look and tell me what you think. WebSite:http://flashscope.com]]></description>
			<content:encoded><![CDATA[<p>A few days ago, I found a website that I think has all the qualities to become one of the most popular sites in the area  -buy and sell flash components-. I will not say more, take a look and tell me what you think.</p>
<p>WebSite:<a href="http://flashscope.com">http://flashscope.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flashdesign-store.com/?feed=rss2&amp;p=261</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>AS 3.0 Augmented Reality with Blender and PV3D</title>
		<link>http://blog.flashdesign-store.com/?p=226</link>
		<comments>http://blog.flashdesign-store.com/?p=226#comments</comments>
		<pubDate>Thu, 10 Dec 2009 18:12:56 +0000</pubDate>
		<dc:creator>Horatiu Condrea</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[AS 3.0]]></category>
		<category><![CDATA[augmented]]></category>
		<category><![CDATA[blender]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[PV3D]]></category>
		<category><![CDATA[reality]]></category>

		<guid isPermaLink="false">http://blog.flashdesign-store.com/?p=226</guid>
		<description><![CDATA[Introduction In this tutorial you will learn how to create a simple AR(Augmented Reality) scene, at first appearance this code is a little hairy but you don&#8217;t have to understand every part of it to use it. Requirements 1. Web Camera 2. Adobe Flash CS4 Try or Buy 3. Flex Builder Try or Buy 4. [...]]]></description>
			<content:encoded><![CDATA[<h3>Introduction</h3>
<p>In this tutorial you will learn how to create a simple AR(Augmented Reality) scene, at first appearance this code is a little hairy but you don&#8217;t have to understand every part of it to use it.</p>
<h3>Requirements</h3>
</p>
<p><Br></p>
<h4>1. Web Camera</h4>
<p>
<Br></p>
<h4>2. Adobe Flash CS4</h4>
</p>
<p><a href="http://www.adobe.com/products/flash/?promoid=BPDEE">Try</a> or <a href="http://www.adobe.com/products/flash/?promoid=BPDEE">Buy</a></p>
<p><h4>3. Flex Builder</h4>
</p>
<p><a href="http://www.adobe.com/products/flex/?promoid=BPDEQ">Try</a> or <a href="http://www.adobe.com/products/flex/?promoid=BPDEQ">Buy</a></p>
<p><h4>4. Blender</h4>
</p>
<p><a href="http://www.blender.org/download/get-blender/">Download</a></p>
<p><h4>5. PV 3D</h4>
</p>
<p><a href="http://code.google.com/p/papervision3d/downloads/list">Download</a></p>
<p><h4>6. Augmented Reality</h4>
</p>
<p><a href="http://www.libspark.org/wiki/saqoosha/FLARToolKit/en">Download</a></p>
<p><h4>7. Marker File</h4>
</p>
<p><a href="http://flashdesign-store.com/mywork/AR/MakerGenerator.air">Download</a></p>
<p><h4>8. Pattern</h4>
</p>
<p><a href="http://flashdesign-store.com/mywork/AR/patt.png">Download</a></p>
<h3>Pre-Requesites</h3>
<p>It would be useful for you if you are familiar with PV3D. It would be good to know 3d modeling with Blender and other 3d modeling program
</p>
<h3>Save a Pattern</h3>
<p>First of all, this is not a tutorial for beginers, but I will try to explain very well all the steps that must be taken to obtain the final result.</p>
<p>Well, download the <a href="http://www.thetechlabs.com/.../">Marker File</a>. You will see a AIR file, this AIR file will help ous to save a pattern for our Augmented Reality project. Instal the Marker File&#8230;on the desktop you will see a  <b>ARToolKit Marker Generator</b> AIR file.</p>
<p>Open it, in the same time you Web Camera will start, than you need to save a pattern, you will see a button named Save Pattern and same red lines walking there, those lines will try to find a pattern. Well, now you need to show a paper with a pattern.</p>
<p>A exemple of pattern:</br></p>
<p><img src="http://flashdesign-store.com/mywork/AR/pattern.jpg" border="0" /></p>
<p>While, you show the paper, on the camera you will see that the red linis are around the pattern.Like in this picture:</br></p>
<p><img src="http://flashdesign-store.com/mywork/AR/pat.jpg" border="0" /></p>
<p> In that moment click the save button and save the pattern. In this tutorial my pattern is named <i>pattern.pat</i>.</p>
<p> That was the first step.</br></p>
<h3>3D Model</h3>
<p> For designers, this is maybe the most important step, but I&#8217;m not a designer ao something like that. I&#8217;m only a ActionScript developer, and I will analyze the step from my point of view. For this step you can use Blender, Swift 3D or another modeling program, but unse only the program able to export in Collada. First if you are a beginer in 3d (like me), you can draw a cube or something. If you are use Blender, and have already the made 3d model. Go to <i>File</i>-><i>Export</i>-><i>Collada 1.4(dae)</i>.</p>
<p><img src="http://flashdesign-store.com/mywork/AR/Blend.jpg" border="0" /></p>
<p>After exporting you will have a file named <i>something.dae</i>. This file contains our 3d model that we use in PV3D.</br></p>
<p>If you are useing Swift 3D, the first thing again is draw you model, and export to PV3D. In Swift 3D, we use other option caled <i>Export Selected object To Papervision3D&#8230;</i>. Like in this picture:</p>
<p><img src="http://flashdesign-store.com/mywork/AR/swift.jpg" border="0" /></p>
<p>After that you will have a .swf  file , a .fla  file, and the most important thing a .dae  file. Well now we have the pattern and the 3d model. Is time to do same develop work with ActionScript 3.0 .</p>
<p>Final step 2</br>
</p>
<h3>Make a new project</h3>
<p>If you use Flex Builder just create a new ActionScript 3.0 Project and called augmentedReality. If you unse Flash CS3 or CS4 create a Flash File(ActionScript 3.0), you can give what name you want. At this file create a class called <i>augmentedReality.as</i>. The Flash File and the class must be in the same folder.</p>
<p>For Flex:</p>
<p><img src="http://flashdesign-store.com/mywork/AR/flex.jpg" border="0" /></br></p>
<p> And if you are useing flash, there is a simple pictutre to help you:</br></p>
<p><img src="flash.jpg" border="0" /></br></p>
<p>Well, now we are ready to write the code.</p>
<p>Final step 3.</br></p>
<h3>Start to write the code </h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
</pre></td><td 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>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> augmentedReality <span style="color: #0066CC;">extends</span> Sprite
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> augmentedReality<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
&nbsp;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>Here we have the augmentedReality class copy this in Flash, if you are useing flash.</p>
<h3> Same imports thing</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
</pre></td><td 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;">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;">events</span>.<span style="color: #006600;">Event</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;">media</span>.<span style="color: #0066CC;">Video</span>;
    <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #006600;">ByteArray</span>;
&nbsp;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">libspark</span>.<span style="color: #006600;">flartoolkit</span>.<span style="color: #006600;">core</span>.<span style="color: #006600;">FLARCode</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">libspark</span>.<span style="color: #006600;">flartoolkit</span>.<span style="color: #006600;">core</span>.<span style="color: #006600;">param</span>.<span style="color: #006600;">FLARParam</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">libspark</span>.<span style="color: #006600;">flartoolkit</span>.<span style="color: #006600;">core</span>.<span style="color: #006600;">raster</span>.<span style="color: #006600;">rgb</span>.<span style="color: #006600;">FLARRgbRaster_BitmapData</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">libspark</span>.<span style="color: #006600;">flartoolkit</span>.<span style="color: #006600;">core</span>.<span style="color: #006600;">transmat</span>.<span style="color: #006600;">FLARTransMatResult</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">libspark</span>.<span style="color: #006600;">flartoolkit</span>.<span style="color: #006600;">detector</span>.<span style="color: #006600;">FLARSingleMarkerDetector</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">libspark</span>.<span style="color: #006600;">flartoolkit</span>.<span style="color: #006600;">pv3d</span>.<span style="color: #006600;">FLARBaseNode</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">libspark</span>.<span style="color: #006600;">flartoolkit</span>.<span style="color: #006600;">pv3d</span>.<span style="color: #006600;">FLARCamera3D</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">objects</span>.<span style="color: #006600;">parsers</span>.<span style="color: #006600;">Collada</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">render</span>.<span style="color: #006600;">BasicRenderEngine</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">scenes</span>.<span style="color: #006600;">Scene3D</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">view</span>.<span style="color: #006600;">Viewport3D</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;640&quot;</span>, <span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;480&quot;</span>, frameRate=<span style="color: #ff0000;">&quot;30&quot;</span>, <span style="color: #0066CC;">backgroundColor</span>=<span style="color: #ff0000;">&quot;#FFFFFF&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> augmentedReality <span style="color: #0066CC;">extends</span> Sprite
    <span style="color: #66cc66;">&#123;</span>
         <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> augmentedReality<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
	   <span style="color: #66cc66;">&#123;</span>
&nbsp;
         <span style="color: #66cc66;">&#125;</span>
     <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p> Well, here we need the Papervision 3d library, and the Augmented Reality library. </p>
<h3>Private Variables and Embled files</h3>
<p> Now we need  to embled the pattern and a most important file the <i>camera_para.dat</i> This file is in the Augmented Reality lib . You don&#8217;t need to know want is in this file just embled this file. </p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
</pre></td><td 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;">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;">events</span>.<span style="color: #006600;">Event</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;">media</span>.<span style="color: #0066CC;">Video</span>;
    <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #006600;">ByteArray</span>;
&nbsp;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">libspark</span>.<span style="color: #006600;">flartoolkit</span>.<span style="color: #006600;">core</span>.<span style="color: #006600;">FLARCode</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">libspark</span>.<span style="color: #006600;">flartoolkit</span>.<span style="color: #006600;">core</span>.<span style="color: #006600;">param</span>.<span style="color: #006600;">FLARParam</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">libspark</span>.<span style="color: #006600;">flartoolkit</span>.<span style="color: #006600;">core</span>.<span style="color: #006600;">raster</span>.<span style="color: #006600;">rgb</span>.<span style="color: #006600;">FLARRgbRaster_BitmapData</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">libspark</span>.<span style="color: #006600;">flartoolkit</span>.<span style="color: #006600;">core</span>.<span style="color: #006600;">transmat</span>.<span style="color: #006600;">FLARTransMatResult</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">libspark</span>.<span style="color: #006600;">flartoolkit</span>.<span style="color: #006600;">detector</span>.<span style="color: #006600;">FLARSingleMarkerDetector</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">libspark</span>.<span style="color: #006600;">flartoolkit</span>.<span style="color: #006600;">pv3d</span>.<span style="color: #006600;">FLARBaseNode</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">libspark</span>.<span style="color: #006600;">flartoolkit</span>.<span style="color: #006600;">pv3d</span>.<span style="color: #006600;">FLARCamera3D</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">objects</span>.<span style="color: #006600;">parsers</span>.<span style="color: #006600;">Collada</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">render</span>.<span style="color: #006600;">BasicRenderEngine</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">scenes</span>.<span style="color: #006600;">Scene3D</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">view</span>.<span style="color: #006600;">Viewport3D</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;640&quot;</span>, <span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;480&quot;</span>, frameRate=<span style="color: #ff0000;">&quot;30&quot;</span>, <span style="color: #0066CC;">backgroundColor</span>=<span style="color: #ff0000;">&quot;#FFFFFF&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> augmentedReality <span style="color: #0066CC;">extends</span> Sprite
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span>source=<span style="color: #ff0000;">&quot;pattern.pat&quot;</span>, mimeType=<span style="color: #ff0000;">&quot;application/octet-stream&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> pattern:<span style="color: #000000; font-weight: bold;">Class</span>;
&nbsp;
		<span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span>source=<span style="color: #ff0000;">&quot;camera_para.dat&quot;</span>, mimeType=<span style="color: #ff0000;">&quot;application/octet-stream&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> params:<span style="color: #000000; font-weight: bold;">Class</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> FlarParams:FLARParam;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> FlarCode:FLARCode;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> vid:<span style="color: #0066CC;">Video</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">camera</span>:<span style="color: #0066CC;">Camera</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> FlarCamera:FLARCamera3D;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> bmd:BitmapData;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> FlarRaster:FLARRgbRaster_BitmapData;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> FlarDetector:FLARSingleMarkerDetector;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> container:FLARBaseNode;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> viewPort:Viewport3D;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> scene:Scene3D;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> renderEngine:BasicRenderEngine;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> TransMatResult:FLARTransMatResult;
&nbsp;
            <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> augmentedReality<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			setFLAR<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			setCamera<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			setBitmap<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			setPV3D<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>, loop<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></td></tr></table></div>

<p> In the constructor we have same function that we will have to explain, in the following steps.</p>
<p> We have the <i>setFLAR();</i> function. In this function we will load the camera_para, and the pattern.</p>
<p> In the <i>setCamera();</i> function, we will set the option for the Web Camera.. the resolution, the fps.</p>
<p> Well in the <i>setBitmap();</i> function, we will do a bitmap data for our FLARRgbRaster_BitmapData. And we will draw the bitmap to the video.</p>
<p> And here at the <i>setPV3D();</i> function, we will add the 3d model.</p>
<h3>Private Methods</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
</pre></td><td class="code"><pre class="actionscript actionscript" style="font-family:monospace;">            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> setFLAR<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			FlarParams = <span style="color: #000000; font-weight: bold;">new</span> FLARParam<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			FlarParams.<span style="color: #006600;">loadARParam</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> params<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> as ByteArray<span style="color: #66cc66;">&#41;</span>;
			FlarCode = <span style="color: #000000; font-weight: bold;">new</span> FLARCode<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">16</span>,<span style="color: #cc66cc;">16</span><span style="color: #66cc66;">&#41;</span>;
			FlarCode.<span style="color: #006600;">loadARPatt</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> pattern<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</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> setCamera<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			vid = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Video</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">640</span>,<span style="color: #cc66cc;">480</span><span style="color: #66cc66;">&#41;</span>;
			<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>;
			<span style="color: #0066CC;">camera</span>.<span style="color: #0066CC;">setMode</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">640</span>,<span style="color: #cc66cc;">480</span>,<span style="color: #cc66cc;">31</span><span style="color: #66cc66;">&#41;</span>;
			vid.<span style="color: #006600;">attachCamera</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">camera</span><span style="color: #66cc66;">&#41;</span>;
			addChild<span style="color: #66cc66;">&#40;</span>vid<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> setBitmap<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			bmd = <span style="color: #000000; font-weight: bold;">new</span> BitmapData<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">640</span>,<span style="color: #cc66cc;">480</span>,<span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
			bmd.<span style="color: #006600;">draw</span><span style="color: #66cc66;">&#40;</span>vid<span style="color: #66cc66;">&#41;</span>;
			FlarRaster = <span style="color: #000000; font-weight: bold;">new</span> FLARRgbRaster_BitmapData<span style="color: #66cc66;">&#40;</span>bmd<span style="color: #66cc66;">&#41;</span>;
			FlarDetector = <span style="color: #000000; font-weight: bold;">new</span> FLARSingleMarkerDetector<span style="color: #66cc66;">&#40;</span>FlarParams,FlarCode,<span style="color: #cc66cc;">80</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> setPV3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			scene = <span style="color: #000000; font-weight: bold;">new</span> Scene3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			FlarCamera = <span style="color: #000000; font-weight: bold;">new</span> FLARCamera3D<span style="color: #66cc66;">&#40;</span>FlarParams<span style="color: #66cc66;">&#41;</span>;
			container = <span style="color: #000000; font-weight: bold;">new</span> FLARBaseNode<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			scene.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>container<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> obj:Collada = <span style="color: #000000; font-weight: bold;">new</span> Collada<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;tank.dae&quot;</span><span style="color: #66cc66;">&#41;</span>;
			container.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>obj<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			renderEngine = <span style="color: #000000; font-weight: bold;">new</span> BasicRenderEngine<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			TransMatResult = <span style="color: #000000; font-weight: bold;">new</span> FLARTransMatResult<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			FlarCamera.<span style="color: #006600;">z</span> = 0;
&nbsp;
			viewPort = <span style="color: #000000; font-weight: bold;">new</span> Viewport3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			addChild<span style="color: #66cc66;">&#40;</span>viewPort<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			obj.<span style="color: #006600;">rotationY</span> += <span style="color: #cc66cc;">20</span>;
			obj.<span style="color: #006600;">rotationX</span> += <span style="color: #cc66cc;">10</span>;
		<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>Well,for a better understanding about this private methods. I will explain again what deals they have.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="actionscript actionscript" style="font-family:monospace;">            <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> setFLAR<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			FlarParams = <span style="color: #000000; font-weight: bold;">new</span> FLARParam<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			FlarParams.<span style="color: #006600;">loadARParam</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> params<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> as ByteArray<span style="color: #66cc66;">&#41;</span>;
			FlarCode = <span style="color: #000000; font-weight: bold;">new</span> FLARCode<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">16</span>,<span style="color: #cc66cc;">16</span><span style="color: #66cc66;">&#41;</span>;
			FlarCode.<span style="color: #006600;">loadARPatt</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> pattern<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>In <i>setFLAR</i> we have a FlarParams instance, and we load the params in this instance. And because the params are a binary file, we load this params as a ByteArray. And in the FLARCode instance we load the pattern file, and give a resolution, in this case 16&#215;16.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
</pre></td><td class="code"><pre class="actionscript actionscript" style="font-family:monospace;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> setCamera<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			vid = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Video</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">640</span>,<span style="color: #cc66cc;">480</span><span style="color: #66cc66;">&#41;</span>;
			<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>;
			<span style="color: #0066CC;">camera</span>.<span style="color: #0066CC;">setMode</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">640</span>,<span style="color: #cc66cc;">480</span>,<span style="color: #cc66cc;">31</span><span style="color: #66cc66;">&#41;</span>;
			vid.<span style="color: #006600;">attachCamera</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">camera</span><span style="color: #66cc66;">&#41;</span>;
			addChild<span style="color: #66cc66;">&#40;</span>vid<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>The <i>setCamera</i> function set up the option for our camera. Well, I set up the resolution 640&#215;480, but if you have a more performance camera, give a larger resolution. And I think 31 fps is good for all kind of camera. And after that we attach the camera on the Video instance. And of course we addChild the vid(Video).</p>
<p>Well, after you set this part of code, if you run you project, ypu will see, samething like that:</p>
<p><img src="http://flashdesign-store.com/mywork/AR/web.jpg" border="0" /></p>
<p>And if you click <i>Allow</i>, your camera will start.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
</pre></td><td class="code"><pre class="actionscript actionscript" style="font-family:monospace;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> setBitmap<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			bmd = <span style="color: #000000; font-weight: bold;">new</span> BitmapData<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">640</span>,<span style="color: #cc66cc;">480</span>,<span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
			bmd.<span style="color: #006600;">draw</span><span style="color: #66cc66;">&#40;</span>vid<span style="color: #66cc66;">&#41;</span>;
			FlarRaster = <span style="color: #000000; font-weight: bold;">new</span> FLARRgbRaster_BitmapData<span style="color: #66cc66;">&#40;</span>bmd<span style="color: #66cc66;">&#41;</span>;
			FlarDetector = <span style="color: #000000; font-weight: bold;">new</span> FLARSingleMarkerDetector<span style="color: #66cc66;">&#40;</span>FlarParams,FlarCode,<span style="color: #cc66cc;">80</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>Well, now we have the <i>setBitmap</i>, here we create a BitmapData, give the same resolution as the camera. And we &#8220;draw&#8221; the vid that contains all the information about our camera.After that we have the FlarRaster and the FlarDetector. Well the FlarDetector, is a detector, which will see the pattern on the stage&#8230; 80 reprents the marker width.</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
</pre></td><td class="code"><pre class="actionscript actionscript" style="font-family:monospace;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> setPV3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			scene = <span style="color: #000000; font-weight: bold;">new</span> Scene3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			FlarCamera = <span style="color: #000000; font-weight: bold;">new</span> FLARCamera3D<span style="color: #66cc66;">&#40;</span>FlarParams<span style="color: #66cc66;">&#41;</span>;
			container = <span style="color: #000000; font-weight: bold;">new</span> FLARBaseNode<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			scene.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>container<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> obj:Collada = <span style="color: #000000; font-weight: bold;">new</span> Collada<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;tank.dae&quot;</span><span style="color: #66cc66;">&#41;</span>;
			container.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>obj<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			renderEngine = <span style="color: #000000; font-weight: bold;">new</span> BasicRenderEngine<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			TransMatResult = <span style="color: #000000; font-weight: bold;">new</span> FLARTransMatResult<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			FlarCamera.<span style="color: #006600;">z</span> = 0;
&nbsp;
			viewPort = <span style="color: #000000; font-weight: bold;">new</span> Viewport3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			addChild<span style="color: #66cc66;">&#40;</span>viewPort<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			obj.<span style="color: #006600;">rotationY</span> += <span style="color: #cc66cc;">20</span>;
			obj.<span style="color: #006600;">rotationX</span> += <span style="color: #cc66cc;">10</span>;
		<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p> And finaly the <i>setPV3D</i> function. In this function I add the 3d model to the FLARBaseNode.</p>
<h3>Final Code</h3>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
</pre></td><td 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;">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;">events</span>.<span style="color: #006600;">Event</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;">media</span>.<span style="color: #0066CC;">Video</span>;
    <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #006600;">ByteArray</span>;
&nbsp;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">libspark</span>.<span style="color: #006600;">flartoolkit</span>.<span style="color: #006600;">core</span>.<span style="color: #006600;">FLARCode</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">libspark</span>.<span style="color: #006600;">flartoolkit</span>.<span style="color: #006600;">core</span>.<span style="color: #006600;">param</span>.<span style="color: #006600;">FLARParam</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">libspark</span>.<span style="color: #006600;">flartoolkit</span>.<span style="color: #006600;">core</span>.<span style="color: #006600;">raster</span>.<span style="color: #006600;">rgb</span>.<span style="color: #006600;">FLARRgbRaster_BitmapData</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">libspark</span>.<span style="color: #006600;">flartoolkit</span>.<span style="color: #006600;">core</span>.<span style="color: #006600;">transmat</span>.<span style="color: #006600;">FLARTransMatResult</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">libspark</span>.<span style="color: #006600;">flartoolkit</span>.<span style="color: #006600;">detector</span>.<span style="color: #006600;">FLARSingleMarkerDetector</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">libspark</span>.<span style="color: #006600;">flartoolkit</span>.<span style="color: #006600;">pv3d</span>.<span style="color: #006600;">FLARBaseNode</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">libspark</span>.<span style="color: #006600;">flartoolkit</span>.<span style="color: #006600;">pv3d</span>.<span style="color: #006600;">FLARCamera3D</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">objects</span>.<span style="color: #006600;">parsers</span>.<span style="color: #006600;">Collada</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">render</span>.<span style="color: #006600;">BasicRenderEngine</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">scenes</span>.<span style="color: #006600;">Scene3D</span>;
    <span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">view</span>.<span style="color: #006600;">Viewport3D</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;640&quot;</span>, <span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;480&quot;</span>, frameRate=<span style="color: #ff0000;">&quot;30&quot;</span>, <span style="color: #0066CC;">backgroundColor</span>=<span style="color: #ff0000;">&quot;#FFFFFF&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> augmentedReality <span style="color: #0066CC;">extends</span> Sprite
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span>source=<span style="color: #ff0000;">&quot;pattern.pat&quot;</span>, mimeType=<span style="color: #ff0000;">&quot;application/octet-stream&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> pattern:<span style="color: #000000; font-weight: bold;">Class</span>;
&nbsp;
		<span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span>source=<span style="color: #ff0000;">&quot;camera_para.dat&quot;</span>, mimeType=<span style="color: #ff0000;">&quot;application/octet-stream&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> params:<span style="color: #000000; font-weight: bold;">Class</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> FlarParams:FLARParam;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> FlarCode:FLARCode;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> vid:<span style="color: #0066CC;">Video</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">camera</span>:<span style="color: #0066CC;">Camera</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> FlarCamera:FLARCamera3D;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> bmd:BitmapData;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> FlarRaster:FLARRgbRaster_BitmapData;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> FlarDetector:FLARSingleMarkerDetector;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> container:FLARBaseNode;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> viewPort:Viewport3D;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> scene:Scene3D;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> renderEngine:BasicRenderEngine;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> TransMatResult:FLARTransMatResult;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> augmentedReality<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			setFLAR<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			setCamera<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			setBitmap<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			setPV3D<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>, loop<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> setFLAR<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			FlarParams = <span style="color: #000000; font-weight: bold;">new</span> FLARParam<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			FlarParams.<span style="color: #006600;">loadARParam</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> params<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> as ByteArray<span style="color: #66cc66;">&#41;</span>;
			FlarCode = <span style="color: #000000; font-weight: bold;">new</span> FLARCode<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">16</span>,<span style="color: #cc66cc;">16</span><span style="color: #66cc66;">&#41;</span>;
			FlarCode.<span style="color: #006600;">loadARPatt</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> pattern<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</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> setCamera<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			vid = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Video</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">640</span>,<span style="color: #cc66cc;">480</span><span style="color: #66cc66;">&#41;</span>;
			<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>;
			<span style="color: #0066CC;">camera</span>.<span style="color: #0066CC;">setMode</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">640</span>,<span style="color: #cc66cc;">480</span>,<span style="color: #cc66cc;">31</span><span style="color: #66cc66;">&#41;</span>;
			vid.<span style="color: #006600;">attachCamera</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">camera</span><span style="color: #66cc66;">&#41;</span>;
			addChild<span style="color: #66cc66;">&#40;</span>vid<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> setBitmap<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			bmd = <span style="color: #000000; font-weight: bold;">new</span> BitmapData<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">640</span>,<span style="color: #cc66cc;">480</span>,<span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
			bmd.<span style="color: #006600;">draw</span><span style="color: #66cc66;">&#40;</span>vid<span style="color: #66cc66;">&#41;</span>;
			FlarRaster = <span style="color: #000000; font-weight: bold;">new</span> FLARRgbRaster_BitmapData<span style="color: #66cc66;">&#40;</span>bmd<span style="color: #66cc66;">&#41;</span>;
			FlarDetector = <span style="color: #000000; font-weight: bold;">new</span> FLARSingleMarkerDetector<span style="color: #66cc66;">&#40;</span>FlarParams,FlarCode,<span style="color: #cc66cc;">80</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> setPV3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			scene = <span style="color: #000000; font-weight: bold;">new</span> Scene3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			FlarCamera = <span style="color: #000000; font-weight: bold;">new</span> FLARCamera3D<span style="color: #66cc66;">&#40;</span>FlarParams<span style="color: #66cc66;">&#41;</span>;
			container = <span style="color: #000000; font-weight: bold;">new</span> FLARBaseNode<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			scene.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>container<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> obj:Collada = <span style="color: #000000; font-weight: bold;">new</span> Collada<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;tank.dae&quot;</span><span style="color: #66cc66;">&#41;</span>;
			container.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>obj<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			renderEngine = <span style="color: #000000; font-weight: bold;">new</span> BasicRenderEngine<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			TransMatResult = <span style="color: #000000; font-weight: bold;">new</span> FLARTransMatResult<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			FlarCamera.<span style="color: #006600;">z</span> = 0;
&nbsp;
			viewPort = <span style="color: #000000; font-weight: bold;">new</span> Viewport3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			addChild<span style="color: #66cc66;">&#40;</span>viewPort<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			obj.<span style="color: #006600;">rotationY</span> += <span style="color: #cc66cc;">20</span>;
			obj.<span style="color: #006600;">rotationX</span> += <span style="color: #cc66cc;">10</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> loop<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>
			bmd.<span style="color: #006600;">draw</span><span style="color: #66cc66;">&#40;</span>vid<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #0066CC;">try</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>FlarDetector.<span style="color: #006600;">detectMarkerLite</span><span style="color: #66cc66;">&#40;</span>FlarRaster, <span style="color: #cc66cc;">80</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&amp;</span><span style="color: #808080; font-style: italic;">#038;&amp;#038; FlarDetector.getConfidence() &gt; 0.5)</span>
				<span style="color: #66cc66;">&#123;</span>
					FlarDetector.<span style="color: #006600;">getTransformMatrix</span><span style="color: #66cc66;">&#40;</span>TransMatResult<span style="color: #66cc66;">&#41;</span>;
					container.<span style="color: #006600;">setTransformMatrix</span><span style="color: #66cc66;">&#40;</span>TransMatResult<span style="color: #66cc66;">&#41;</span>;
					renderEngine.<span style="color: #006600;">renderScene</span><span style="color: #66cc66;">&#40;</span>scene, FlarCamera, viewPort<span style="color: #66cc66;">&#41;</span>;
				<span style="color: #66cc66;">&#125;</span>
			<span style="color: #66cc66;">&#125;</span>
&nbsp;
			<span style="color: #0066CC;">catch</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:<span style="color: #0066CC;">Error</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>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>And the final result must be something like that,my 3d model is a thank, and look how he is:</p>
<p><img src = "http://flashdesign-store.com/mywork/AR/result.jpg" border = "0"/></p>
<p> That was the Augmented Reality tutorial.</p>
<p>Cya next time</p>
<p></BODY></p>
<p></HTML></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flashdesign-store.com/?feed=rss2&amp;p=226</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>A new blog</title>
		<link>http://blog.flashdesign-store.com/?p=229</link>
		<comments>http://blog.flashdesign-store.com/?p=229#comments</comments>
		<pubDate>Mon, 16 Nov 2009 18:43:03 +0000</pubDate>
		<dc:creator>Horatiu Condrea</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>

		<guid isPermaLink="false">http://blog.flashdesign-store.com/?p=229</guid>
		<description><![CDATA[Well, today I start a new blog. This is a blog in Romanian, who is interested in my opinion, can access my other blog here: http://misk.flashdesign-store.com/. So&#8230; have a good time reading my blogs.]]></description>
			<content:encoded><![CDATA[<p>Well, today I start a new blog. This is a blog in Romanian, who is interested in my opinion, can access my other blog here: <a href="http://misk.flashdesign-store.com/">http://misk.flashdesign-store.com/</a>. So&#8230; have a good time reading my blogs.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flashdesign-store.com/?feed=rss2&amp;p=229</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Accessing the contents of a folder</title>
		<link>http://blog.flashdesign-store.com/?p=213</link>
		<comments>http://blog.flashdesign-store.com/?p=213#comments</comments>
		<pubDate>Mon, 05 Oct 2009 17:10:57 +0000</pubDate>
		<dc:creator>Horatiu Condrea</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[accessing]]></category>
		<category><![CDATA[content]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[folder]]></category>

		<guid isPermaLink="false">http://blog.flashdesign-store.com/?p=213</guid>
		<description><![CDATA[AIR allows you to obtain a list of files and folders in a particular folder. This can be very useful if, for example, you want to create an application to load and display all images in a given folder. For each file and folder, you can also access detailed information such as the size, the [...]]]></description>
			<content:encoded><![CDATA[<p>AIR allows you to obtain a list of files and folders in a particular folder. This can be very useful if, for example, you want to create an application to load and display all images in a given folder. For each file and folder, you can also access detailed information such as the size, the extension (if it’s a file), the remaining disk room, the creation date, and so on.To access the list of files and documents in a folder, you have to use the getDirectoryListing() function provided by the File class. This method returns a list of File objects contained in the relevant folder.</p>
<p>In this exemple I will use a &#8220;DataGrid&#8221; to be easy to see what we have in the folder, a &#8220;TextArea&#8221; to see the location of the folder, and of course a button. Well, this is code:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
</pre></td><td class="code"><pre class="actionscript actionscript" style="font-family:monospace;">package 
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> fl.<span style="color: #006600;">controls</span>.<span style="color: #0066CC;">Button</span>;
	<span style="color: #0066CC;">import</span> fl.<span style="color: #006600;">controls</span>.<span style="color: #006600;">DataGrid</span>;
	<span style="color: #0066CC;">import</span> fl.<span style="color: #006600;">controls</span>.<span style="color: #006600;">TextArea</span>;
	<span style="color: #0066CC;">import</span> fl.<span style="color: #006600;">controls</span>.<span style="color: #006600;">dataGridClasses</span>.<span style="color: #006600;">DataGridColumn</span>;
	<span style="color: #0066CC;">import</span> fl.<span style="color: #0066CC;">data</span>.<span style="color: #006600;">DataProvider</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;">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: #006600;">filesystem</span>.<span style="color: #006600;">File</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Main <span style="color: #0066CC;">extends</span> <span style="color: #0066CC;">MovieClip</span>
	<span style="color: #66cc66;">&#123;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> choose:<span style="color: #0066CC;">Button</span>;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> output:TextArea;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> directoryList:DataGrid;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> folder:File;
&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: #0066CC;">super</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			choose.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span> MouseEvent.<span style="color: #006600;">CLICK</span>, showDirectorySelection <span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> col1:DataGridColumn = <span style="color: #000000; font-weight: bold;">new</span> DataGridColumn<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> col2:DataGridColumn = <span style="color: #000000; font-weight: bold;">new</span> DataGridColumn<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> col3:DataGridColumn = <span style="color: #000000; font-weight: bold;">new</span> DataGridColumn<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> col4:DataGridColumn = <span style="color: #000000; font-weight: bold;">new</span> DataGridColumn<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			col1.<span style="color: #006600;">headerText</span> = <span style="color: #ff0000;">&quot;File name&quot;</span>;
			col1.<span style="color: #006600;">dataField</span> = <span style="color: #ff0000;">&quot;name&quot;</span>;
			directoryList.<span style="color: #006600;">addColumn</span><span style="color: #66cc66;">&#40;</span> col1 <span style="color: #66cc66;">&#41;</span>;
&nbsp;
			col2.<span style="color: #006600;">headerText</span> = <span style="color: #ff0000;">&quot;File size&quot;</span>;
			col2.<span style="color: #006600;">dataField</span> = <span style="color: #ff0000;">&quot;size&quot;</span>;
			directoryList.<span style="color: #006600;">addColumn</span><span style="color: #66cc66;">&#40;</span> col2 <span style="color: #66cc66;">&#41;</span>;
&nbsp;
			col3.<span style="color: #006600;">headerText</span> = <span style="color: #ff0000;">&quot;File extension&quot;</span>;
			col3.<span style="color: #006600;">dataField</span> = <span style="color: #ff0000;">&quot;extension&quot;</span>;
			directoryList.<span style="color: #006600;">addColumn</span><span style="color: #66cc66;">&#40;</span> col3 <span style="color: #66cc66;">&#41;</span>;
&nbsp;
			col4.<span style="color: #006600;">headerText</span> = <span style="color: #ff0000;">&quot;Creation date&quot;</span>;
			col4.<span style="color: #006600;">dataField</span> = <span style="color: #ff0000;">&quot;creationDate&quot;</span>;
			directoryList.<span style="color: #006600;">addColumn</span><span style="color: #66cc66;">&#40;</span> col4 <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> showDirectorySelection<span style="color: #66cc66;">&#40;</span> event:MouseEvent <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			folder = <span style="color: #000000; font-weight: bold;">new</span> File<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			folder.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">SELECT</span>, directorySelected <span style="color: #66cc66;">&#41;</span>;
			folder.<span style="color: #006600;">browseForDirectory</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Choose a directory on your system&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> directorySelected<span style="color: #66cc66;">&#40;</span> event:Event <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
&nbsp;
			output.<span style="color: #006600;">appendText</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Selected folder: &quot;</span>+folder.<span style="color: #006600;">nativePath</span>+<span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> directoryContents:<span style="color: #0066CC;">Array</span> = folder.<span style="color: #006600;">getDirectoryListing</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> dp:DataProvider = <span style="color: #000000; font-weight: bold;">new</span> DataProvider<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> folderNum:<span style="color: #0066CC;">int</span> = -<span style="color: #cc66cc;">1</span>;
			<span style="color: #000000; font-weight: bold;">var</span> item:File;
&nbsp;
			<span style="color: #b1b100;">for</span> each<span style="color: #66cc66;">&#40;</span> item <span style="color: #b1b100;">in</span> directoryContents <span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span> item.<span style="color: #006600;">isDirectory</span> <span style="color: #66cc66;">&#41;</span>
				<span style="color: #66cc66;">&#123;</span>
					folderNum++;
					dp.<span style="color: #006600;">addItemAt</span><span style="color: #66cc66;">&#40;</span> item, folderNum <span style="color: #66cc66;">&#41;</span>;
				<span style="color: #66cc66;">&#125;</span>
&nbsp;
				<span style="color: #b1b100;">else</span>
				<span style="color: #66cc66;">&#123;</span>
					dp.<span style="color: #006600;">addItem</span><span style="color: #66cc66;">&#40;</span> item <span style="color: #66cc66;">&#41;</span>;
				<span style="color: #66cc66;">&#125;</span>
			<span style="color: #66cc66;">&#125;</span>
&nbsp;
		directoryList.<span style="color: #006600;">dataProvider</span> = dp;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span> 
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>And you can download the final AIR file by here: <a href="http://www.flashdesign-store.com/mywork/Browse/index.air">Accessing the contents of a folder</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flashdesign-store.com/?feed=rss2&amp;p=213</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>AS 3.0 Stage Align</title>
		<link>http://blog.flashdesign-store.com/?p=209</link>
		<comments>http://blog.flashdesign-store.com/?p=209#comments</comments>
		<pubDate>Wed, 26 Aug 2009 13:03:19 +0000</pubDate>
		<dc:creator>Horatiu Condrea</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[align]]></category>
		<category><![CDATA[AS 3.0]]></category>
		<category><![CDATA[buy]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[little]]></category>
		<category><![CDATA[sel]]></category>
		<category><![CDATA[stage]]></category>
		<category><![CDATA[tween]]></category>

		<guid isPermaLink="false">http://blog.flashdesign-store.com/?p=209</guid>
		<description><![CDATA[Just a simple AS 3.0 Stage Align with Tween Little. Here you can see the component:http://www.flashcomponents.net/component/as_3.0_stage_align.html And if you find this component useful for you, buy it. Here you can see the swf file: 
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_index_455566041"
			class="flashmovie"
			width="550"
			height="400">
	<param name="movie" value="http://www.flashdesign-store.com/mywork/Stage%20Align/index.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashdesign-store.com/mywork/Stage%20Align/index.swf"
			name="fm_index_455566041"
			width="550"
			height="400">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>]]></description>
			<content:encoded><![CDATA[<p>Just a simple AS 3.0 Stage Align with Tween Little. Here you can see the component:<a href="http://www.flashcomponents.net/component/as_3.0_stage_align.html">http://www.flashcomponents.net/component/as_3.0_stage_align.html</a><br />
And if you find this component useful for you, buy it.</p>
<p>Here you can see the swf file:<br />

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_index_990637416"
			class="flashmovie"
			width="550"
			height="400">
	<param name="movie" value="http://www.flashdesign-store.com/mywork/Stage%20Align/index.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashdesign-store.com/mywork/Stage%20Align/index.swf"
			name="fm_index_990637416"
			width="550"
			height="400">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
]]></content:encoded>
			<wfw:commentRss>http://blog.flashdesign-store.com/?feed=rss2&amp;p=209</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Simple 3D Carousel AS 3.0</title>
		<link>http://blog.flashdesign-store.com/?p=204</link>
		<comments>http://blog.flashdesign-store.com/?p=204#comments</comments>
		<pubDate>Fri, 14 Aug 2009 15:38:54 +0000</pubDate>
		<dc:creator>Horatiu Condrea</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[3d]]></category>
		<category><![CDATA[AS 3.0]]></category>
		<category><![CDATA[buy]]></category>
		<category><![CDATA[Carousel]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[sell]]></category>
		<category><![CDATA[simple]]></category>

		<guid isPermaLink="false">http://blog.flashdesign-store.com/?p=204</guid>
		<description><![CDATA[As the title says, this is a simple 3D Carousel AS 3.0. XML driven images, easy to implement in your Flash projects. You can buy or see the demo here: http://www.flashcomponents.net/component/simple_3d_carousel_as_3.0.html I do not want to come up with accurate descriptions, If you like it, buy it. Cya, next time.]]></description>
			<content:encoded><![CDATA[<p>As the title says, this is a simple 3D Carousel AS 3.0. XML driven images, easy to implement in your Flash projects. You can buy or see the demo here: <a href="http://www.flashcomponents.net/component/simple_3d_carousel_as_3.0.html">http://www.flashcomponents.net/component/simple_3d_carousel_as_3.0.html</a></p>
<p>I do not want to come up with accurate descriptions, If you like it, buy it.</p>
<p>Cya, next time. </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.flashdesign-store.com/?feed=rss2&amp;p=204</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS 3.0 Simple PreLoader</title>
		<link>http://blog.flashdesign-store.com/?p=199</link>
		<comments>http://blog.flashdesign-store.com/?p=199#comments</comments>
		<pubDate>Tue, 23 Jun 2009 12:58:01 +0000</pubDate>
		<dc:creator>Horatiu Condrea</dc:creator>
				<category><![CDATA[ActionScript 3.0]]></category>
		<category><![CDATA[AS 3.0]]></category>
		<category><![CDATA[buy]]></category>
		<category><![CDATA[components]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[preloader]]></category>
		<category><![CDATA[sell]]></category>

		<guid isPermaLink="false">http://blog.flashdesign-store.com/?p=199</guid>
		<description><![CDATA[Well, because I need to live me too, I make a simple AS 3.0 PreLoader, and it is put on the FlashComponents, if you want to buy click here: Click Here is the demo: 
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_Preloader_913341894"
			class="flashmovie"
			width="550"
			height="400">
	<param name="movie" value="http://www.flashdesign-store.com/mywork/PreLoader/Preloader.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashdesign-store.com/mywork/PreLoader/Preloader.swf"
			name="fm_Preloader_913341894"
			width="550"
			height="400">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>]]></description>
			<content:encoded><![CDATA[<p>Well, because I need to live me too, I make a simple AS 3.0 PreLoader, and it is put on the FlashComponents, if you want to buy  click here: <a href="http://www.flashcomponents.net/component/simple_as_3.0_preloader.html"> Click</p>
<p> Here is the demo:<br />

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
			id="fm_Preloader_1250366444"
			class="flashmovie"
			width="550"
			height="400">
	<param name="movie" value="http://www.flashdesign-store.com/mywork/PreLoader/Preloader.swf" />
	<!--[if !IE]>-->
	<object	type="application/x-shockwave-flash"
			data="http://www.flashdesign-store.com/mywork/PreLoader/Preloader.swf"
			name="fm_Preloader_1250366444"
			width="550"
			height="400">
	<!--<![endif]-->
		
	<!--[if !IE]>-->
	</object>
	<!--<![endif]-->
</object>
]]></content:encoded>
			<wfw:commentRss>http://blog.flashdesign-store.com/?feed=rss2&amp;p=199</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
