Switching between stagevideo and Away3D stage without issues?

Software: Away3D 4.x

Sean72, Newbie
Posted: 17 March 2014 10:23 PM   Total Posts: 28

I’ve got an iOS app that loads and displays swfs.  One of those contains a netstream / stagevideo object and the other an Away3D scene.  I don’t need them to run together, just not block each other.  If I run Away3D first, the stagevideo runs fine.  But once I run the stagevideo swf, Away3D either shows only black (if I close the netstream) or shows some sort of artifacts, perhaps left over from the stagevideo size.

Can you suggest how to clean up and/or give the stage3D back to Away3D programmatically?

   

Avatar
mrpinc, Sr. Member
Posted: 17 March 2014 11:32 PM   Total Posts: 119   [ # 1 ]

I’ve had similar issues.  Try settings your stageVideo viewport to be an offscreen rectangle before you dispose of it or any netstream that is attached.

   

Beek, Member
Posted: 21 March 2014 12:42 AM   Total Posts: 67   [ # 2 ]

I’ve got a similar issue where Away3d get’s killed as soon as the StageVideo starts (screen goes black, video plays, but afterwards, away3d is black). Did you get anywhere with this? Or can I dispose Stage3d while the video is playing, and then start it again when the video stops?

   

Beek, Member
Posted: 24 March 2014 04:31 AM   Total Posts: 67   [ # 3 ]

Apparently this is a ‘feature’ and

When using Stage3D, the user must call Context3D.present() to make the stage layer update. There is no independant update of the Stage, Context3D.present() drives the update of both the Stage and the Stage3D layers. This is necessary to achieve high performance. Workarounds include making all the Stage3D invisible and delaying the Context3D creation until you are going to start using it.”

https://bugbase.adobe.com/index.cfm?event=bug&id=3186454

Does anyone know how to implement this using Away3d?

EDIT

I seem to have the Context3D being called with

  var Stage3dManagerInstance:Stage3DManager = away3d.core.managers.Stage3DManager.getInstance(stage);
  var Stage3dProxy:Stage3DProxy = Stage3dManagerInstance.getStage3DProxy(0);
  Stage3dProxy.context3D.present();


Interestingly, desktop has 2 stage3DProxies, and mobile only has 1. Could this be something to do with it?

   

Beek, Member
Posted: 25 March 2014 09:48 AM   Total Posts: 67   [ # 4 ]

Got around it by using a native extension

https://github.com/freshplanet/ANE-Video/

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X