I’m trying to change the background graphic of my GUI when a certain event happens. However, I’m having trouble with the syntax on how to write this.
In the manuel, I’ve found the BackgroundGraphic property (GUI) which suggests:
int GUI.BackgroundGraphic
However, when I try this and any variation that I can think of, I get an error. This is what I have tried:
5 gMyGUI.BackgroundGraphic;
gMyGUI.BackgroundGraphic = 5;
(5)gMyGUI.BackgroundGraphic;
gMyGUI.BackgroundGraphic(5);
If someone could help me with the proper syntax I'd really appreciate it. Oh, and I'm uising version 3.1.1
Thanks,
Cheerios
Should be "gMyGUI.BackgroundGraphic = 5;"
What is the error you are getting and where have you written the line?
~Trent
Cheerios the function you need to change a GUI's background graphic is this:
gMyGui.BackgroundGraphic=5; as TrentR also noted. There are two things:
Is there a GUI named gMyGUI?
Have you tried placing
gMyGui.BackgroundGraphic=5;
somewhere else to see if it's working? I usually do place inside a hotspot's interaction, that I know its working.
Thank you Trent and Dualnames for the tips.
Confirming that the syntax was actually correct, allowed me to search elseware to find the REAL problem. I followed your advice, Dualnames, and moved the code elseware to see if it would work â€" it did! Bottom line â€" there was different HIDDEN problem, that I was able to find and fix, thanks to your support.
Thanks,
Cheerios
Quote from: Cheerios on Mon 15/12/2008 14:12:53
Thank you Trent and Dualnames for the tips.
Confirming that the syntax was actually correct, allowed me to search elseware to find the REAL problem. I followed your advice, Dualnames, and moved the code elseware to see if it would work â€" it did! Bottom line â€" there was different HIDDEN problem, that I was able to find and fix, thanks to your support.
Thanks,
Cheerios
Ok, glad you got it right.