Cigan
03-20-2003, 10:09 PM
Ok I have a very odd problem. I can't for the life of me figure out why it does this. I have a function which among other things tells a movie clip to go to a specific frame. When I call the function it doesn't do this. However when I cut the part of the code which has the gotoAndStop() action in it and paste it into the frame where the custom function is called it works perfectly. I don't understand. Here is the code.
tellTarget (_root.Equipment.panel) {
gotoAndStop("armor");
}
Here is the function it was taken out of.
function populateStatPlane() {
tellTarget (_root.Equipment.panel) {
gotoAndStop("armor");
}
_root.serial1 = serial;
_root.Equipment.panel.dmg = catalog[""+serial].dmg;
_root.Equipment.panel.sr = catalog[""+serial].sr;
_root.Equipment.panel.mr = catalog[""+serial].mr;
_root.Equipment.panel.lr = catalog[""+serial].lr;
_root.Equipment.panel.clip = catalog[""+serial].clip;
_root.Equipment.panel.ref = catalog[""+serial].ref;
_root.Equipment.panel.enc = catalog[""+serial].enc;
_root.Equipment.panel.con = catalog[""+serial].con;
_root.Equipment.panel.tol = catalog[""+serial].tol;
_root.Equipment.panel.price = catalog[""+serial].price;
}
Now if I call the function populateStatPlane(); shouldn't it have this effect?
tellTarget (_root.Equipment.panel) {
gotoAndStop("armor");
}
Here is the function it was taken out of.
function populateStatPlane() {
tellTarget (_root.Equipment.panel) {
gotoAndStop("armor");
}
_root.serial1 = serial;
_root.Equipment.panel.dmg = catalog[""+serial].dmg;
_root.Equipment.panel.sr = catalog[""+serial].sr;
_root.Equipment.panel.mr = catalog[""+serial].mr;
_root.Equipment.panel.lr = catalog[""+serial].lr;
_root.Equipment.panel.clip = catalog[""+serial].clip;
_root.Equipment.panel.ref = catalog[""+serial].ref;
_root.Equipment.panel.enc = catalog[""+serial].enc;
_root.Equipment.panel.con = catalog[""+serial].con;
_root.Equipment.panel.tol = catalog[""+serial].tol;
_root.Equipment.panel.price = catalog[""+serial].price;
}
Now if I call the function populateStatPlane(); shouldn't it have this effect?