flashdudette
04-29-2003, 06:38 PM
This project is a course with several chapters. Each chapter is loaded into its own asp file into the parent window.
We are using ASP.
I have a session variable (voiceId) set to true when the first
movie loads and the following code in Flash in frame 1:
loadVariablesNum("../../getvoiceid.asp", 0);
// make sure any other loaded voice is not playing
myVoice.stop();
// create sound object and load it
myVoice = new Sound(this);
myVoice.loadSound("sound/voice1.mp3", true);
// check voiceId status and take action
if (voiceId == false) {
myVoice.stop();
voiceId = false;
vs.vplayB._visible = true; // checkmark btn meaning voice off
} else if (voiceId == true) {
myVoice.start();
voiceId = true;
vs.vplayB._visible = false; // shows stop btn meanig voice on
}
// when clicked, the buttons send the status of the voice ID
// and change the button to reflect the status
// voice is stopped
vs.vstopB.onRelease = function() {
myVoice.stop();
voiceId = false;
loadVariablesNum("../../readvoiceid.asp", 0, "POST"); // send
vs.vplayB._visible = true; // show check mark
};
// voice is played
vs.vplayB.onRelease = function() {
if (playvoice == false && soundIsLoaded == 1) {
myVoice.start(0, 0);
playVoice = true;
_root.speaker.gotoAndPlay("speakerOn");
vs.vplayB._visible = false;
}
};
Though the variable is checked properly, the buttons do not reflect the change and the voice
Only here is the problem.
When I load the first movie, the variable VoiceId = true
If I click on the off button, the variable is set to fa
We are using ASP.
I have a session variable (voiceId) set to true when the first
movie loads and the following code in Flash in frame 1:
loadVariablesNum("../../getvoiceid.asp", 0);
// make sure any other loaded voice is not playing
myVoice.stop();
// create sound object and load it
myVoice = new Sound(this);
myVoice.loadSound("sound/voice1.mp3", true);
// check voiceId status and take action
if (voiceId == false) {
myVoice.stop();
voiceId = false;
vs.vplayB._visible = true; // checkmark btn meaning voice off
} else if (voiceId == true) {
myVoice.start();
voiceId = true;
vs.vplayB._visible = false; // shows stop btn meanig voice on
}
// when clicked, the buttons send the status of the voice ID
// and change the button to reflect the status
// voice is stopped
vs.vstopB.onRelease = function() {
myVoice.stop();
voiceId = false;
loadVariablesNum("../../readvoiceid.asp", 0, "POST"); // send
vs.vplayB._visible = true; // show check mark
};
// voice is played
vs.vplayB.onRelease = function() {
if (playvoice == false && soundIsLoaded == 1) {
myVoice.start(0, 0);
playVoice = true;
_root.speaker.gotoAndPlay("speakerOn");
vs.vplayB._visible = false;
}
};
Though the variable is checked properly, the buttons do not reflect the change and the voice
Only here is the problem.
When I load the first movie, the variable VoiceId = true
If I click on the off button, the variable is set to fa