Skip to main content
Participant
August 17, 2012
Question

Stage3d On Android

  • August 17, 2012
  • 1 reply
  • 871 views

Hi all

Note:

To keep things simple .. I am just using the example from "http://www.adobe.com/devnet/flashplayer/articles/hello-triangle.html"

myText.text = "Preloading"

try

{

   stage.stage3Ds[0].addEventListener( Event.CONTEXT3D_CREATE, initMolehill );

   stage.stage3Ds[0].requestContext3D();

   myText.text = "requestContext3D"

   addEventListener(Event.ENTER_FRAME, onRender);

}

catch(err:Error)

{

  myText.appendText("\n ERROR" + err.message)

   

}

addChild(myText);


-----------------------

protected function initMolehill(e:Event):void

{

  myText.text = "initMolehill"

  context3D = stage.stage3Ds[0].context3D;  

  context3D.configureBackBuffer(800, 600, 1, true);

  .......

When I run the sample on a desktop everything seems fine .... but when i install it on an Android Virtual Machine (4.0 and 4.1)

I cannot seem to get the Context3d_Create Event .

when i print out the stage.stage3Ds[0].lenght .... i do get 1

I also made sure that i had the follwoing setting in my xml file ,( I am using Flash builder 4.6 )

<renderMode>direct</renderMode>

<depthAndStencil>true</depthAndStencil>

AND under android

<colorDepth>16bit</colorDepth>

</android>


  

I am completly lost now, any help or pointers would be greatly appreciated

Do let me know if any additional information is required , that i missed

This topic has been closed for replies.

1 reply

zeroCoreAuthor
Participant
August 17, 2012

FYI, the error I get is error #3702

by adding in

 

stage.stage3Ds[0].addEventListener( ErrorEvent.ERROR, initMolehill2 );