Dear all.
i have just started using away3d and seen some very interesting
demos.
So i went on to read tutorials, the one on flashmagazine seemed to be
very good but they all aim for away3d and the only i seem to be able
to download are away3dlite.
fair enough the differense do not seem to be so much so i started
anyway, i just wanted to make something easy to publish on the screen
and then i can work on making more advance once but it stops already
here.
here is my code.
package
{
import flash.display.Sprite;
import flash.events.Event;
import away3dlite.containers.View3D;
import away3dlite.primitives.Cube6;
import away3dlite.primitives.Sphere;
public class treedbox extends Sprite {
private var viewport:View3D;
private var cube:Cube6;
public function CreateCube01() {
viewport = new View3D();
addChild(viewport);
//cube = new Cube6();
//viewport.scene.addChild(cube);
var mySphere:Sphere = new Sphere({radius:50});
viewport.scene.addChild(mySphere);
viewport.render();
}
}
}
Please nothe this code reside in a AS file called " treedbox " and i
have also attache it as a class do the fla file.
when i run this code i get message
1118: Implicit coercion of a value with static type Object to a
possibly unrelated type away3dlite.materials:Material.
this aim for this part of the code "var mySphere:Sphere = new
Sphere({radius:50});"
if i remove the radius and just leave it as "var mySphere:Sphere = new
Sphere();"
it executes without error but i cant see anything on the screen.
When i load demos i can see everything on the screens so i suppose it
is something in the code. But i do it exacly as the tutorials tells
me. again the tutorials aims for away3d and not away3dlite. I cant
seem to find any tutorial for away3dlite.
with this simple code above should i not be able to get the sphere on
the screen?
If i add x and y values to viewport = new View3D(); i get same error
as the one above.
i kind of need to ge this basic steps to work before i proceed :)
i just flash CS4 and flashplayer 10.
Can anyone help me with this step or atleast point me where i can find
updated tutorials that reflects away3dlite?
BR
Dimi
--
Subscription settings: http://groups.google.com/group/away3d-dev/subscribe?hl=en