开发者

Access movie in external swf using xml data

Is it possible to access a movieclip inside an external swf (.fla file), using data from a vector?

The following code works correctly:

this._graphics.message2_mc.textLabel_txt.text = "Test";

Where as when I loop through a vector and try to replace "message2_mc" it cannot find the movie clip:

for(var i:uint = 1; i <=开发者_Python百科 this._playlistState.subMovieVector.length - 1; i++) 
{
    var movieName:String = this._playlistState.subMovieVector[i].movieName;
    this._graphics.movieName.textLabel_txt.text = "Test";
}

Presumably this is because I am putting a string in the middle of the line of code accessing the movie clip?


You should use:

var movieName:String = this._playlistState.subMovieVector[i].movieName; this._graphics[movieName].textLabel_txt.text = "Test";

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜