RedMage
11-16-2002, 05:52 AM
I'm having trouble addressing a movieclip that I loaded through the constructing an instance from a class in a method of the same class.
This:
function CONT(loc,alias) {
this.fileurl = loc + "_mc";
this.name = alias;
}
CONT.prototype.test = function() {
_root.attachmovie(this.fileurl, this.name,1,{_y:25,_y:25});
_root.this["name"].bar._width = 50
}
I'm trying to attach a movie clip exported from my library and that works. But when I try to address a movie clip inside the movieclip without knowing a head of time what that name is until I define the object. If I know the name and type it like this:
function CONT(loc,alias) {
this.fileurl = loc + "_mc";
this.name = alias;
}
CONT.prototype.test = function() {
_root.attachmovie(this.fileurl, this.name,1,{_y:25,_y:25});
_root.movieClip_name.bar._width = 50
}
Then I works. Is there a way to do this? Sorry if this is difficult to understand, I can't explain it very well...
This:
function CONT(loc,alias) {
this.fileurl = loc + "_mc";
this.name = alias;
}
CONT.prototype.test = function() {
_root.attachmovie(this.fileurl, this.name,1,{_y:25,_y:25});
_root.this["name"].bar._width = 50
}
I'm trying to attach a movie clip exported from my library and that works. But when I try to address a movie clip inside the movieclip without knowing a head of time what that name is until I define the object. If I know the name and type it like this:
function CONT(loc,alias) {
this.fileurl = loc + "_mc";
this.name = alias;
}
CONT.prototype.test = function() {
_root.attachmovie(this.fileurl, this.name,1,{_y:25,_y:25});
_root.movieClip_name.bar._width = 50
}
Then I works. Is there a way to do this? Sorry if this is difficult to understand, I can't explain it very well...