Gracias Peter, de acuerdo tengo este codigo, y en el intento llamar
una imagen de la biblioteca de flash, esta imagen en sus propiedades
de la biblioteca tiene exportar como ActionScript, a una clase llamada
Imagen, y una clase Base llamada flash.display.bitmapData, pero al
ejecutarlo sale este error

TypeError: Error #1034: Error de conversión forzada: no se puede
convertir Imagen$ en flash.display.BitmapData.
        at Camara_fla::MainTimeline/frame1()

pero es de la unica forma que llega por lo menos a la ejecucion de la
ventana de salida swf, gracias peter le repito que lo que quiero hacer
es similar al demo de away3d donde las plantas siempre apuntan a la
camara gracias es todo lo que necesito, y usted es el unico que
siempre me da respuesta a mis post.


import away3d.containers.*;
import away3d.cameras.*;
import away3d.sprites.Sprite2D;
import flash.display.*;


var mybitmapData:BitmapData = BitmapData(Imagen);
var camera:Camera3D=new Camera3D();
var scene:Scene3D=new Scene3D();
var view:View3D=new View3D({camera:camera,scene:scene});
addChild(view);
var image:Sprite2D=new Sprite2D(mybitmapData,{alpha:1,x:0,y:0,z:
0,scaling:1});
view.scene.addChild(image);

addEventListener(Event.ENTER_FRAME,enterFrame);

function enterFrame(event:Event):void{
        view.render();
}

On 29 dic, 09:37, Peter Kapelyan <[email protected]> wrote:
> Hi Julian,
>
> Sorry, I just woke up.
>
> What problem are you having? Have you tried to use a bitmap or bitmapdata?
> Are you trying to use a MovieClip instead?
>
> Let me know
> -Peter
>
> On Tue, Dec 29, 2009 at 9:34 AM, juliancruz87 <[email protected]>wrote:
>
> > Good morning,
> > I'm trying to create an object which always points to the camera
> > regardless of the position of the same, always pointing when the focus
> > of the camera viewing the object.
> > someone in the forum that usually help much told me he could do with a
> > Sprite2D and told me that in this way, but I do not use bitmapData,
> > and I failed to declare the image in any way please need help thanks!
>
> > var mySprite2D: Sprite2D = new Sprite2D (mybitmapData, (alpha: 1, x:
> > 0, z: 0,
> > y: 0, scaling: 1));
> > view.scene.addChild (mySprite2D);
>
> > thanks for all
>
> --
> ___________________
>
> Actionscript 3.0 Flash 3D Graphics Engine
>
> HTTP://AWAY3D.COM

Reply via email to