Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Set Visibility of Movie Clip by Clicking Outside of It

Posted on 2003-10-24
4
Medium Priority
?
272 Views
Last Modified: 2010-04-03
I have a Table of Contents Movie Clip which is launched on _level2 of my movie, using a button.

I use the following script on my button.

on (release) {
      if (_root.tableofcontents.active == 1) {
            setProperty("_root.tableofcontents", _visible, "1");
            _root.tableofcontents.active = "0";
      } else {
            _root.tableofcontents.active = "1";
            setProperty("_root.tableofcontents", _visible, "0");
      }
}

Is there a way I can have a user click anywhere outside of the visible Table of Contents, and have the visibility set to "0"?  I'd like to do this WITHOUT creating an invisible button 800 by 600 (the size of my movie).

Didn't know if there was some other way of doing it.

Thanks,
Brandon
0
Comment
Question by:brandonlee
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 23

Expert Comment

by:Zeffer
ID: 9617411
_visible has a boolean value so you use true or false with it
with _alpha use 0 to 100

so..
setProperty("_root.tableofcontents", _visible, "1");

should be..
setProperty("_root.tableofcontents", _visible, true);  

_visible will disable the target
_alpha will still allow a button to work..even though you cant see it.


With MX you can give a movieclip the actions of the button object by using the on handler..so on the  tableofcontents clip..

on(releaseOutside){
     level2._visible = false);
    _level2.active = 0; //so you can reactivate the menu if needed

}

Z
0
 
LVL 5

Accepted Solution

by:
Calron earned 500 total points
ID: 9620519
I have not been able to find any other way to do what you want to without using a big button. What you can do is change the mousecursor of the button so the user doesn't see the hand cursor while over your big button:

_root.hider.useHandCursor = false;   where _root.hider is my button (also a button that covers the whole frame in my case :)  )
0
 
LVL 5

Expert Comment

by:Calron
ID: 9620527
the on(releaseOutside){  will only work if the mouse was pressed inside of the movie clip and then release outside of it.
0
 

Author Comment

by:brandonlee
ID: 9626718
Thanks!  That's what I thought, but hiding the cursor will help a lot!

Thanks for your help!
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here are some practices and techniques that can be adopted into your Flash/Flex application development process. Note: Not all "performance tips" provide an immediately-recognizable benefit.   This article does not include timing validation data,…
While working over numerous projects I often had the requirement for doing a screen capture in AS3.0. Unfortunately I found no "ready made" solutions in google search that suited my requirements. But I did come across some great resources which help…
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question