You could also do it this way , I mean passing a Scene3d variable into View constructor. The error you got is due to the fact that instead passing Scene3d instance you pass an Object which wraps Scene3d. This has nothing to do with Away3d , it is pure actionscript stuff: remember ,curly braces in AS mean Object class . Unlike in C# or or any C Lang where it is array .
Sent from my iPhone On Aug 12, 2011, at 3:23 AM, Laani <[email protected]> wrote: > Problem solved! > > instead of using the above syntax. I've used this syntax and it > works. > > view = new View3D(scene1); > > I think they have simplified the code in away4.0. > > > > > > > > On Aug 12, 10:16 am, Laani <[email protected]> wrote: >> Can somebody help me with this simple but puzzling error. >> >> I'm trying to pass a scene3D variable into my view3D and I get a >> compile error. I have no issues when I don't pass in any parameters. >> >> Here is the code: >> >> scene1 = new Scene3D(); >> view = new View3D({scene:scene1}); >> >> Here is the error: >> >> 1118 Implicit coercion of a value with static type Object to >> a possibly unrelated type away#d.containers.Scene3D >> >> Thanks!
