ok the basic is this:

//collada file para casa
        [Embed(source="assets/ag.dae",mimeType="application/octet-
stream")]
        private var Ag:Class;

        //textura para paredes
        [Embed(source="assets/walls.jpg")]
        private var Walls:Class;

        //textura for techo
        [Embed(source="assets/techo.jpg")]
        private var Techo:Class;

        //textura para blueframe
        [Embed(source="assets/blueframe.jpg")]
        private var Blueframe:Class;

        //textura para redframe
        [Embed(source="assets/redframe.jpg")]
        private var Redframe:Class;

        //textura para greenframe
        [Embed(source="assets/greenframe.jpg")]
        private var Greenframe:Class;

        //textura para ventana1
        [Embed(source="assets/ventana1.jpg")]
        private var Ventana1:Class;

        //textura para ventana2
        [Embed(source="assets/ventana2.jpg")]
        private var Ventana2:Class;

        //textura para ventana1
        [Embed(source="assets/ventana3.jpg")]
        private var Ventana3:Class;

        //textura para piso
        [Embed(source="assets/piso.jpg")]
        private var Piso:Class;

blueframeM = new BitmapMaterial(Cast.bitmap(Blueframe));
                redframeM = new BitmapMaterial(Cast.bitmap(Redframe));
                greenframeM = new BitmapMaterial(Cast.bitmap(Greenframe));
                pisoM = new BitmapMaterial(Cast.bitmap(Piso));
                techoM = new BitmapMaterial(Cast.bitmap(Techo));
                wallsM = new BitmapMaterial(Cast.bitmap(Walls));
                ventana1M = new BitmapMaterial(Cast.bitmap(Ventana1));
                ventana2M = new BitmapMaterial(Cast.bitmap(Ventana2));
                ventana3M = new BitmapMaterial(Cast.bitmap(Ventana3));

  model2 = Collada.parse(Ag,{materials:
{blueframe:blueframeM,greenframe:greenframeM,piso:pisoM,redframe:redframeM,techo:techoM,ventana1:ventana1M,ventana2:ventana2M,ventana3:ventana3M,walls:wallsM}});
            model2.mouseEnabled=false;
            model2.scale(.1);
            scene.addChild(model2);

but i still get the cursed red cube telling me its an error that may
be from the url and not beign able to find the textures, maybe im
doing something very stupi, but anyway i cheked the paths and theyre
ok, so heres the .dae:

http://www.costatoursltda.com/away3d/

Reply via email to