一个xml加载图片的swf文件
正常运行正常代码如下
复制内容到剪贴板
代码:
Stage.scaleMode = "noScale";
Stage.showMenu = false;
Stage.align = "T";
nextLineCount = 0;
myXML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = initPhotos;
myXML.load("file/links.xml");
function initPhotos(a) {
if (a == true) {
txTitle._width = PageWidth;
txTitle.text = this.firstChild.attributes.title;
_root.PageWidth = Number(this.firstChild.attributes.width);
for (i=0; i<this.firstChild.childNodes.length; i++) {
if (i>0) {
photoBox0.duplicateMovieClip("photoBox"+i, i);
with (_root["photoBox"+i]) {
targetBox = _root["photoBox"+(i-1)];
_x = targetBox._x+targetBox._width-5;
_y = targetBox._y;
if (_x>(_root.PageWidth-_width)) {
_x = _parent.photoBox0._x;
_parent.nextLineCount++;
_y = _parent.photoBox0._y+(_parent.photoBox0._height-5)*_parent.nextLineCount;
}
}
}
var targetBox = _root["photoBox"+i];
targetBox.mcSmallImageBox.loadMovie(this.firstChild.childNodes[i].attributes.small);
targetBox.onEnterFrame = function() {
if (this.mcSmallImageBox._width>5) {
delete this.onEnterFrame;
this.mcSmallImageBox._width = 102;
this.mcSmallImageBox._height = 77;
}
};
targetBox.imageURL = this.firstChild.childNodes[i].attributes.large;
targetBox.onRelease = function() {
getURL(this.imageURL, "_blank");
};
}
//getURL("javascript:setHeight("+_root._height+")");
//myLater = setInterval(initLater, 2000, true);
}
}
function initLater(delOption) {
getURL("javascript:setTitle('"+myXML.firstChild.attributes.title+"')");
if (delOption == true) {
clearInterval(myLater);
}
}如果把里面的部件包进一个MC里面
或者用新的flash从外部导入空白MC就会报错
错误:由于指定的对象不存在,'with' 动作失败。
错误:由于指定的对象不存在,'with' 动作失败。
错误:由于指定的对象不存在,'with' 动作失败。
错误:由于指定的对象不存在,'with' 动作失败。
错误:由于指定的对象不存在,'with' 动作失败。
错误:由于指定的对象不存在,'with' 动作失败。
错误:由于指定的对象不存在,'with' 动作失败。
错误:由于指定的对象不存在,'with' 动作失败。
错误:由于指定的对象不存在,'with' 动作失败。
要怎么解决这个问题啊
请教各位游客和版主了