Button change layer

Hi There,
first time for me to use this forum and I'm new to flash.
Wonder if somebody could help me with button AS3.
I've seen the tutorials 'Flash Buttons with Action Script 3'
here:
http://www.layersmagazine.com/flash-buttons-with-action-script-3.html
and this don't worked for me.
Tried to make my own but PROBLEMS.
First here what I want to learn:
- have layer 1 with one button
- new layer 'action1' with action for button on layer 1
- have layer 2 with text
- from start You only see layer 1 with the button
- when click this button You see layer 2 with text and not
see layer 1 and it's stop here
this is my AS3 code:
btn1.addEventListener(MouseEvent.CLICK, click1);
function click1(evt:MouseEvent):void {
gotoAndStop("5");
When I 'Test movie' it's shows boths layers and don't stop.
Please need help...

Hi Stephen,
What you are trying to accomplish seems pretty simple. I
believe what is happening is that you are missing a stop command
for the playhead to stop and show only the contents of your layer
#1. Add this to your actions layer, at the frame you want it to
stop right before your "btn1" code:
stop();
That will stop the playhead and wait for your "btn1" to be
executed.
hope this helps!
Rafael.

Similar Messages

  • InDesign button changes layer visibility?

    Hi all,
    I'm in InDesign CS4. I want to produce an 8-page PDF online publication that contains a tutorial about InDesign (what else?!)
    Also, imagine a JavaScript Button object on the bottom of each page that, when clicked, shows a layer of graphics for Windows screenshots, and when clicked again, shows a layer of Mac OS X screenshots.
    So the text stays the same, but the button would change between accompanying Mac or Windows screenshots. How cool would that be?!
    I see in the button panel, that I can choose from things like close, exit, goto anchor, next page, previous page, URL, movie, sound, view zoom...
    But can the button be made to hide or show a layer of graphics in the PDF (assuming an Acrobat version at least v6 or newer).
    Does that have to be done in Acrobat Pro? Can it be done at all?
    Mike Witherell in Maryland

    Mike,
    Layer visibility changes can only be done within Acrobat.
    Show/Hide fields can be done within ID.
    Yes, if you screw up a button in ID, you can change it in InDesign, but I warn you, the interface for buttons in Acrobat is much different than ID and even the most simple button action becomes very complicated in Acrobat.

  • Help: photoshop cs4 crashes when i drag a layer under or over another layer/try to change layer orde

    help: photoshop cs4 crashes when i drag a layer under or over another layer/try to change layer order
    this problem orcurred suddenly after having used the programm for years.
    i tried to reinstall cs4 and install all available updates, but it di not help...
    please help ! thanks

    What is the exact version and what’s your OS?
    What does the crash report state?
    Boilerplate-text:
    Are Photoshop and OS fully updated and have you performed the usual trouble-shooting routines (trashing prefs by pressing command-alt-shift/ctrl-alt-shift while starting Photoshop until the appropriate dialog appears after making sure all customized presets like Actions, Patterns, Brushes etc. have been saved and making a note of the Preferences you’ve changed, 3rd party plug-ins deactivation, system maintenance, cleaning caches, font validation, etc.)

  • Can I change layer order in PDF?

    Acrobat 9 pro: I'm doing a complicated map with layers in PDF format. I found a merge command to merge layers, which is cool. But better option for me is to change layer order, and possibly create new folders within PDF. Is this possible with Acrobat 9 pro?

    You can't, but "sub level layers" don't exist in Acrobat. OCGs exist in a single stack, though their NAMES can be grouped in the sidebar panel to make it appear they're in multiple levels. InDesign can create groups like that, Illustrator cannot, and Acrobat can't create them via the UI - however the names in the sidebar are NOT required to match the layer stack in the file, either in order or structure. You can use JavaScript to build the OCGorder array, including any sub-levels you want, and store it in the file.
    See the Acrobat JavaScript documentation on the setOCGOrder() function for help and a simple example of populating the array. Groups are created by putting an array within an array, just like any other tree of data.

  • Email Submit Button - Change Text/Confirm submission

    I have an Email Submit Button on my survey, which I am 'distributing'.  I would like for it to do 2 things once you click on the "Email Submit Button":
    1) Text of the button changes once it been clicked on in order to show that the survey was submitted. Right now, all I can figure is how to have the text change when you roll over the box or for the secnod you click on the box-- i want the caption to change once its been clicked.
    2) a text box appears below that can act as a "thank you for submitting your survey...".
    any help and advice is much appreciated!

    Thanks for the response Paul.  I feel like i'm very close, but I'm still not there... I'm not sure where to enter this javascript you sent me.  The only script I know to find is the XML Source ...if that's the right place, where do I enter your code?
    <field name="Button1" y="241.3mm" x="66.675mm" w="73.025mm" h="9.525mm"><
    ui><
    button/></
    ui><
    font typeface="Myriad Pro"/><
    caption><
    value><
    exData contentType="text/html"><
    body xmlns="http://www.w3.org/1999/xhtml" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/" xfa:APIVersion="2.5.6290.0"><p>simply<span style="xfa-spacerun:yes"> </span><span style="color:#ff0000;font-weight:bold">CLICK HERE</span> to submit via e-mail</p></body></
    exData></
    value><
    para vAlign="middle" hAlign="center" spaceAbove="0pt" spaceBelow="0pt" textIndent="0pt" marginLeft="0pt" marginRight="0pt"/><
    font typeface="Myriad Pro" baselineShift="0pt"/></
    caption><
    border hand="right"> 
    <?templateDesigner StyleID apbx2?>
    <edge stroke="raised"/><
    fill><
    color value="212,208,200"/></
    fill></
    border><
    bind match="none"/></
    field></
    subform>

  • Can i make a button change anchor link when you scroll down the site?

    I am trying to make a scroll site.. and i have navigation buttons on the right, a full menu, but also a "1 topic up" button and "1 topic down" button.
    Is there any way that i can have those buttons change anchor link when you scroll down the site.
    Example:
    I am at home, then i press "1 topic down" and gets scrolled to the next topic on the website, but then i cant make the button change to link to the anchor below that, so the button becomes useless after that 1 press.
    Is that in any way possible in Muse to make it change link?

    Hi
    You can try to create different buttons on page positions where down scrolling will be active with separate button actions. For example you click on "I topic down" , page scrolls and there is another button placed with "Next Topic down" , on click this would scroll the page more and similarly along the length of page.
    Button with anchor link scrolling down the page cannot be used for different anchor links, creating different buttons with anchors is the solution.
    Thanks,
    Sanjit

  • Play Button Changes Color To Red, Can I Change It?

    In the Sliding Planes theme, when I preview, the Play button (originally dark blue) turns red. It has to be something set in the theme since other themes have a change in color of the Play button as well (sometimes to yellow and other colors). Is this changeable? I would rather the color not change and stay dark blue. Thanks a lot!

    Ok, I think you answered my question. I just want to make sure you know that it's not the highlighting persay that I'm talking about, it's just the fact that the button changes and stays to red, it's not that it only gets red when you're selecting it but that once the menu starts and the text flies in and the drop zones are in motion the top writting and everything is the color I want but the Play button turns red automatically before I select it or anything. But I think you answered my question in that the theme I selected requires the Play button to turn red automatically to distinguish it from other buttons. I wouldn't mind it turning red when I would press enter or something to play, like for a second to change color to know that I cliked it, but what bothers me is that it's red the whole time which off sets the color scheme that I'm trying to make on the menu. Thanks again

  • What happened to Change Layer Content?

    This question is related to Photoshop Elements 10.
    Photoshop Elements 5.0 had the command "Change Layer Content" under the "Layers" menu. It would allow me to select from solid colors, gradients and patterns in shapes (rectangles, circles, or pre-made shapes. I used it a lot but I don't see it in this new version of Photoshop! What happened to that command? Is there some new command to replace it that I just don't see because I am really having a difficult time locating it!   

    I have some actions i made for elements to do that if your interested.
    You can do it without actions, but it's far from convenient.

  • Working with Edge Animate, how do you change layer colors and and names of layers?

    For many years, I have worked with Adobe Photoshop, and the ability to change layer color or the name of layers is quite easy. I have been reading around about how to do this with Edge, but, can't find any information on how I might be able to do this. Can you help?
    Thank you!
    LainKennedy

    Hi Darrell,
    Thank you for your answer. When I double click on the layer name, it opens for a second, then closes. I have tried to close the app, shut down my workstation, throw out the preferences, and, nothing seems to work. Am I doing something wrong?
    Thank you, again, for your timly answer. Really appreciate your help.
    Lain

  • Button "change" disappers in BSP degree audit

    Hi,
    I find the following strange behaviour in BSP degree audit, when I want to change an existing but not released degree audit run.
    1. When I select the student in the BSP application and list the audit runs for a study program, the application shows correctly five buttons: "create", "change", "display", "delete" and "cancel". Four of them are greyed correctly, as no audit run is selected yet.
    When I now select an audit run, the buttons "change", "display" and "delete" disappear, so I can not change or delete the audit run anymore. To me, this behaviour seems not to be correct.
    2. When I create a new audit run in this situation, no "save"-button appears. This also seems not to be correct.
    Can anybody reproduce this behaviour as well? Is this a bug?
    Thank you
    Andreas Born

    Unfortunately this comes not out-of-the-box. Remember you are in a web browser and not in SAPGUI. If you need it you can do one of two things:
    1. develop such a tool by yourself
    2. check out the possibilities WebDynpro for ABAP offers you (available as of SAP NetWeaver 7.0).
    Regards,
    Volker

  • Change layer content

    Been using pse3, trying pse9 (need to upgrade for new mac).
    What happened to change layer content and how do you change
    a shape layer to a pattern or gradient (transparent gradient)?
    Thanks for your time.

    Here's what i'm trying to do in pse9.
    The first example is a shape layer changed to a pattern fill
    using a transparent pattern and the second example changed the
    shape layer to a gradient fill using a foreground to transparent gradient.
    Took the screenshot using an old windows machine cause my old mac died.
    Any ideas on how this is done in pse9?
    Thanks

  • Event to handle radio button changed in a dynpro

    Hi Everyone,
    how can i handle if a radio button changes in a dynpro?
    I want to disable other buttons if a radio button is selected
    Thanks

    Hi ,
    you can do that..
    first group the radio buttons in the screen and assign function group for each radio button by double clicking ..
    and write the logic enable and disable fields in the screen in PBO
    regards,
    Prabhudas

  • Button changes style when connected to Application Manager

    I've connected the standard axButtons to the application manager in a custom OI built in CSharp using Visual Studio 2008.  When I run the OI, the buttons change from the standard style (rounded edges, etc.) to what looks like a classic style (squared edges, no color gradient, etc.).  At first I thought this might be a limitation of CSharp, but when I ran the executable CSharp UI (shipped with Teststand), the buttons look correct.  Is there a reference that I've not added or something?  I've followed (pretty much copied) the code found in the full-featured CSharp UI, leaving out functions that I didn't need.
    Below is the only real code involving the two buttons.  It's pretty simple so I imagined it's a project property that I've setup incorrectly.  I've also included the namespaces I included.
    Thanks for any help
    using NationalInstruments.TestStand.Interop.API;using NationalInstruments.TestStand.Interop.UI;using NationalInstruments.TestStand.Interop.UI.Support;using NationalInstruments.TestStand.Utility; 
    // Connect Sequence Controls this.axSequenceFileViewMgr1.ConnectCommand(this.axEntryPoint1Button, CommandKinds.CommandKind_ExecutionEntryPoints_Set, 0, CommandConnectionOptions.CommandConnection_NoOptions); this.axSequenceFileViewMgr1.ConnectCommand(this.axEntryPoint2Button, CommandKinds.CommandKind_ExecutionEntryPoints_Set, 1, CommandConnectionOptions.CommandConnection_NoOptions); 
    Solved!
    Go to Solution.

    Scott, once again, thanks for your help.  I've tried several things relating to this manifest file, all to no avail.  First, I tried pasting the lines you mention into the <program>.vshost.exe.manifest file (the vshost file was the only manifest file that I could find, is this the correct one?)--no change.  In the "Application" tab on the project properties, I can select create w/o manifest or embed manifest.  I tried both, but from this point the original manifest file was deleted during the build process and did not show up anymore.
    The project includes the windows common buttons as well as the teststand .NET controls.  I assume this would accomplish the lines you mentioned, but I am a .NET newbie so I could be wrong there.
    I've attached a 2008 C# Express project which includes no code, only a windows common button and a teststand button on a form. When I run this program, I see the same behavior.  Can you take a look at this, and let me know if you see the same behavior?
    Thanks,
    Shawn
    Attachments:
    TS_Control_Test.zip ‏62 KB

  • Weblogic console - the button "change & lock" is missing

    I just installed weblogic 10.3.5 server in my PC, and found in weblogic console, on the left pane – Change center, the button “change & lock” is missing. How could I get the button back?
    Thank you very much!

    Click in the admin console on Preferences, User Preferences and uncheck Automatically Acquire Lock and Activate Changes.
    Than the Lock&Edit button will appear.

  • Change layer scrolling shortcut?

    Hi everyone!
    I came to this forums once again because I seek help with Photoshop. I'll try to be as short as possible with describing my problem.
    I would like to know if there is a way to change layer scrolling shortcuts. I know that default ones are Alt + [ or ] to scroll  through layers, but unfortunately my country's keyboard does NOT have [ and ] keys. Therefore I am unable to quickly scroll through my layers. So I went into the keyboard shortcuts menu and searched it over and over again and couldn't find the these two shortcuts.
    Some of you may suggest that I should change the keyboard setting in Windows, but changing the keyboard setting on my computer is not an option here, because I've been using my country's keyboard + translated version of windows my whole life. Even if I did change the the keyboard to English one in Windows, I still wouldn't know on which keys certain symbols would be because I don't have an English keyboard.
    Well, that's all. Hopefully someone will be able to help me.
    Thanks for your replies!
    Jerry

    For example here's a script to select the backward layer.
    You would copy the below script and paste into either extend script cs6 or a text editor such as notepad and then save the script with a name and extension .jsx.
    Then save the script (extend script cs6) or copy the script to your photoshop cs6 presets>scripts folder.
    C:\Program Files (x86)\Adobe\Adobe Photoshop CS6\Presets\Scripts (32 bit photoshop cs6)
    C:\Program Files\Adobe\Adobe Photoshop CS6\Presets\Scripts (64 bit photoshop cs6)
    Start or resstart photoshop cs6 and the script should be under File>Scripts and use the Edit>Keyboard Shortcuts to assign a shortcut key.
    // =======================================================
    var idslct = charIDToTypeID( "slct" );
        var desc5 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref4 = new ActionReference();
            var idLyr = charIDToTypeID( "Lyr " );
            var idOrdn = charIDToTypeID( "Ordn" );
            var idBckw = charIDToTypeID( "Bckw" );
            ref4.putEnumerated( idLyr, idOrdn, idBckw );
        desc5.putReference( idnull, ref4 );
        var idMkVs = charIDToTypeID( "MkVs" );
        desc5.putBoolean( idMkVs, false );
    executeAction( idslct, desc5, DialogModes.NO );

Maybe you are looking for