hide/show layer useing action script?

i would like to know how to hide or show a layer useing action script.

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

flash layer or html layer?
first of all give your layer a name
for example your layers name is home
under your button event of keyframe
write down:


or to hide


inshort :

thank you
Hi frosty5656

in flash a layer is the levels above one another on the main time-line
you can't show and hide those.

what you can do though is put the content of one of these layers into a movieclip..
select what you want to show and hide and go..insert>convert to symbol
check movieclip and give it a name..say..wheel clip.. so you can easily find it in the library later

with the this clip still selected..open the properties panel and in the 'instance name' box give it a name..say..wheel1

on a button..

    _root.wheel._visible = false;

   _root._visible = true;

there you go..show/hide.. just like dhtml :)


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
frosty5656Author Commented:
too bad layers can't be hidden :(
don't think layers..think movieclips..and they can be..
just reverse the code above to have the clip hide on the stage..and then show on rollover.


It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Adobe Flash

From novice to tech pro — start learning today.