Quality select with a button?

I’m disabling the (right click)menu in my flash movie, so I want to make it so that the user can cycle through low, med, and high quality by pressing “q”

ummmm… so how do I go about doing this?

I know I’ll use

if (Key.isDown(Key.Q)

{

}

but that’s about it. I’m also aware of two properties, those being _quality and _highquality, I just dont’ know how to use them. And don’t I need to stick this inside of

onclipEvent (enterframe) {
}
??

ack, still trying to get the hang of coding…

Actually it’s quite simple…



// Put this code in the first frame of your movie

function toggleQuality()
{
    if(toggle <= 3)
    {
        toggle++;
    } else {
        toggle = 0;
    }
    _quality = qualitynames[toggle];
}

// Place this in the first frame of your movie

_root.onLoad = function()
{
    toggle = 0;
    qualitynames = new Array();
    qualitynames = ["LOW", "MEDIUM", "HIGH", "BEST"];
}

// Place this where you want the action to happen... 
// Whichever frame that might be

if(Key.isDown(Key.Q))
{
    toggleQuality();
}


There you go man… Albeit… I wouldn’t totally get rid of the right click menu…

Peace

wow, you need all that for quality select…?

I can barely follow it… I mean I get most of it, in my programming course we briefly touched on arrays and stuff.

I’ve so much to learn :o

thank you very much!

hmmm… it doesn’t seem to be working…

The very first frame of my movie is part of the preloader. the movie cycles through the first 3 frames until all frames are loaded. The code you gave me is on that first frame. I put the next part of the code (the if key down) on the fourth frame, the first frame that comes up when the movie is loaded.

And I want the quality select to be available through the whole movie

what am I doing wrong?

Hmm…

I forget people put preloaders on their movies… lmao

Umm… Just move what is to be on the first frame… To a frame that’s closest to the first without having a preloader…

Then in every frame that you have the movie… Include the toggleQuality thing.

I don’t know man, this still isn’t working…

The whole first scene deals with the preloader and stuff. So I go to the second scene. On the first frame, in a new layer, I put all this:

function toggleQuality()
{
if(toggle <= 3)
{
toggle++;
} else {
toggle = 0;
}
_quality = qualitynames[toggle];
}

// Place this in the first frame of your movie

_root.onLoad = function()
{
toggle = 0;
qualitynames = new Array();
qualitynames = [“LOW”, “MEDIUM”, “HIGH”, “BEST”];
}

Then in a new layer above it, in the first frame, I put

if(Key.isDown(Key.Q))
{
toggleQuality();
}

and nothing happens when I press Q.

oh, wait… ok, I am using Flash 5. Will this only work in MX? Sorry, I just have a habit of posting on this board.