需要ScrollPane组件库,即使它不被使用的父级影片 [英] ScrollPane Component required in library even though it is not being used by Parent Movie

查看:219
本文介绍了需要ScrollPane组件库,即使它不被使用的父级影片的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

请注意:所有的AS3写在CS4和编译闪存10

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

我有一个父影片加载单独的独立SWF影片。这种独立电影恰巧使用ScrollPane组件(fl.containers.ScrollPane),它在它自己的启动时运行正常。

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.

当我试图有一个Parent影片加载独立SWF,我收到一个运行时错误:

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

类型错误:错误#1009:无法访问空对象引用的属性或方法。 在fl.containers ::滚动窗格/ drawBackground() 在fl.containers ::滚动窗格/画() 在fl.core :: UIComponent / callLaterDispatcher()

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()

据我了解,可避免通过将ScrollPane组件父影片库此错误。我的问题是,为什么这个必要吗?如果组件仅用于独立的SWF的Loader类加载,为什么父影片所需要的组件在库中呢?

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 Parent movie require the component to be in the library as well?

推荐答案

似乎更像是滚动窗格将不会被初始化它被引用前。可能是家长不让使用前,SWF执行其初始化code。

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.

这篇关于需要ScrollPane组件库,即使它不被使用的父级影片的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆