When using a <script when="immediate" />, the error message I get when
referencing a null object in the SWF10 runtime is not very detailed.
TypeError: Error #1010: A term is undefined and has no properties.
at LzApplication/runToplevelDefinitions()
at LFCApplication/initLFC()
at flash.display::DisplayObjectContainer/addChild()
at flash.display::Stage/addChild()
at LzPreloader/enterFrame()
Here is the LZX code:
<canvas>
<script when="immediate">
var someObj = {};
someObj.missing.test = {};
</script>
</canvas>
If the script is not run with the when="immediate", but at default
initialization time, I get the following message:
TypeError: Error #1010: A term is undefined and has no properties.
at MethodInfo-35()
at LzScript()
at LzNode/makeChild()
at LzInstantiatorService/makeSomeViews()
at LzInstantiatorService/checkQ()
at Function/http://adobe.com/AS3/2006/builtin::call()
at LzEvent/sendEvent()
at LzIdleKernel$/__update()
I guess the reason is that scripts which run immediately are included
into the top-level definitions of the application?