Flash &引用;无法访问空对象引用的属性或方法。”;Flex中的错误
我有一个自定义类,它扩展了EventDispatcherFlash &引用;无法访问空对象引用的属性或方法。”;Flex中的错误,flash,actionscript-3,apache-flex,Flash,Actionscript 3,Apache Flex,我有一个自定义类,它扩展了EventDispatcher private var assetsManager:AssetManager; 这是在creationComplete上运行的 GeneralUtils.parentComponent = this; this.assetsManager.addEventListener(AssetEvent.ASSETS_LOADED,OnAssetsLoaded); this.LoadConfig
private var assetsManager:AssetManager;
这是在creationComplete上运行的
GeneralUtils.parentComponent = this;
this.assetsManager.addEventListener(AssetEvent.ASSETS_LOADED,OnAssetsLoaded);
this.LoadConfigFile();
第二行有1009个错误。我已经看了一段时间了,不知道它找不到什么。OnAssetLoaded函数就在那里。有什么想法吗?您似乎没有创建assetManager对象。您需要显式地创建它
assetsManager = new AssetManager ();
在尝试将侦听器附加到它之前