Can I use away 4.0 with flex 4 project (rawchildren, uicomponent or SpriteVisualElement)?

183 views
Skip to first unread message

originaltomato

unread,
Mar 1, 2011, 11:19:42 AM3/1/11
to away3...@googlegroups.com
does anybody know 

Can I use away 4.0 with flex 4 project (rawchildren, uicomponent or SpriteVisualElement)?

currently I don't see anything in the viewport but awaystats reports 2010/0 polygons

Michael Iv

unread,
Mar 1, 2011, 11:27:20 AM3/1/11
to away3...@googlegroups.com
Molehill Stage3D uses a separate layer which is behind the regular stage.So theoretically you should be able to use it with Flex SDK as it is going to reside behind it .I have not tried it but it seems logical to me.
--
Michael Ivanov ,Programmer
Neurotech Solutions Ltd.
Flex|Air |3D|Unity|
www.neurotechresearch.com
http://blog.alladvanced.net
Tel:054-4962254
mic...@neurotech.co.il
te...@neurotech.co.il

originaltomato

unread,
Mar 1, 2011, 1:44:15 PM3/1/11
to away3...@googlegroups.com
yyeeey tnx, backgroundAlpha="0" showed the viewport

Sharkow

unread,
Mar 27, 2011, 5:08:41 AM3/27/11
to Away3D.dev
Hello. I've tried to create a simple scene with a colored sphere on a
SpriteVisualElement and add it to a BorderContainer.
But as a result I get just a WHITE rectangle. (As I understood, even a
rough scene would have been black).
I've tried to set backgroundAlpha="0" for the application and
backgroundFill=new SolidColor(0,0) for the BorderContainer.

It's my first away3D project and I'm also new to flash, so maybe,
there are just simple mistakes. Look through my code, please.
canvas is my BorderContainer.

away3DCanvas = new SpriteVisualElement();
view = new View3D();
view.x=canvas.width/2;
view.y=canvas.height/2;
view.camera.z=-300;
away3DCanvas.width=view.width=canvas.width;
away3DCanvas.height=view.height=canvas.height;
away3DCanvas.addChild(view);
objectContainer = new ObjectContainer3D();
material = new ColorMaterial(0xe4972a, 0.5)
view.scene.addChild(objectContainer);
objectContainer.addChild(new Sphere(material));
canvas.addElement(away3DCanvas);
view.render();

I've looked through the BasicTemplate.as stored here and there a
Camera3D and a Scene3D are also created. But I get errors on this,
because camera and scene properties of the View3D are read-only. In
the sample-code for broomstick from the away3D site these objects are
not created too.
So, what the problem can be? Thank you.

Sharkow

unread,
Mar 27, 2011, 7:57:36 AM3/27/11
to Away3D.dev
...Also tried to use UIComponent instead of SpriteVisualElement, but
there are no results.
Please, help me, I've looked through several articles and examples but
can't find any significant difference :(

Sharkow

unread,
Mar 27, 2011, 8:34:56 AM3/27/11
to Away3D.dev
http://forums.adobe.com/message/3546912
Oh, that's bad. It seems, in spark you have to set visible="false" for
the application. In fact, for me even this didn't work.
So, it seems a big problem. If anyone knows what to do, please, give
feedback :\

Jon Bradley

unread,
Mar 27, 2011, 9:02:33 AM3/27/11
to away3...@googlegroups.com
Just create a custom skin for the background that's transparent.

Also be sure the rest of your project is set up appropriately with the -swf-version=13 compiler flag (I think?) and the direct gpu mode in the html template file. 

- j

Sharkow

unread,
Mar 27, 2011, 9:12:48 AM3/27/11
to Away3D.dev
You mean, that will be different from setting backgroundAlpha=0 for
the application?

Compiler and gpu are ok :)

rctdeclan

unread,
Mar 27, 2011, 2:37:31 PM3/27/11
to Away3D.dev

Justin Patrin

unread,
Mar 27, 2011, 3:42:16 PM3/27/11
to away3...@googlegroups.com

I was stumped by this too for a while. What worked for me was setting backgroundAlpha to 0 on the Application.

originaltomato

unread,
Mar 27, 2011, 6:09:06 PM3/27/11
to away3...@googlegroups.com, Sharkow
i just tested it for you, this worked for me:



setting BOTH params.
Reply all
Reply to author
Forward
0 new messages