Question

Trying to do something like this :

   _plane = new Mesh(new PlaneGeometry(124, 179), new TextureMaterial(Cast.bitmapTexture( CardBack)));
   _view.scene.addChild(_plane);

   container_mc.addChild(_view);
    addChild(container_mc);

    container_mc.scaleX =0.5

But i cannot see the plane, getting sqeezed in the x dimension ? So, is there something wrong i am doing here?

Was it helpful?

Solution

away3d 4 uses stage3D API for this reason you have to use objectcontainer3D scene graph for hold all mesh & other display object.

update : you can use movieclip but it isn't possible to add any mesh & model object into the away3d scene graph. For inspiration you can add your score bar or other element like this;

// you should add main your class 
var scoreDisplay : MovieClip = new ScoreDisplay();
addChild(scoreDisplay);

now your code should be like that

var container_mc:ObjectContainer3D = new ObjectContainer3D();
_view.scene.addChild(container_mc);

_plane = new Mesh(new PlaneGeometry(124, 179), new TextureMaterial(Cast.bitmapTexture( CardBack)));
_view.scene.addChild(_plane);

container_mc.addChild(_view);
addChild(container_mc);
container_mc.scaleX =0.5
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top