How to set background color ???

Software: Away3D 4.x

miquael, Newbie
Posted: 02 November 2012 10:27 AM   Total Posts: 8

Okay, I’m new to Away3D.

My project’s main class is extening view3D:

public class Main extends View3D { 

and everything generally works fine (I’m plotting 3D object with textures ect…

BUT the background is BLACK, and I need it WHITE.

I already tried:

[SWF (width="1100"height="800"backgroundColor="0xFFFFFF"frameRate="60")

No doing it ... still BLACK ...


Looking in the View3D class, I see that _backgroundColor is available, but even when i try hacking the the core class, I’m still not able to get it to be WHITE!

public var _backgroundColor uint 0xFFFFFF

^ won’t work!

I also see there is a set backgroundColor function:

public function set backgroundColor(value uint) : void
  {
   trace 
("bg: " value);
   
_backgroundColor value;
   
_renderer.backgroundR = ((value >> 16) & 0xff) / 0xff;
   
_renderer.backgroundG = ((value >> 8) & 0xff) / 0xff;
   
_renderer.backgroundB = (value 0xff) / 0xff;
  

Tho I’m not exactly clear how to call it ... ?

Can anyone help?

THANKS! :/

 

 

   

miquael, Newbie
Posted: 02 November 2012 10:31 AM   Total Posts: 8   [ # 1 ]

I tried this in my main class:

this._backgroundColor 0xFFFFFF

Did not work.  Did not even get the trace in the set function, not an error.  Nothing changed (?) ...

   

miquael, Newbie
Posted: 03 November 2012 09:24 AM   Total Posts: 8   [ # 2 ]

ah ...

super.backgroundColor 0xFFFFFF
   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X