Inicio > Flash, Papervision3d > Tutorial Papervision3D – Load Collada DAE example source

Tutorial Papervision3D – Load Collada DAE example source

collada

VER EJEMPPLO

DESCARGAR EJEMPLO

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
{
	import flash.events.Event;
	import org.papervision3d.materials.utils.MaterialsList;
	import org.papervision3d.materials.WireframeMaterial;
	import org.papervision3d.objects.parsers.DAE;
	import org.papervision3d.objects.DisplayObject3D;
	import org.papervision3d.view.BasicView;
	import flash.display.Sprite;
 
	public class Main extends BasicView
	{
		private var _obj:DAE;
 
		public function Main()
		{
			super(0, 0, true);
 
			createObject();
 
			_camera.zoom = 1000 / _camera.focus + 1;
			var cameraTarget:DisplayObject3D = new DisplayObject3D();
			_camera.target = cameraTarget;
 
			startRendering();
		}
 
		private function createObject():void
		{
			_obj = new DAE(false, "objeto");
			_obj.load("soccer.DAE");
			scene.addChild(_obj);
		}
 
		override protected function onRenderTick(event:Event = null):void
		{
			_obj.roll(1);
 
			super.onRenderTick(event);
		}
	}
}



Categories: Flash, Papervision3d Tags:
  1. Junaid
    jueves, 1 de abril de 2010 a las 00:52 | #1

    I liked that. I tried something like that too. But i can’t see anything. It is working fine on my desktop offline but when i upload to a webpage it is not loading 3D object. I even downloaded your file and published for html and uploaded it. Still its not showing me the soccer ball. Do you got any clue. How to fix this. In fact it gave me an error

    Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: ../soccer.dae

    Please help me out thank you.

  2. jueves, 1 de abril de 2010 a las 10:10 | #2

    Hi Junaid,

    It looks like the demo can’t find soccer.dae file. Be sure it is on the server in the same folder that the swf file.

  3. Junaid
    domingo, 4 de abril de 2010 a las 01:11 | #3

    Hi there. I have already placed files in the same folder. but still it is not working. ../ is just i am hiding my real link. got any other solution. thanks @miguelMoraleda

  4. darren
    miércoles, 14 de abril de 2010 a las 04:33 | #4

    Hi Junaid,

    You might need to add *.DAE mime type to your server.

  5. Junaid
    jueves, 15 de abril de 2010 a las 01:34 | #5

    Hi Darren,
    I am not sure how to do that. If you can help me out in that. It would be great thanx.
    @darren

*

Spam Protection by WP-SpamFree

Get Adobe Flash playerPlugin by wpburn.com wordpress themes