splashman88
May 30th, 2002, 01:59 PM
I have finished the main MC and want to make visible the sub-mc's . All have first frame empty. there are four different mc's. I have used the following script and it does not work in Flash5. I've included the error message.
on (release) {
setProperty ("_root.1mc", _visible, "1");
}
on (release) {
tellTarget ("this.1mc") {
gotoAndStop (2);
}
}
and I also tried the following:
on (release) {
setProperty ("_root.1mc", _visible, "1");
setProperty ("_root.2mc", _visible, "0");
setProperty ("_root.3mc", _visible, "0");
setProperty ("_root.4mc", _visible, "0");
with (_root.1mc) {
gotoAndStop(2);
}
}
error message:
Scene=Scene 1, Layer=buttons, Frame=1: Line 6: ')' expected
with (_root.1mc) {
Scene=Scene 1, Layer=buttons, Frame=1: Line 7: Statement must appear within on handler
gotoAndStop(2);
Scene=Scene 1, Layer=buttons, Frame=1: Line 8: Unexpected '}' encountered
}
on (release) {
setProperty ("_root.1mc", _visible, "1");
}
on (release) {
tellTarget ("this.1mc") {
gotoAndStop (2);
}
}
and I also tried the following:
on (release) {
setProperty ("_root.1mc", _visible, "1");
setProperty ("_root.2mc", _visible, "0");
setProperty ("_root.3mc", _visible, "0");
setProperty ("_root.4mc", _visible, "0");
with (_root.1mc) {
gotoAndStop(2);
}
}
error message:
Scene=Scene 1, Layer=buttons, Frame=1: Line 6: ')' expected
with (_root.1mc) {
Scene=Scene 1, Layer=buttons, Frame=1: Line 7: Statement must appear within on handler
gotoAndStop(2);
Scene=Scene 1, Layer=buttons, Frame=1: Line 8: Unexpected '}' encountered
}