我有这个动作脚本从xml文件中提取图像
> myPhoto = new XML();
> myPhoto.ignoreWhite = true;
> myPhoto.onLoad = function(success) {
> //portfolioTag = this.firstChild;
> numimages =
> this.firstChild.childNodes.length;
> spacing = 28; 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.title =
> this.picHolder.attributes.title;
> this.thumbHolder.main =
> this.picHolder.attributes.main;
> this.thumbHolder.onRelease =
> function() { getURL(this.main,
> "_self"); loadMovie(this.main);
> main_txt.text = this.main; }; }
> }; myPhoto.load("languages.xml");
当有人点击其中一张图片时,我想从xml将影片加载到flash中。我怀疑这有可能我需要改变动作脚本的这一部分
this.thumbHolder.onRelease =
> function() { getURL(this.main,
> "_self"); loadMovie(this.main);
> main_txt.text = this.main; }; }
> }; myPhoto.load("languages.xml");
答案 0 :(得分:1)
您可能希望删除getURL(...)
,因为这会将您推送到另一个页面。 loadMovie(url, target)
也需要一个目标。