silverswim
Programmer
Hi... I'm having some trouble with these bits of code... I got some help before from wangbar to sort it out when the var stored was in a class of its own. But trying to access it from another class isn't working...
class Ipa{
var c : Settings;
function Ipa() {
}
}
class Settings {
var currSubs:Boolean;
function Settings (s:Boolean) {
currSubs = s;
}
function getSubsOn ():Boolean {
return currSubs;
}
function setSubsOn (s:Boolean):Boolean {
currSubs = s;
return currSubs;
}
}
then at root level:
var dpp : Ipa = new Ipa();
dpp.c.setSubtitlesOn(false);
and level 3:
_global.subtitles = _level0.dpp.c.getSubtitlesOn();
if ( _global.subtitles == false){
_level3.speech._visible = false;
};
And nothing happens...subtitles still showing...
Thanks in advance for help.
silverswim
class Ipa{
var c : Settings;
function Ipa() {
}
}
class Settings {
var currSubs:Boolean;
function Settings (s:Boolean) {
currSubs = s;
}
function getSubsOn ():Boolean {
return currSubs;
}
function setSubsOn (s:Boolean):Boolean {
currSubs = s;
return currSubs;
}
}
then at root level:
var dpp : Ipa = new Ipa();
dpp.c.setSubtitlesOn(false);
and level 3:
_global.subtitles = _level0.dpp.c.getSubtitlesOn();
if ( _global.subtitles == false){
_level3.speech._visible = false;
};
And nothing happens...subtitles still showing...
Thanks in advance for help.
silverswim