开发者

ScrollPane Component required in library even though it is not being used by Parent Movie

开发者 https://www.devze.com 2022-12-27 04:21 出处:网络
note: all as3 is written in CS4 and compiled for flash 10. I have a parent movie that loads a separate standalone SWF movie. This standalone movie happens to use the ScrollPane component (fl.containe

note: all as3 is written in CS4 and compiled for flash 10.

I have a parent movie that loads a separate standalone SWF movie. This standalone movie happens to use the ScrollPane component (fl.containers.ScrollPane), and it runs correctly when launched on it's own.

When I attempt to have a Parent movie load the standalone SWF, i receive a run-time error:

TypeError: Error #1009: Cannot access a property or method of a null object reference. at fl.containers::ScrollPane/drawBackground() at fl.containers::ScrollPane/draw() at fl.core::UIComponent/callLaterDispatcher()

I understand that this error can be avoided by adding the ScrollPane component to the Parent Movie library. My question is why is this necessary? If the component is only used in the standalone SWF being loaded by the Loader class, why does the Pa开发者_如何学Pythonrent movie require the component to be in the library as well?


Seems more like the ScrollPane is not initialised before it is referenced. Might be that the parent does not let the swf execute its initialisation code before use.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号