Thanks Jens - it seems that (a) the rendering problem is fixed in the
trunk (must have been the same issue that Rob fixed on 16 Feb for
Kanaeda), and (b) the compile error was caused by having Strict Mode
turned off in the publish settings.

However if I turn on Strict Mode then I have another problem.  I am
using a class to extend ObjectContainer3D (for example, to duplicate a
surface so the back side renders properly).  with Strict Mode, I get a
compile error for each place I refer to a property or method I have
created in such classes.  These errors are in the form:
  1061: Call to a possibly undefined method doXYZ through a reference
with static type away3d.containers:ObjectContainer3D.
and
  1119: Access of possibly undefined property ABC through a reference
with static type away3d.containers:ObjectContainer3D.

These are all defined as public class methods and properties so I am
not sure why CS3 is giving me these warnings/errors and why they are
preventing the SWF from being published.  If I turn off Strict Mode
(if using the Away3D trunk) I get the compile error
AbstractRenderSession.as, line 356.  1000: Ambiguous reference to
_spriteLayer.

Have you run across this sort of problem before?

thanks again,
Ralph

On Mar 4, 7:05 am, Jensa <[email protected]> wrote:
> Hi Ralph,
> I just had a go at this and the Cylinder renders nicely behind the
> trident in all my cases? I'm using the latest version from SVN.
>
> Here's my code:
>
> package
> {
>         import away3d.containers.View3D;
>         import away3d.core.math.Number3D;
>         import away3d.core.render.*;
>         import away3d.lights.DirectionalLight3D;
>         import away3d.materials.*;
>         import away3d.primitives.Cylinder;
>         import away3d.primitives.Trident;
>
>         import flash.display.BitmapData;
>         import flash.display.Sprite;
>
>         public class PhongBug extends Sprite
>         {
>                 public function PhongBug()
>                 {
>                         super();
>                         var view:View3D = new View3D({x:250,y:150});
>                         this.addChild(view);
>                         //var mat:ShadingColorMaterial = new 
> ShadingColorMaterial
> (0xFFFFFF);  // Renders correctly
>                         // var mat:PhongColorMaterial = new PhongColorMaterial
> (0xFFFFFF); // Cylinder appears in front of Trident
>                         var mat:PhongBitmapMaterial = new 
> PhongBitmapMaterial(new BitmapData
> (1, 1, false, 0xFFFFFF )); // Same problem
>                         var cyl:Cylinder = new Cylinder();
>                         cyl.material = mat;
>                         cyl.x = -100; cyl.z = -100;
>
>                         var trident:Trident = new Trident();
>                         view.scene.addChildren(cyl, trident);
>
>                         var light:DirectionalLight3D;
>                         light = new DirectionalLight3D({color:0xFFFFFF, 
> ambient:0.2,
> diffuse:.5, specular:0.25});
>                         light.x = 6000; light.z = -6000; light.y = 9000;
>                         view.scene.addChild(light);
>                         view.camera.moveTo(2000, 2000, 2000); // Away3D 2.2 & 
> 2.3 syntax
>                         view.camera.lookAt(new Number3D(0, 0, 0));
>                         view.camera.zoom = 20;
>                         view.renderer = Renderer.CORRECT_Z_ORDER;
>                         view.render();
>                 }
>         }
>
> }

Reply via email to