-
How to hide layers with buttons
There is a layer on my application which i want the user to be able to hide if they wanted to, by clicking a button.
hiding a layer in the timeline while creating a flash (clicking the eye dot thing which makes a cross on the dot and hides the layer)... this is the function i want a button to do... and undo by clicking a second time.
thank-you in advance.
-
FK'n_dog
place the content of the layer inside a movieclip.
give this clip an instance name - clip1
the button toggle action to hide the clip -
on(press){
if ( hide ){
clip1._visible = true;
} else {
clip1._visible = false
}
hide = !hide;
}
hth
-
unfortunately i cant place all the contents into a movie clip, because the contents is multiple movie clips over a hundred and fifty frames... can something similar be done... but to the layer and not a movieclip?
-
FK'n_dog
layers are an authoring conveniance only, when fla becomes swf they are flattened into one layer,
you can A) use the _visible property on all of your movieclips to hide them, or B) direct the timeline to a frame that does not include your movieclips,( or where their _x and _y properties are set well off the stage area)
hth
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
|