I have to disappoint you , adobe has not released yet air version of flash player11
Sent from my iPhone On Jun 3, 2011, at 7:01 PM, Shai <[email protected]> wrote: > I want to create a 3D project that will work on Adobe Air platform. > > I work with Flash Builder, so I can't create an Air application unless > I open a Flex project (can't use ActionScript). > > I wrote the code but I get 2 error messages: > > 1119: Access of possibly undefined property stage3Ds through a > reference with static type flash.display.Stage. > > and one worrning: > 1104: No constructor function was specified for class partition > Traverser. > > > Here is my code for the mxml file of the Flex project, I'd appreciate > if someone can look at it and find what's wrong: > > <?xml version="1.0" encoding="utf-8"?> > <s:WindowedApplication xmlns:fx="http://ns.adobe.com/mxml/2009" > xmlns:s="library://ns.adobe.com/flex/spark" > xmlns:mx="library://ns.adobe.com/flex/mx" > > creationComplete="windowedapplication1_creationCompleteHandler(event)"> > > <fx:Script> > <![CDATA[ > import away3d.containers.View3D; > import away3d.materials.ColorMaterial; > import away3d.primitives.Cube; > > import flash.display.Sprite; > import flash.events.Event; > > import mx.events.FlexEvent; > > //Import system manager > import mx.managers.SystemManager; > > private var view:View3D; > private var cube:Cube; > > protected function > windowedapplication1_creationCompleteHandler(event:FlexEvent):void > { > HelloMoleHill(); > } > > public function HelloMoleHill():void > { > view = new View3D(); > mySprite.addChild(view); > > var material:ColorMaterial = new > ColorMaterial(0xff0000); > cube = new Cube(material); > > view.scene.addChild(cube); > > systemManager.stage.addEventListener(Event.ENTER_FRAME, > onEnterFrame); > > } > private function onEnterFrame(event:Event):void > { > cube.rotationY += 10; > view.render(); > } > > > ]]> > </fx:Script> > > <fx:Declarations> > <!-- Place non-visual elements (e.g., services, value objects) here > --> > </fx:Declarations> > <s:SpriteVisualElement id = "mySprite" > > > </s:SpriteVisualElement> > </s:WindowedApplication> > >
