|
-
Hi everyone,
I know in Flash there are the four main movie qualities (low medium high and best). I want my movie to start at best but have a button that, when clicked, will set the quality to the next setting in the rotation. here is the script i've tried but it doesnt seem to work as i expected.
The if statements work (by which i mean flash can tell what quality it's set at) because when i use the right click quality menu and set it to "low", the MC updates to display low. (i have another chunk of code that sets the MC to display the current quality). My problem seems to be in adjusting the quality once the IF statement evals to true.
I know that you can put in _quality = "BEST" at the start of the movie and it works, so why won't work inside an IF statement? Anyway, here's the code
// qualityMC is simply and MC with for frames, each with a stop action. Each frame displays the current quality. (eg. frame displays "Best", frame 2 is "Low" etc).
on (release) {
if (_quality == "BEST") {
_quality = "LOW";
tellTarget ("QualityMC") {
gotoAndStop (2);
}
}
if (_quality == "LOW") {
_quality = "MEDIUM";
tellTarget ("QualityMC") {
gotoAndStop (3);
}
}
if (_quality == "MEDIUM") {
_quality = "HIGH";
tellTarget ("QualityMC") {
gotoAndStop (4);
}
}
if (_quality == "HIGH") {
_quality = "BEST";
tellTarget ("QualityMC") {
gotoAndStop (1);
}
}
}
-
I should have also mentioned...
My movie with the quality button is loaded into _level1 from the main movie. Don't know if this makes any difference or not.
-
Ah crap....i put in some trace actions actions and realized that the script i wrote would set the quality to low if it was best but right underneath that was a script saying if it was low set it to medium and on and on. It just kept loop thorugh so each time i presseed the button, it would set hte quality to Best then Low then Medium then High the Best then it would exit.
I feel silly having posted this whole thing now. 
Thanks anyway
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|