Hi all,

Currently in order to render anything, the View3D object needs to be
added to the display list, even if you just want to render it to a
bitmap. This is the error I'm getting if the View3D is not on the
display list:

TypeError: Error #1009: Cannot access a property or method of a null
object reference.
        at away3d.containers::View3D/updateScreenClip()[C:\flash_project
\away3d_1057\src\away3d\containers\View3D.as:811]
        at away3d.cameras::Camera3D/update()[C:\flash_project\away3d_1057\src
\away3d\cameras\Camera3D.as:312]
        at away3d.containers::Scene3D/update()[C:\flash_project
\away3d_1057\src\away3d\containers\Scene3D.as:160]
        at away3d.containers::Scene3D/onUpdate()[C:\flash_project
\away3d_1057\src\away3d\containers\Scene3D.as:49]
        at flash.events::EventDispatcher/dispatchEventFunction()
        at flash.events::EventDispatcher/dispatchEvent()
        at away3d.containers::View3D/notifySceneUpdate()[C:\flash_project
\away3d_1057\src\away3d\containers\View3D.as:222]
        at away3d.containers::View3D/render()[C:\flash_project\away3d_1057\src
\away3d\containers\View3D.as:839]
        at com.playfish.games.cooking::IsoCacher/renderShape()[C:
\flash_project\cooking\src\com\playfish\games\cooking\IsoCacher.as:
200]
        at com.playfish.games.cooking::IsoCacher/onEnterFrame()[C:
\flash_project\cooking\src\com\playfish\games\cooking\IsoCacher.as:
167]

This is due to updateScreenClip() referencing to the stage variable
which is null when View3D object is not on the display list.

There's no Camera class that doesn't call updateScreenClip() so I'm
not sure if it can be done at all normally. Current.y I have a hack to
get it working by adding it to the display list, rendering it, and
then removing it from the display list all in the same function so it
doesn't appear on screen but is there any other more elegant solution
that I'm missing?

thanks,
Tommy

Reply via email to