How can I make a button that on press the object appears and on second press the object to disappear

Hello,
I'm quite new to flash programing, and I don't know how can I make a button that will make the object appear and disappear.Till now I have this code for the appear:
on (press)
    _root.top1.gotoAndStop(2);
    _root.topp.gotoAndStop(2);
    _root.mm1.gotoAndStop(2);
          _root.m1.gotoAndStop(2);
but from here I'm stuck.
Thank you for your help

What you can do is use the _visible property of the object to make it appear and disappear, or more correctly, use the opoosite of the _visible property.  You should not put code "on" objects, keep it in the timeline.
If "object" is the instance name of the object you want to toggle, then in the timeline code you can use...
object._visible = false;  // start with the object being invisible
yourButtonName.onRelease = function(){
    object._visible = !object._visible;
That one line in the function sets the object's _visible property to be the opposite of what it currently is.

Similar Messages

  • How can I make a button that will work on iPads? (animate only on Mousedown)

    I am making an interactive page in Adobe Edge Animate. It will double as a low-mem website and also as an iPad page and is part of a larger flash website which is highly animated.
    This website sports two kinds of buttons; the ones linking to a label in the timeline and the ones linking to a URL.
    The problem is that I do not want the buttons to work on mouseover because that will be completely useless on iPads and similar devices. That is why I want the thing to animate on mousedown.
    What I did initially was to load the on and off states of the button to my timeline and made them into a symbol, after that I made two labels inside of that symbol; one for the on state and one for the off state. Below the first label there is a "sym.stop("ONstate");" action  and then my off-state button graphic has a mousedown "sym.stop("skipON");" action. Then comes the tricky part, I wanted to reference the label on which it should land in a onclick action on a root level. It didn't work at all. I used "_root.stop("label");". As you can see my programming abilities are extremely poor, I'm a graphics guy.
    Next, I decided to leave the mousedown action inside the symbol and do the onclick action on the main timeline, which did work for the most part, however it behaved weirdly. First off, the mousedown action worked perfectly, but not at the same time with the onclick action; You would click on the mousedown thing and it would stop on the frame and then you would need to click it a second time to go to the label.
    There must be either something  I'm doing wrong or this function is not supported by the Edge Animate beta. But my programming abilities are so poor to pinpoint the real cause of the problem.
    Can anyone help me please?

    Hi, redcrowdesign-
    Part of the problem is that you're using ActionScript syntax in a JavaScript environment.  Instead of using _root, you can access the Stage object.  If your symbol is only one level down, you can use sym.getParentSymbol().stop("label");.  If you have a nested symbol, you may find sym.getComposition().getStage().stop("label"); more effective.
    That being said, you might want to rethink your UI model and focus your iPad interactions on the touch events, which are much more performant than the mouse events.
    Hope that helps,
    -Elaine

  • How can I get all options under edit in iPhoto to appear and revert in red, the only option it gives me is to select multiple

    how can I get all options under edit in iPhoto on my phone to appear it has revert in red on theleft side & done on the right side, the only choice it gives me is select multiple

    The usual cause of that issue is a corrupted or missing font that Firefox replaces by another, in this case a bold, font.
    As a test you can try to disable the default font and choose a few different fonts (Arial, Verdana, Tahoma, Times New Roman) to see if you can identify the culprit.<br />
    you will have to reinstall that corrupted font.

  • How can I make it so that when I delete an e-mail on my iPhone the e-mail on my MBP is also deleted

    I'm trying to figure out how to sync my mail between my iphone and my macbook pro.  I am using the mac mail programs on both devices and comcast is my mail server.  I would like to be able to delete on both devices at the same time.  Right now when I get a new e-mail on my iphone4 and I delete it it still shows up on my macbook pro and vice versa.

    Whomever providesyour email account. Would provide eitehr POP or IMAP or both.  Check with your e-mail provider.
    IMAP vs. POP

  • How can I make a folio that is private for my client and their staff (about 20 people)?

    Hi, I have a Creative Cloud subscription and have created a DPS ipad folio for my client. They want to distribute this folio to their employees (about 20 people) and would prefer it not to be public.
    Can I do this with my CC subscription or do I need an enterprise account?

    You need to get a license. Here's a link to the latest on the new licensing Re: What is going on with DPS? and you can email [email protected] for a price quote to fit your needs.
    Another way to do this, which you can do with your CC account, is to use Adobe Content Viewer and share the folio with your client and staff. This will limit it to iPads.

  • How can I make it so that my songs don't go on her iPod and her songs ....

    Me and my mother just got iPods for christmas and hers was a U2 ipod and mine was a 30gb ipod. I have downloaded some songs and have imported some cds but my mother doesn't want those songs on her ipod. How can I make it so that my songs don't go on her iPod and her songs don't go on mine.Do i need to create another itunes?

    The computer can tell the difference between your two iPods. When you first plugged each one in, you named them and the computer recognizes each one as a separate disk.
    Now, when you plug in your iPod, and you are looking in iTunes at your iPod contents, you will see four buttons in the bottom right corner of iTunes - the first one is to display iPod options. Click on this, and under the music tab, select "Automatically update selected playlists only". Then, you scroll through your playlists and select only those you want to be transferred to your iPod. Your mother can do the same thing. Now you can each make your own playlists from the same music library, and only those songs you want to go onto your iPod will transfer when you plug it in. You can make the same selections for all the other options too (video, podcats. photos, etc), so that you only have to have what you want on each iPod.
    I have two iPods, a new 5g video iPod and an ancient 1g iPod, and have no problems syncing each of them with different playlists and options.

  • How can you make one button preform different actions in Xcode?

    How can you make one button "preform a click" and "orderfront"? Is that possible? Because what I am doing is making a welcome window to my application for Mac OS X 10.6, and I have two buttons in that window, one says "Connect" which connects a a WebView to a url and the other button opens up the main window. So how can I a make a button do multiple things at once??

    Ah - If you are just using bindings between various objects from Interface Builder, you can reduce your application code a bit (sometimes quite a bit), but there is only so far you can go. Typically variables and routines are defined in your application that Interface Builder hooks into, so that your application code (usually Objective-C, but can be others) can use these variables and routines to determine what is happening in the user interface.
    I'm not sure how up-to-date the project code is (or what programming code you are familiar with), but you can take a look at Apple's Cocoa Application Tutorial to see what is (usually) involved in creating an application.

  • How can I make it so that when Safari opens it takes me to the homepage?

    Say I am on youtube and I quit safari, when I reopen safari later, it goes to the page last open, in this case, youtube. How can I make it so that when Safari opens it always takes me to the homepage?

    Click on the red button (top left) to close the window before quitting.

  • How can I make my buttons be gone forever?

    Just starting out with Flash and have run into a problem. I have several scenes with buttons that can be pressed once and then they disappear using:
    myBtn1.onRelease = function(){ this._visible=false}
    But when I go back to the scene the buttons reappear. How can I make my buttons be gone forever?

    if you have more than 1 button that should be made not visible at any given time, you'll need to use an array to store those button references.  otherwise, you can use:
    var alreadyRemoved:Boolean;
    if(alreadyRemoved){
    myBtn1._visible=false;
    myBtn1.onRelease=function(){
    this._visible=false;
    alreadyRemoved=true;

  • How can I make a button "react"?

    This is probably a super silly question, but you know how it is, sometimes we sit on the answer and still can't find it... How can I make a button react to a click? I just want the simple effect of the button changing colors or looking like the user pushed it. Right now it's just the same old plain button, no matter if I click it or not, you can't really tell the difference. How can I give it the "pushing the button" effect? Thanks guys!

    You can choose image button and then choose from the available image buttons, or click on the folder icon when you select the image button and choose from the Gallery of Captivate 6.
    Few image buttons change color on hover or onclicked, these effects are predefined in them.
    Or you can edit that button on which you are working, from properties Panel.
    The Post and Cancel button on this thread seems like a transparent button in Captivate with different fill and stroke color, and transparency is also less, and with corner radius of 0.
    You will find these all optionns, when you will click on that button and then click on the properties panel.
    Thanks.

  • When I connect my ipod to my computer it opens my documents and won't show up in my itunes and I have unistalled then reinstalled itunes and reset my ipod twice and it stills does the same thing how can I make it so that it shows up in my itunes?

    When I connect my ipod to my computer it opens my documents and won't show up in my itunes and I have unistalled then reinstalled itunes and reset my ipod twice and it stills does the same thing how can I make it so that it shows up in my itunes?

    Try
    iOS: Device not recognized in iTunes for Windows
    I would start with              
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    or              
    Removing and reinstalling iTunes and other software components for Windows Vista, Windows 7, or Windows 8
    Before you reinstall the Apple software, also remove iCloud vi Control Panel Remove programs. The reinstall the Apple programs
    New cable and different USB port?
    Runs this and see if the results help with determine the cause
    iTunes for Windows: Device Sync Tests
    Try on another computer to help determine if computer or iPod problem

  • In DPS/Indesign for iPad - How can i create a button that once tapped, will pre-populate an email?

    In DPS/Indesign for iPad - How can i create a button that once tapped, will pre-populate an email? like when you tap a recipe in Marth Stewart Every Day Food for example....

    http://forums.adobe.com/message/4190932

  • How can i make a photo that is 10 x 6.6 to 10 x 8 without changing the image in Photoshop CS3?

    How can I make a photo that is 10 x 6.6 to 10 x 8 without changing the image in Photoshop CS3?

    I could be snarky and say change the image in a different version of Photoshop, but NO...
    The only way to make a photo that is one size into another size is to change the image.  You have a few choices about how to change it:
    One way is to simply expand the height from 6.6 to 8 inches using Image>Canvas Size, using the default setting of having the image centered and leaving the background either black or white, your preference.  This will add background color to the top and bottom of your image.  This won't change the image itself, but it will change its surroundings.
    Another way is to resize the image using Image>Image Size, entering the new dimensions after turning off the aspect ratio lock (resample on).  This will stretch the image vertically, however, so it's probably not a good option.
    Finally, you could resize the image using Image>Image Size, leaving the aspect ratio lock on and resample on, and increase the height from 6.6 to 8.  This will have the secondary effect of enlarging the width from 10" to a greater width.  Then you crop the resulting image back down to 10" width, which involves losing some edge areas of the image.

  • How can i make it so that on messages i can see who is online wihtout having to search their name?

    how can i make it so that on messages i can see who is online without having to search their name? When i had ichat i didnt have to search their name... i culd see who was online autimatically.

    Firefox, the web browser, doesn't make any decisions about what mail should be considered spam or what senders should be blocked. What email software or webmail site are you using that is rejecting the messages?
    If it's a common site like Yahoo! mail, Gmail, Windows Live Hotmail/Outlook.com, then perhaps a volunteer familiar with their specific settings can help.
    If it's Thunderbird, the support site is over here: [https://support.mozillamessaging.com/].
    If your security/privacy software filters your mail, you will want to check its settings as well.

  • HT201365 Now that I have upgraded to iOS 7, how can I make it so that I don't need a password every time I use my iPad?

    Now that I have upgraded to iOS 7, how can I make it so that I don't need a password every time I use my iPad?

    In v6 airport utility "Join a wireless network" is not available once the TC is setup.
    You must reset to factory and try again using the selection options.. and it can fail or not come up.. This is an extremely poor way to setup a TC.. and you should NEVER EVER DO IT.. that is why apple removed it. Since you are joining wireless it makes no difference where the TC is located.. since it would become a dumb AP and turn off its ethernet ports.
    Place it right next to your main modem router, plug in by ethernet, and select bridge mode and create a wireless network. Never use Join a wireless network..
    However for completeness here is the method.
    How do I setup my time capsule with wireless internet?
    Never ever do it.
    If you need internet by wireless and backup to the TC.. then simply plug the TC directly into the Mac.
    Run dual network.. Setup explained here.
    Using Time Capsule hardwired to Mac for back-up only.

Maybe you are looking for

  • How to transfer sales bom from SAP R/3 to APO?

    Hi Experts, I just want to ask how to transfer sales bom from R/3 to APO? if i change my bom usage to 5 and use this BOM in my Production version be enough to send it to APO? Also, this is my first time using sales bom, could you please help me under

  • SAP-XI

    Hello..    My requirement is that.. i need to trigger RFC function module from XI which is there in SAP.. In this case i configured such way that.. 1)import RFC into IR. 2)i created sender RFC adapter and receiver mail adapter for biz system (SAP) in

  • Run a shell command using Pl/Sql

    hi all i wonder if anyone knows a way to run a shell command using pl/sql other than java stored procedure as it seems not to be working in my case thanx in advance, Rasha

  • Contact sheet II in Bridge

    I added the Contact sheet II files to their locations, restarted Bridge and this is the message I get.

  • Tips for smooth playback?

    I need to create huge 1920x1200 projects for use on a cinema display. But all my on-screen elements just chug along at a choppy frame rate. What are some tips to help smooth my Quicktime playback and sprite movement in my projects? Can I have Directo