我有这个flash代码 - 我需要添加getURL(this.mainurl,“_ self”);所以this.mainurl是XML文件的动态值。
任何人都可以告诉我如何使getURL值动态
myPhoto = new XML();
myPhoto.ignoreWhite = true;
myPhoto.onLoad = function(success){
//portfolioTag = this.firstChild;
numimages = this.firstChild.childNodes.length;
spacing = 32;
for (i=0; i<numimages; i++) {
this.picHolder = this.firstChild.childNodes [i];
this.thumbHolder = thumbnails.createEmptyMovieClip(“thumbnail”+ i,i);
this.thumbHolder._x = i*spacing;
this.thumbLoader = this.thumbHolder.createEmptyMovieClip("thumbnail_image", 0);
this.thumbLoader.loadMovie(this.picHolder.attributes.thmb);
this.thumbHolder.mainurl = this.thumbHolder.attributes.mainurl;
this.thumbHolder.onRelease = function() {
getURL(this.mainurl, "_self");
};
}
};
myPhoto.load( “/闪光/ languages.xml”);
XML文件:
&LT; image title =“Found”mainurl =“http://www.de。” THMB = “\闪光\ image2.jpg”/&GT;
答案 0 :(得分:0)
myPhoto = new XML(); myPhoto.ignoreWhite = true; myPhoto.onLoad = function(success){ // portfolioTag = this.firstChild; numimages = this.firstChild.childNodes.length; 间距= 35; for(i = 0; i