Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1717
  • Last Modified:

hide/show layer useing action script?

I am adding actionscript to a button so that it has hide and show functionality. I have found a solution on EE that says

http://www.experts-exchange.com/Web/WebDevSoftware/Flash/Q_20809360.html

I just need to clarify some things.

When you create the instance of the movie you want to appear do you place it on the main timeline or on the button timeline. Also I want the clip to appear on mouseover and to stay there until someone clicks another link, then the effect which was for button 1 should stop and the same effect should happen for button 2. please HELP
0
fusionless
Asked:
fusionless
1 Solution
 
dutchfoxerCommented:
Okay, you will have 2 buttons, one "show layer" and one "hide layer". (or something similar)

You will also have a movieclip that you give a name once put on the main timeline ("wheel1" as in example).

The 2 buttons and movieclip you put on the main-timeline.

"show layer" button will have the action script:

on(rollOver){
    _root.wheel._visible = true;
}

"hide layer" button will have the action script:
on(rollOver){
    _root.wheel._visible = false;
}

And what about "wheel1" when the flash-movie is first started? Shown or hidden? If you want it hidden when movie starts then create a new layer and call it actions. On the first blank-keyframe you put the following action script:
_root.wheel._visible = false;
stop();

on(rollOver)   can also be   on(release) for mouseclicking.


Good luck! Hope it is a bit more clear!?

0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now