webscripter
Programmer
Hi everybody,
This seems like a simple thing to me but no matter what I try it comes back as undefined.
//arbitrary level
//script is in frame 1 on main timeline
myMovie= createEmptyMovieClip("pagebody", level10);
bla bla bla more code here in frame 1
//in frame 2
//I'm loading a movie adminpage which has some user fields
//and a pushbutton component.
trace("entering page body fm2"
;
trace("adminpage = "+_root.adminpage);
trace("reloadmv = "+_root.reloadmv);
if(_root.reloadmv == 1){
trace("loadingMovie"
;
myMovie.loadMovie(adminpage);
_root.reloadmv = 0;
}
myvars = new LoadVars();
myvars.load("doors.txt"
;
myvars.onLoad = function (success) {
if (success) {
//the instance of the FPushButton is called pushbtn
//it's in the adminpage movie which has the instance name
//pagebody loaded in level10 assigned to it.
//if I can simply change the label of the pushbutton
//I won't have to create 3 movies that have the same
//items in them.
// trouble area
myMovie.pushbtn.setLabel(resetbtn);//doesn't work
trace(_level10.pagebody.pushbtn.getLabel)
;//nope
trace(_level10.pushbtn.getLabel)
;//notit
trace(_root.main[pabebody].pushbtn.getLabel;//same
trace(myMovie.pushbtn.getLabel)
;//doesn't work
//Can someone tell me the right path to pushbtn
trace("myvars.doornames = "+myvars.doornames);
if(myvars.doornames == undefined){
loadstat = "No doors added or unable to load doors.txt."
_root.loadsts.text = loadstat;
trace(ldstatus);//var name for textfield
}else{
doornm = myvars.doornames.split("|"
;
doords = myvars.doordescs.split("|"
;
trace(doornm.length);
door_list.removeAll();
for(i=0;i<doornm.length;i++){
door_list.addItem(doornm,doornm);
}
var i = 0;
}
}
};
stop();
Thanks
Tricia
yorkeylady@earthlink.net
This seems like a simple thing to me but no matter what I try it comes back as undefined.
//arbitrary level
//script is in frame 1 on main timeline
myMovie= createEmptyMovieClip("pagebody", level10);
bla bla bla more code here in frame 1
//in frame 2
//I'm loading a movie adminpage which has some user fields
//and a pushbutton component.
trace("entering page body fm2"
trace("adminpage = "+_root.adminpage);
trace("reloadmv = "+_root.reloadmv);
if(_root.reloadmv == 1){
trace("loadingMovie"
myMovie.loadMovie(adminpage);
_root.reloadmv = 0;
}
myvars = new LoadVars();
myvars.load("doors.txt"
myvars.onLoad = function (success) {
if (success) {
//the instance of the FPushButton is called pushbtn
//it's in the adminpage movie which has the instance name
//pagebody loaded in level10 assigned to it.
//if I can simply change the label of the pushbutton
//I won't have to create 3 movies that have the same
//items in them.
// trouble area
myMovie.pushbtn.setLabel(resetbtn);//doesn't work
trace(_level10.pagebody.pushbtn.getLabel)
trace(_level10.pushbtn.getLabel)
trace(_root.main[pabebody].pushbtn.getLabel;//same
trace(myMovie.pushbtn.getLabel)
//Can someone tell me the right path to pushbtn
trace("myvars.doornames = "+myvars.doornames);
if(myvars.doornames == undefined){
loadstat = "No doors added or unable to load doors.txt."
_root.loadsts.text = loadstat;
trace(ldstatus);//var name for textfield
}else{
doornm = myvars.doornames.split("|"
doords = myvars.doordescs.split("|"
trace(doornm.length);
door_list.removeAll();
for(i=0;i<doornm.length;i++){
door_list.addItem(doornm,doornm);
}
var i = 0;
}
}
};
stop();
Thanks
Tricia
yorkeylady@earthlink.net