Hello. I'm tried to add "import TestPrefab" string, and got:

[Fault] exception, information=TypeError: Error #1009: Cannot access a
property or method of a null object reference.
Fault, applyMaterialToMesh() at TestPrefab.as:121

I'm used FlashDevelop and Flex 3.5 to compile it.

On 21 мар, 17:47, Fabrice3D <[email protected]> wrote:
> To begin with, I see no "import TestPrefab"
> Also if the output is in a package, don't forget add the package name  
> in both outputclass and your import. Here I presume the class is next  
> to fla. Causing no errors.
>
> Then in the ouput, make sure the embeds url in the class are valid.  
> Default is "/images/"+filename.jpg.
> So in your case you must have a directory "images" with the maps  
> inside in same dir as the fla.
>
> Sent from an iPhone without Flash
>
> On Mar 21, 2010, at 13:06, Vadim <[email protected]> wrote:
>
> > Sorry, can you provide awd loading example? I'm also trying to use AS3
> > class exporter from Prefab, and getting error: [Fault] exception,
> > information=TypeError: Error #1009: Cannot access a property or method
> > of a null object reference.
> > Fault, applyMaterialToMesh() at TestPrefab.as:121
>
> > This is my sample code:
>
> > package
> > {
> >    import away3dlite.containers.View3D
> >    import away3dlite.core.base.Mesh;
> >    import away3dlite.primitives.Cube6;
> >    import away3dlite.cameras.Camera3D;
>
> >    import flash.display.Sprite;
>
> >    [SWF(width="500", height="400", frameRate="60",
> > backgroundColor="#FFFFFF")]
> >    public class AwayLiteCube extends Sprite
> >    {
> >        public function AwayLiteCube()
> >        {
> >            // create a viewport
> >            var view:View3D = new View3D();
> >            view.x = 250;
> >            view.y = 200;
>
> >            var camera:Camera3D = new Camera3D;
> >            camera.x = 0;
> >            camera.y = 0;
> >            view.camera = camera;
> >            addChild(view);
> >            camera.z = -300;
>
> >            var mesh:TestPrefab = new TestPrefab();
>
> >            view.scene.addChild(mesh);
>
> >            view.render();
> >        }
> >    }
> > }
>
> > To unsubscribe from this group, send email to away3d-dev
> > +unsubscribegooglegroups.com or reply to this email with the words  
> > "REMOVE ME" as the subject.

To unsubscribe from this group, send email to 
away3d-dev+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to