Papervision3D in MXML

Wednesday, March 18th, 2009 | snippets

This falls under the “just because I can” category :)

Just copy and paste this code into any Flex project with the Papervision3D.swc in the libs and you’re good to go!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
<?xml version="1.0" encoding="utf-8"?>
<view:BasicView 
	xmlns:mx="http://www.adobe.com/2006/mxml" 
	xmlns:view="org.papervision3d.view.*" 
	xmlns:scenes="org.papervision3d.scenes.*" 
	xmlns:primitives="org.papervision3d.objects.primitives.*" 
	xmlns:materials="org.papervision3d.materials.*" 
	opaqueBackground="#ffffff"
	added="startRendering();"
	>
	<view:scene>
		<scenes:Scene3D>
			<scenes:objects>
				<primitives:Sphere x="300">
					<primitives:material>
						<materials:ColorMaterial fillColor="0xcc0000"/>
					</primitives:material>
				</primitives:Sphere>
			</scenes:objects>
		</scenes:Scene3D>
	</view:scene>
</view:BasicView>

Tags: ,

  • That is pretty sweet! still new to Flex but that seems really useful for setting up scenes. Thanks!

  • nordlicht

    Could you maybe give a more detailed example ?
    i'm a newbie in flex/pvision3d :)

    do i need a Container?

    thx in advance

  • zszen

    it is so cool. but need more teach. lol

blog comments powered by Disqus

Search

Recommended Books

Speaking at FITC Toronto

 

March 2009
M T W T F S S
« Feb   Apr »
 1
2345678
9101112131415
16171819202122
23242526272829
3031  

Preferred Video Tutorial Resolution

  • 1024x768 (53%, 85 Votes)
  • 1280x1024 (15%, 24 Votes)
  • 1920x1080 (15%, 24 Votes)
  • 800x600 (13%, 20 Votes)
  • 480x320 (4%, 6 Votes)
  • 640x480 (0%, 2 Votes)

Total Voters: 160

Loading ... Loading ...