Toggle layers?

I am wondering if it is possible to create a button that would toggle on and off an entire layer of a movie, and if it is, how it would be done. I don’t want to change all the layer’s objects to graphics/mc’s and change the alpha, but I will if that’s the only way. Could someone please explain how I might go about it, or point me to a tutorial that would help? Thank you.

Also, I have a question about magnification, like how to create a menu that would increase and decrease image magnification, with the ability to scroll the image around. So yeah, little help, or a handy tutorial link, o-negai shimasu. Thanks everybody.

You can’t toggle layer with actionscript. I’m not absolutely sure, but let’s say I’d be very suprised if you could :slight_smile:

And I don’t understand your second question: where’s the image and where’s te menu?

pom :cowboy:

Hi,

You can use the swapDepths command.

yes and no, eki. Swapdepths will swap the depths of two objects, but I do not think that is what they’re trying to accomplish here. You cannot turn off a layer. That is for sure. If all your elements are self contained, then select all and convert to mc, that would be the fastest way I can think of.

Eki did hit on something (a bit)… you could totally cheat and “cover” your contents with an mc. Totally cheating, but it could work. All depends on your setup.

Hi,

Yes Montoya that’s exactly what I meant. Just convert all the elements in a layer into a MC.
Cheating? Are we in some kind of contest? I don’t understand you!
What do u exactly mean by that? And by:

All depends on your setup
?

YOUR set up is exactly that: YOUR set up. So you plan and design it (ideally;-) the most effective way for the job in hand.

Come back to earth!:slight_smile:

Cheers

SHO

Actually montoya, swapdepths aren’t only for switching depth between two objects…

just enter a value instead.

like:

this.swapDepths(1000);

Just sets the depth to 1000…

But regardign entire layers… hmm… dunno. Would be hella useful i think…

I thought that layers were just a design tool. The code doesn’t recognise them, it only recognises objects. Once the movie is exported then layers don’t exist any more…