Simple button script not working

I am using AS2 and need help figuring out why this simple button script is not working:
stop();
buttonWS1.onRelease = function(){
                    gotoAndStop("Stage1and2_Boss",4);
buttonWS2.onRelease = function(){
                    nextFrame();
//end
My buttons are the square letter-puzzles below. They are images that I converted to "symbols" (specifically, buttons). I put their names as above (buttonWS1, buttonWS2, etc.) in the "instance names" boxes.
I have no idea what is going on. Please help!

Hi -
1. Yes, buttonWS2 is the instance name
2. The only code attached to it is the code I pasted above.
3. onRelease does not execute because my trace statement does not appear in the output
Here is the modified code for buttonWS2:
buttonWS2.onRelease = function(){
                    trace("clicked!");
                    nextFrame();
Question: It shouldn't matter if I have commented-out code within that set of codes should it?:
buttonWS2.onRelease = function(){
          //if (puzzleschosenarray[0] == 2 || puzzleschosenarray[1] == 2) {
          // cannot be chosen -- make button non-functional
          //else{
                    //puzzleschosenarray[roundnumber-1] = 2;
                    trace("clicked!");
                    nextFrame();

Similar Messages

  • Simple button scripts not working in AS2

    Hi there,
    I am at my wits end. I've tried about 2 dozen tutorials word for word and they don't work and I just keep getting lots of strange errors.
    I have a very simple 4 frame scent with a forward and backward arrow on each frame to link them together. I have an artwork layer, a button layer and an action script layer. The action script layer contains stop(); and the following script in the buttons layer. I adjusted the gotoAndStop frame number accordingly for each frame. Below is an example of one frame. I ran them from frame 5 to 9 as the stop feature wouldn't work on the first keyframe.
    leftButton.onRelease=function(){
    trace("gotoAndStop(9)");
    rightButton.onRelease=function(){
    trace("gotoAndStop(6)");
    When I test the movie (publish it) the buttons don't work at all. I've tried many times to no avail. It just remains frozen on frame 5 and the arrows do nothing.
    Here is a screen shot of my file.
    http://marthalodge.com/Picture2.png
    Thanks for any help.

    Regarding the numbers, I was referring to instance/variable names, not frame labels.
    As far as errors go, the following is errant in that it is missing a closing parenthesis, but it also doesn't make much sense.  What are you expecting it to trace?
    trace(gotoAndStop("eight");

  • Help Pls -- Simple Validation Script not working

    -- yet another form I am working on --
    I have a numeric field and the entry number can't be no larger than 7 -- I have tried different variations of the script, and I don't know why it isn't working. I know it's something simple..just can't see it!
    Please help!
    ----- topmostSubform.Page1.NumericField12[0]::exit: - (JavaScript, client) -------------------------
    if topmostSubform.Page1.NumericField12[0].rawValue >= 8
    xfa.host.messageBox("Invalid Number Must be 7 or smaller");

    Thanks..you helped me before.....thanks a million...
    I got it to work with the validation feature also...
    I'm gonna take this opportunity to solve another problem -- a real one this time..
    Fields A and B - read only numeric fields (calculated)
    new field C - requires Field A divided by Field B and then check to see if correct radio button is checked and if not then put an asterick beside number in Field C! Hope this makes sense...
    Field C - a/b I get an arithmetic overflow/underflow message...
    Please help again!

  • Button scripts not working

    I don't think we're in Kansas any more, Toto.  I've been programming with Director ever since version 3.0, and I can't make my buttons work in Director 11.  I realize they are now Flash components, and I realize that may present a whole new set of rules for the game.  Right now, I have a test movie set up to experiment with the Buddy API xtra for desplay resolution set and reset.  The first movie has a button labled "Continue".  It has a sprite script that says,
    on mouseUp me
       go to movie "nextMovie2"
    end
    The movie entitled "nextMovie2" has a button with a sprite script that says,
    on mouseUp me
       quit
    end
    Neither of those scripts works.  The buttons highlight when you click them (as long as the mouse is down), and unhighlight when you release the mouse, just as they should.  But nothing happens.
    There is no manual, of course, and the help files are, well, shall we say, a bit unrewarding to search through?
    Can someone tell me what I'm missing, please?
    Thanks!
    Dewey

    First of all, some advice.  Don't.  Just don't.  It is very bad form to change someone's screen resolution. It is super annoying when your program crashes and fails to bring the normal resolution back... which then messes up all the desktop icons and other system settings.  Also, you have no idea what kind of monitor people have.  In the old days, it was usually a choice between 640x480, and 1024x768 or something.  Now there are loads of options, with different width-to-height ratios (widescreen), some HD capable, some not, some LCD monitors (like mine) which will ONLY work at one specific resolution.  If I ran your program and it tried to change my screen res, it would probably just go black and I would be pissed.  Widescreen monitors will stretch your image if you set it to the wrong width.  And that is only the tip of the iceberg.  Things get even more complicated for folks (like myself) who have multiple monitors hooked up. 
    Just.  Don't.
    But that said, in an attempt to actually answer your question, the "temp" option is not what you think.  It will change it until the computer is rebooted, at which point it <should> go back to the original.  If you want to change the resolution back to the original yourself, do so in a stopMovie handler.
    And here is the docs for baSetMultiDisplay()
    http://www.mods.com.au/budapi_docs/baSetMultiDisplay.htm

  • Button script not working

    I'm using Flash CS4, AS2. I'm trying to navigate to a new scene from within a moviescript. I created a nav bar with a drop down menu. The menu is within a Movieclip. I've added buttons to the drop down menu and added the following script to one of button to go to a new scene.
    on (release) {
         gotoAndPlay("Scene 2", 1);
    I tried a get url function on one of the buttons which seems to work.
    But the go to and play function doesn't work.When I click on the button, nothing happens. Any Ideas what could be the problem.
    Thanks for any help

    yes, the output shows your button code is executing.  but you should not use the goto methods and you should not use scenes in navigation. 
    you should use the goto methods and frame labels:
    on (release) {
         _root.gotoAndPlay("Scene2_frame1");  // and label this frame. 

  • Save button is not working for ONE CLICK ACTION

    Hi All,
    We have embeded a custom table view in a standard component.While we are editing the first row of the table view by ONE CLICK ACTION & pressing the SAVE button of overview page,then the record is saved in the database. But if we edit any row other than the 1st one,the save button is not working.
    We have used transaction context here for simple object.
    lv_tx_ctxt = lr_ent_bt->get_transaction( ).
    my_tx_context->add_tx_context( lv_tx_ctxt ).
    Please suggest how we can focus on the current line which we are editing & can save the record in database?
    Thanks.

    Hi Hakan,
    Probabaly this is not my problem. I know that how bt one click we can get the desired row.
    Let me briefly explain you my requirement and currently where I am stuck.
    I have a assignment block ( custom) in the main overview page with a custom table view ( ie in the view we are displayng entries in the table view ) and the user can press edit button on any row and that will open the particular row in edit mode . User will change the value in any of the columns and press save button on the main component and the custom changes will be saved in the database.
    Now the problem that we are facing is when we are chnaging the first row it si working but when we are doing chnages in the 2nd row or 3rd row changes are not saved ( not even in the table view that is getting displayed) .
    *Let me briefly tell you the approach that we took  . Since our table view uses a simple object  ( which is not a related object with BTORDER so we need to explicitly save the simple object entities to transaction context and for doing that we have redefined the eh_onsave method in the overview page) .
    *Now the save button is in overview page so to pass the entry from our custom table view to overview we are using custom controller . The custom controller 's collection wrapper only has the first entry of the table view custom_controller->collection_wrapper->get_next is failing which is the reason why the 2nd entry is not getting saved.
    Can you tell me how i can get all the table entries in my custom controller's collection wrapper?
    Let me know if you have any other questions.

  • Simple short cuts not working in CC?

    Does anyone know why simple commands are not working in Illustrator CC (Copy, Paste, Undo) This is such an irritating problem as these short cuts are so frequently used. My cloud software is up-to-date. Having upgraded my software I would prefer not to have us CS5 to combat this problem.

    Hi Vaibhav,,
    Thankx for the prompt help!!
    I'm using Submit to SAP button only and I do have xACF installed on my local m/c. I'm able to use buttons and validations on the form but I'm not able to get the values in my WDynpro ABAP Appl. For Eg. : and internal table is bound to a table UI in adobe iForm , I'm able to add row (using formcalc/JScript eventing in Adobe) but I'm not able to get the changed internal table in my WDynpro ABAP application after submit button is pressed.
    Any help will be highly appreciated.
    Regds,
    Aryan

  • I bought my iphone 5s a week before and now its volume "up" button is not working when pressed.Does anybody know what to do to make it work?I have a one year warranty.Should i give it to apple retail shop or is there any way to solve this problem?

    I bought my iphone 5s a week before and now its volume "up" button is not working when pressed.Does anybody know what to do to make it work?I have a one year warranty.Should i give it to apple retail shop or is there any way to solve this problem?

    IF it is a manufacturing defect and you bought the device from Apple or an authorized Apple retailer, then take it into Apple.

  • TA44551 My 1-year ipod nano locked up and would not start overnight. The on/off button will not work and stopped holding charge. No water damage, no fall, nothing unusual. I restored it (twice) but it will still not hold charge and on/off does not work.

    My 1-year ipod nano locked up and would not start overnight. The on/off button will not work and stopped holding charge. No water damage, no fall, nothing unusual. I restored it (twice) but it will still not hold charge and on/off does not work. I tried to restore it again and charged it in three different locations with different cables. etc but nothing. Suggestions?

    - After charging for 1/2 hour or so, does iTunes see the iPod?  If yes, restore the iPod from backup.
    - If no, se if placing the iPod in recovery mode will make it visible so you can restore the iPod.  For recovery mode see:
    iPhone and iPod touch: Unable to update or restore

  • Why cant I add contacts on the iphone4? the mail contacts calendars button unders settings, the contacts button, the add a contacts button under message and the phone button will not work to add a contact.

    Why cant I add contacts on the iphone4? the mail contacts calendars button unders settings, the contacts button, the add a contacts button under message and the phone button will not work to add a contact.

    Have you attempted a restore?

  • VS2005 Crystal Report Print Report Button is not working on Windows 7 x64

    Hi There,
    My application is written in VS2005 C# on x86 machine. It runs smoothly on XP pro and Vista x86 machine.
    I deployed the same to windows 7 x64 machine with CRRedist2005_x64.msi and found that the Print Report button is not working.
    So, I re-compiled my application to x64 target platform, and reinstall the application to the same machine. But nothing changed. I have surf for answer over the web but nothing found.
    Please help urgently. Any helps is much appreciated. Thks in advance.
    Edited by: chanpyvivian on Mar 26, 2010 11:14 AM

    I follow your instruction as below:
    1) download the sample app vbnet_win_printtoprinter.zip to dev computer and compile it to .NET 2005.
    - Run from my dev computer
    - Click "Print Report" button
    - Error message display - please see below
        The error was due to the default printer name hard coded in the program was not found. I have edited to my printer name and it can be printed out with no error.
    2) Use a "saved data" report so that you do not have to worry about database logon.
    can't find the "saved data", please elaborate
    3) Then copy the exe to the 64 bit box and try to print using this sample app.
    -do you mean copy the exe to the 64 bit computer for testing ?
    ERROR Message
    CrystalDecisions.CrystalReports.Engine.InvalidArgumentException:
    Invalid printer specified. ---> System.Runtime.InteropServices.COMException (0x80000201):
    Invalid printer specified.
       at CrystalDecisions.ReportAppServer.Controllers.PrintOutputControllerClass.ModifyPrinterName(String newVal)
       at CrystalDecisions.CrystalReports.Engine.PrintOptions.set_PrinterName(String value)
       at CrystalDecisions.CrystalReports.Engine.PrintOptions.Copy(PrintOptions src)
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)
       --- End of inner exception stack trace ---
       at CrystalDecisions.ReportAppServer.ConvertDotNetToErom.ThrowDotNetException(Exception e)
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.Load(String filename, OpenReportMethod openMethod, Int16 parentJob)
       at CrystalDecisions.CrystalReports.Engine.ReportClass.Load(String reportName, OpenReportMethod openMethod, Int16 parentJob)
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.EnsureLoadReport()
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.get_FormatEngine()
       at CrystalDecisions.CrystalReports.Engine.ReportDocument.PrintToPrinter(Int32 nCopies, Boolean collated, Int32 startPageN, Int32 endPageN)
       at PrintToPrinter.Form1.Button1_Click(Object sender, EventArgs e) in C:\Crystal\CRNET\vbnet_win_printtoprinter\vbnet_win_printtoprinter\Form1.vb:line 91
    OK  
    Edited by: chanpyvivian on Mar 30, 2010 6:18 PM

  • My G4 powerbook starts up but with a black screen. The reset button does not work. Does anyone know the keys to press on restart please ?

    My G4 powerbook running OSX 10.3.9 starts up with  a black screen. The reset button is not working. Does anyone know which keys to press on restart please.?

    Try holding the shift key while booting to get Safe mode if possible.
    See links for more info.
    http://support.apple.com/kb/ht1564
    http://support.apple.com/kb/ht1455

  • Froze on black screen and power button does not work

    my sons ipod touch is stuck on a black screen when plugged into the computer got a spinning wheel and will not connect now spinning wheel will not go away the power button does not work so can not reset it manually
    any suggestions would be appreciated

    - iOS: Not responding or does not turn on
    Neglect the reset and when it says place the iPod in recovery mode use one of thes programs
    - If not successful and you can't fully turn the iOS device fully off, let the battery fully drain. After charging for an least an hour try the above again.
    - Try on another computer          
    - If still not successful that usually indicates a hardware problem and an appointment at the Genius Bar of an Apple store is in order.
    Apple Retail Store - Genius Bar       

  • Is there anyway to power off an I-phone 4s if the power button is not working?

    Is there anyway to power off the phone if the power button is not working?

    Assistive Touch. Tap Settings App > General > Accessibility > Assistive Touch > ON > at bottom of screen tap button > Device > press and hold Lock Screen icon > when slide to power off appears > slide it. To turn iPhone ON connect to Power Source with USB cable, charger or USB port of computer.
    All iPhone 4S have full Warranty Coverage. Make Genius Reservation and take iPhone to Apple for resolution.

  • I have unabled 5 fingure gesture now not able to perform any task,also my power button is not working,please help me in removing this gesture,using I phone 4

    I have unabled 5 fingure gesture now not able to perform any task,also my power button is not working,please help me in removing this gesture,using I phone 4

    I have unabled 5 fingure gesture now not able to perform any task,also my power button is not working,please help me in removing this gesture,using I phone 4

Maybe you are looking for

  • Unable to use one touch access with vista through ...

    Hi I have an n70 and N95. I have installed the latest version of pc suite. When i click on one touch access i click connect and it instantly disconnects. How do i configure vista to connect to the internet through my phones modems. Iam a novice. It a

  • Font Mapping not working in Flash

    I am editing a flash file that was created by a mac and I use windows. Upon opening I recieve a message stating 'Some text uses fonts not installed on your system'. When I open the dialog box FONT MAPPING and select one of the missing fonts (i.e.Helv

  • RMI Callback messages can not be sent to all clients

    we I send a message to all clients using RMI Callback the message dont arrive to all clients when one or more clients is disconnected without removing themselves from the hashtable at the server side . how i can know if the client is disconnected bef

  • MacBook Pro, the left speaker doesnt work

    Hi all, As per title i bought a second hand MacBook Pro A1286, the left speaker doesnt work though. I have tried to unclick "Use ambient noise reduction" that hasnt worked. I also did the cmd, alt, R and P reset. That also didnt work, i was wondering

  • ID CS6 questions - TOC

    I had a word doc which I needed to convert to epub. I first went from word to Sigil and it looked pretty good as Sigil retained all the styles, then I went to validate  and I saw the TONS of errors. I had just finished a .id to .interactive .pdf and