Away3D 4.0 and Stage3D in an MXML file?

Software: Away3D 4.x

MarkeMark, Newbie
Posted: 06 October 2011 03:38 PM   Total Posts: 2

HI,

Is it possible to add Away3D 4.0 with Stage3D acceleration to an MXML file? I have tried everything I could think of but I see nothing on screen.

Is it because the Stage3D is hidden by the Flash Stage?

Cheers,

Mark   smile

   

Avatar
80prozent, Sr. Member
Posted: 06 October 2011 04:01 PM   Total Posts: 430   [ # 1 ]

hi

yes, it is possible, and yes the stage3d is hidden by the FlashStage.
you have to set your backgroundAlpha to 0 to see the stage3d.

yourFlexComponent.setStyle(“backgroundAlpha”,0)

hope that helps

 

 Signature 

sorry…i hope my actionscript is better than my english…

   

MarkeMark, Newbie
Posted: 06 October 2011 04:30 PM   Total Posts: 2   [ # 2 ]

Wow, brilliant! Thank you sooooo much.
That took up most of my day yesterday and Google wasn’t helping me much.

I do like a one line fix. Thanks again.

 

   

Zerone, Newbie
Posted: 12 October 2011 12:53 AM   Total Posts: 22   [ # 3 ]

Hi, I have a same problem for display 3D view in mxml.
my problem is display 3D stuff in popup window, and I have set backgroundAlpha=“0” for both Application and the popup window.

It is displaying the 3D stuff, but when I close the popup window, then there is a cache 3D image in the background, please see my attachment.

is there any way to clean it?

Application

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
      
xmlns:s="library://ns.adobe.com/flex/spark"
      
xmlns:mx="library://ns.adobe.com/flex/mx"
      
xmlns:local="*"
      
minWidth="955" minHeight="600" backgroundAlpha="0">

 <
fx:Script>
  <!
[CDATA[
   import mx
.managers.PopUpManager;
   private function 
openPopupWindow():void
   {
    
var window:popupWindow PopUpManager.createPopUp(thispopupWindow) as popupWindow;
    
PopUpManager.centerPopUp(window);
   
}
  ]]
>
 </
fx:Script>

 <
mx:Button label="Open Widnow" click="openPopupWindow()" />
 
</
mx:Application

Popup Window

<?xml version="1.0" encoding="utf-8"?>
<mx:TitleWindow xmlns:fx="http://ns.adobe.com/mxml/2009" 
    
xmlns:s="library://ns.adobe.com/flex/spark" 
    
xmlns:mx="library://ns.adobe.com/flex/mx"
    
xmlns:local="*"
    
title="Popup Window" backgroundAlpha="0" 
    
layout="vertical" width="1024" height="768"
    
showCloseButton="true" close="PopUpManager.removePopUp(this)">
 <
fx:Script>
  <!
[CDATA[
   import mx
.managers.PopUpManager;
  
]]>
 </
fx:Script>

 <!-- 
3D Viewer -->
 <
local:Viewer width="100%" height="100%" />
 
</
mx:TitleWindow

 

 

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X