<?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>Miguel Moraleda &#187; Papervision3d</title>
	<atom:link href="http://as3.miguelmoraleda.com/category/flash/papervision3d/feed/" rel="self" type="application/rss+xml" />
	<link>http://as3.miguelmoraleda.com</link>
	<description>Unity3D &#38; Actionscript examples, resources, source code, etc</description>
	<lastBuildDate>Fri, 16 Apr 2010 12:55:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Actionscript 3 &#8211; Papervision3D Interactive Collada, DAE objects.</title>
		<link>http://as3.miguelmoraleda.com/2009/03/30/actionscript-3-papervision3d-collada-dae-interactives-objec/</link>
		<comments>http://as3.miguelmoraleda.com/2009/03/30/actionscript-3-papervision3d-collada-dae-interactives-objec/#comments</comments>
		<pubDate>Tue, 31 Mar 2009 00:57:51 +0000</pubDate>
		<dc:creator>miguelMoraleda</dc:creator>
				<category><![CDATA[Papervision3d]]></category>

		<guid isPermaLink="false">http://as3.miguelmoraleda.com/?p=97</guid>
		<description><![CDATA[If you dont know what is a collada object. The Collada files, are 3d models exported to xml format. With Papervision3D we can create the models into our flash. If you need more info you could read the next link Collada Files in wikipedia If you need interactive collada, must meet the following requirements: Thw [...]]]></description>
			<content:encoded><![CDATA[<p>If you dont know what is a collada object. The Collada files, are 3d models exported to xml format. With Papervision3D we can create the models into our flash. If you need more info you could read the next link</p>
<p><a href="http://en.wikipedia.org/wiki/COLLADA">Collada Files in wikipedia</a></p>
<p>If you need interactive collada, must meet the following requirements:</p>
<ul>
<li>Thw viewport must be interactive&#8230;. viewport.interactive = true.</li>
<li>All materials of the DAE object must be interactive also.</li>
<li>You need to add a listener for  the InteractiveScene3DEvent that you want into each child of your collada.</li>
</ul>
<p>Here a example how to set all materials to interactive :</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" style="font-family:monospace;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> setInteractiveMaterials<span style="color: #66cc66;">&#40;</span>targetObject:DisplayObject3D, value:<span style="color: #0066CC;">Boolean</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #b1b100;">for</span> each<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> mat:MaterialObject3D <span style="color: #b1b100;">in</span> _targetObject.<span style="color: #006600;">materials</span>.<span style="color: #006600;">materialsByName</span><span style="color: #66cc66;">&#41;</span>
	<span style="color: #66cc66;">&#123;</span>
		mat.<span style="color: #006600;">interactive</span> = value;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>How to put a eventListener into each child.</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" style="font-family:monospace;"><span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> addEventListeners<span style="color: #66cc66;">&#40;</span>displayObject:DisplayObject3D, eventType:<span style="color: #0066CC;">String</span>, listener:<span style="color: #000000; font-weight: bold;">Function</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
	displayObject.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>eventType, listener<span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<span style="color: #b1b100;">for</span> each<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> child:DisplayObject3D <span style="color: #b1b100;">in</span> displayObject.<span style="color: #006600;">children</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		addEventListeners<span style="color: #66cc66;">&#40;</span>child, eventType, listener<span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></td></tr></table></div>

<p>The call of the last function will be this:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;">addEventListeners<span style="color: #66cc66;">&#40;</span>_obj, InteractiveScene3DEvent.<span style="color: #006600;">OBJECT_PRESS</span>, daePressedHandler<span style="color: #66cc66;">&#41;</span>;</pre></td></tr></table></div>

<p>I&#8217;m not sure if this way is the better. If you have some idea or suggest please post your comments.</p>
<p><a href="http://www.miguelmoraleda.com/examples/interactiveDae">VIEW EXAMPLE</a><br />
<a href="http://www.miguelmoraleda.com/examples/interactiveDae.rar">DOWNLOAD EXAMPLE FOR CS4</a><br />
<a href="http://www.miguelmoraleda.com/examples/daeInteractive.rar">DOWNLOAD EXAMPLE FOR CS3</a></p>
<p><br><script type="text/javascript"><!--
google_ad_client = "pub-8685425838841676";
google_ad_slot = "6019231894";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<br></p>
]]></content:encoded>
			<wfw:commentRss>http://as3.miguelmoraleda.com/2009/03/30/actionscript-3-papervision3d-collada-dae-interactives-objec/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Actionscript 3 &#8211; WiiFlash for use Wii Control in as3 with Papervision3D, Phidgets ServoMotor</title>
		<link>http://as3.miguelmoraleda.com/2009/03/12/actionscript-3-wiiflash-for-use-wii-control-in-as3-with-papervision3d-phidgets-servomotor-actionscript-3-wiiflash-ejemplo-control-wii-en-as3-y-papervision3d/</link>
		<comments>http://as3.miguelmoraleda.com/2009/03/12/actionscript-3-wiiflash-for-use-wii-control-in-as3-with-papervision3d-phidgets-servomotor-actionscript-3-wiiflash-ejemplo-control-wii-en-as3-y-papervision3d/#comments</comments>
		<pubDate>Thu, 12 Mar 2009 20:19:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Papervision3d]]></category>

		<guid isPermaLink="false">http://as3.miguelmoraleda.com/?p=83</guid>
		<description><![CDATA[www.youtube.com/watch?v=IJCUslNUR2g]]></description>
			<content:encoded><![CDATA[<p><span class="youtube">
<object width="425" height="355">
<param name="movie" value="http://www.youtube.com/v/IJCUslNUR2g&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=0&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0?rel=1" />
<param name="allowFullScreen" value="true" />
<embed wmode="transparent" src="http://www.youtube.com/v/IJCUslNUR2g&amp;color1=d6d6d6&amp;color2=f0f0f0&amp;border=0&amp;fs=1&amp;hl=en&amp;autoplay=0&amp;showinfo=0&amp;iv_load_policy=3&amp;showsearch=0?rel=1" type="application/x-shockwave-flash" allowfullscreen="true" width="425" height="355"></embed>
<param name="wmode" value="transparent" />
</object>
</span><p><a href="http://www.youtube.com/watch?v=IJCUslNUR2g">www.youtube.com/watch?v=IJCUslNUR2g</a></p></p>
]]></content:encoded>
			<wfw:commentRss>http://as3.miguelmoraleda.com/2009/03/12/actionscript-3-wiiflash-for-use-wii-control-in-as3-with-papervision3d-phidgets-servomotor-actionscript-3-wiiflash-ejemplo-control-wii-en-as3-y-papervision3d/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Tutorial Papervision3D &#8211; Load Collada DAE example source</title>
		<link>http://as3.miguelmoraleda.com/2009/03/08/tutorial-papervision3d-load-collada-model-dae-example-sourc/</link>
		<comments>http://as3.miguelmoraleda.com/2009/03/08/tutorial-papervision3d-load-collada-model-dae-example-sourc/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 08:20:15 +0000</pubDate>
		<dc:creator>miguelMoraleda</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Papervision3d]]></category>

		<guid isPermaLink="false">http://as3.miguelmoraleda.com/?p=31</guid>
		<description><![CDATA[VIEW EXAMPLE DOWNLOAD EXAMPLE 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 package &#123; import flash.events.Event; import org.papervision3d.materials.utils.MaterialsList; import org.papervision3d.materials.WireframeMaterial; import [...]]]></description>
			<content:encoded><![CDATA[<p><img src="http://as4.miguelmoraleda.com/wp-content/uploads/2009/03/collada.jpg" alt="collada" title="collada" width="405" height="332" class="alignnone size-full wp-image-32" /></p>
<p><a href="http://www.miguelmoraleda.com/examples/dae/">VIEW EXAMPLE</a></p>
<p><a href="http://www.miguelmoraleda.com/examples/dae.rar">DOWNLOAD EXAMPLE</a></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
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;">package
<span style="color: #66cc66;">&#123;</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> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">materials</span>.<span style="color: #006600;">utils</span>.<span style="color: #006600;">MaterialsList</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">materials</span>.<span style="color: #006600;">WireframeMaterial</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;">DAE</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">objects</span>.<span style="color: #006600;">DisplayObject3D</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">view</span>.<span style="color: #006600;">BasicView</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> BasicView
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _obj:DAE;
&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: #cc66cc;">0</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			createObject<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			_camera.<span style="color: #006600;">zoom</span> = <span style="color: #cc66cc;">1000</span> <span style="color: #66cc66;">/</span> _camera.<span style="color: #006600;">focus</span> + <span style="color: #cc66cc;">1</span>;
			<span style="color: #000000; font-weight: bold;">var</span> cameraTarget:DisplayObject3D = <span style="color: #000000; font-weight: bold;">new</span> DisplayObject3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			_camera.<span style="color: #0066CC;">target</span> = cameraTarget;
&nbsp;
			startRendering<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> createObject<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			_obj = <span style="color: #000000; font-weight: bold;">new</span> DAE<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #ff0000;">&quot;objeto&quot;</span><span style="color: #66cc66;">&#41;</span>;
			_obj.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;soccer.DAE&quot;</span><span style="color: #66cc66;">&#41;</span>;
			scene.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>_obj<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		override protected <span style="color: #000000; font-weight: bold;">function</span> onRenderTick<span style="color: #66cc66;">&#40;</span>event:Event = <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			_obj.<span style="color: #006600;">roll</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #0066CC;">super</span>.<span style="color: #006600;">onRenderTick</span><span style="color: #66cc66;">&#40;</span>event<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><br><script type="text/javascript"><!--
google_ad_client = "pub-8685425838841676";
google_ad_slot = "6019231894";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<br></p>
]]></content:encoded>
			<wfw:commentRss>http://as3.miguelmoraleda.com/2009/03/08/tutorial-papervision3d-load-collada-model-dae-example-sourc/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Tutorial Papervision3D &#8211; Lights, light examples source code</title>
		<link>http://as3.miguelmoraleda.com/2009/03/07/tutorial-papervision3d-lights-lights-examples/</link>
		<comments>http://as3.miguelmoraleda.com/2009/03/07/tutorial-papervision3d-lights-lights-examples/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 01:39:15 +0000</pubDate>
		<dc:creator>miguelMoraleda</dc:creator>
				<category><![CDATA[Papervision3d]]></category>

		<guid isPermaLink="false">http://as3.miguelmoraleda.com/?p=15</guid>
		<description><![CDATA[VIEW EXAMPLE DOWNLOAD EXAMPLE In papervision3D, we can find different types of materials that work with a light: FlatShadeMaterial, GouraudMaterial, PhongMaterial, and others. Here a sample illuminated material, the FlatShadeMaterial.]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-16" title="papervision3d-light" src="http://as4.miguelmoraleda.com/wp-content/uploads/2009/03/papervision3d-light.jpg" alt="papervision3d-light" width="320" height="293" /></p>
<div id="result_box" dir="ltr"><a href="http://www.miguelmoraleda.com/examples/luces">VIEW EXAMPLE</a><br />
<a href="http://www.miguelmoraleda.com/examples/luces.rar">DOWNLOAD EXAMPLE</a><br />
In papervision3D, we can find different types of materials that work with a light: FlatShadeMaterial, GouraudMaterial, PhongMaterial, and others. Here a sample illuminated material, the FlatShadeMaterial.</div>
<p><br><script type="text/javascript"><!--
google_ad_client = "pub-8685425838841676";
google_ad_slot = "4368654980";
google_ad_width = 200;
google_ad_height = 90;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</p>
]]></content:encoded>
			<wfw:commentRss>http://as3.miguelmoraleda.com/2009/03/07/tutorial-papervision3d-lights-lights-examples/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>flash actionscript 3 AS3DMod flag or cloth effect, changing objects</title>
		<link>http://as3.miguelmoraleda.com/2009/03/07/flash-actionscript-3-as3dmod-flag-effect-modify-objects/</link>
		<comments>http://as3.miguelmoraleda.com/2009/03/07/flash-actionscript-3-as3dmod-flag-effect-modify-objects/#comments</comments>
		<pubDate>Sat, 07 Mar 2009 23:56:24 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Actionscript 3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Papervision3d]]></category>
		<category><![CDATA[As3DMod]]></category>

		<guid isPermaLink="false">http://as3.miguelmoraleda.com/?p=5</guid>
		<description><![CDATA[Here another important library, AS3DMod is a library for modifying 3D objects. Its main features are: Current version 0.2. Features include: VER EJEMPLO DESCARGAR EJEMPLO 1. 7 modifiers as listed above 2. a framework for creating static and animated modifier stacks 3. 4 plug-ins for the most popular 3d engines: Pv3d, Away3d, Sandy3d and Alternativa3d [...]]]></description>
			<content:encoded><![CDATA[<p><img class="alignnone size-full wp-image-8" title="bandera-chile-320x320" src="http://as4.miguelmoraleda.com/wp-content/uploads/2009/03/fit-320x320.jpg" alt="bandera-chile-320x320" width="320" height="272" /> <img class="alignnone size-full wp-image-9" title="as3dmod-320x320" src="http://as4.miguelmoraleda.com/wp-content/uploads/2009/03/fit-320x320.gif" alt="as3dmod-320x320" width="293" height="123" /></p>
<p>Here another important library, AS3DMod is a library for modifying 3D objects. Its main features are:<br />
Current version 0.2. Features include:</p>
<p><a href="http://www.miguelmoraleda.com/examples/as3dmod/">VER EJEMPLO</a><br />
<a href="http://www.miguelmoraleda.com/examples/ejemploas3dmod.rar">DESCARGAR EJEMPLO</a></p>
<p>1. 7 modifiers as listed above<br />
2. a framework for creating static and animated modifier stacks<br />
3. 4 plug-ins for the most popular 3d engines: Pv3d, Away3d, Sandy3d and Alternativa3d<br />
4. a simple demo for each engine</p>
<p>The project site is in <a title="http://code.google.com/p/as3dmod/" href="http://code.google.com/p/as3dmod/" target="_blank">http://code.google.com/p/as3dmod/</a> there you can download and find more examples.</p>
<p><br><script type="text/javascript"><!--
google_ad_client = "pub-8685425838841676";
google_ad_slot = "6019231894";
google_ad_width = 468;
google_ad_height = 60;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
<br></p>
]]></content:encoded>
			<wfw:commentRss>http://as3.miguelmoraleda.com/2009/03/07/flash-actionscript-3-as3dmod-flag-effect-modify-objects/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
