I have a movie instance in my frame which I named 'helpmenu'. I tried to make code that would allow a user to control the visibility of the menu. I'm able to get the menu to disappear by pressing 'h', but I can't seem to figure out how to make it reappear. I placed the coding for this action on the X box in the top right corner since the keypress function only works on a button:
-------------------------------------------------
on (keyPress "h"
{
if ("0"
{
setProperty (helpmenu, _alpha, "100"
;
} else {
setProperty (helpmenu, _alpha, "0"
;
}
}
-------------------------------------------------
Here is the current version of the file with the above code at work:
I can't tell if it's a syntax problem or just the wrong coding altogether. I tried following a tutorial that explained if/else statements, but I couldn't seem to get it to work for my particular case. Maybe it needs a Variables? Thanks in advance!
-Cardy
-------------------------------------------------
on (keyPress "h"
if ("0"
setProperty (helpmenu, _alpha, "100"
} else {
setProperty (helpmenu, _alpha, "0"
}
}
-------------------------------------------------
Here is the current version of the file with the above code at work:
I can't tell if it's a syntax problem or just the wrong coding altogether. I tried following a tutorial that explained if/else statements, but I couldn't seem to get it to work for my particular case. Maybe it needs a Variables? Thanks in advance!
-Cardy