加载外部 pv3d 作的 swf文件问题
zhuanghe1985 (2009-04-21 11:10:56)
谢谢 上次DDM 君的帮助
我做了一个加载条的文件
在同一文件夹下 我做了个flash3d的swf文件还有模型和贴图 都在 同一 文件夹下
加载条第一祯 是这样写的
var loading:Loader=new Loader();
var s:String ="p6.swf"
var url:URLRequest =new URLRequest(s);
loading.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS,proHd);
loading.contentLoaderInfo.addEventListener(Event.COMPLETE ,completeHd);
function proHd(e:ProgressEvent){
byte.text=String(e.bytesLoaded)+"/"+String(e.bytesTotal);
per.text=String(int(e.bytesLoaded/e.bytesTotal*100))+"%";
mc.scaleX=e.bytesLoaded/e.bytesTotal;
}
function completeHd(e:Event){
line.visible=false;
mc.visible=false;
addChild(loading);
}
loading.load(url);
运行后输出
INFO: Papervision3D Public Beta 2.0 - Great White (December 3rd, 2008)
TypeError: Error #1009: 无法访问空对象引用的属性或方法。
at Main$iinit()
INFO: BitmapFileMaterial: Loading bitmap from dae/Box01VRayCompleteMap.jpg
INFO: using input set #1 for material _6_-_Default
INFO: DisplayObject3D: COLLADA_Scene
INFO: DisplayObject3D: Box01
那位高手 帮帮忙看看问题出在哪