If statement not working/being run

I have a button which makes a panel flip 180 on the x axis if its name is not in an array called "panes", it determines this by running an if statement. If its name is in the array then the button should run some code to make the panel flip back. However it isn't. It will let the panel flip one way, but doesn't run the code to flip it back. I was wondering if someone could take a look a see if they know why..
Code is linked below.
http://pastebin.com/mc7457
Thanks

Hey, thank you for the reply. How would I get it to run a different if statement on the second button push? (to check if it is in the array)
Also some answers
I need an array because I have 4 of these panels which will flip in to the stage, one on each side (top,bottom,left,right). and they will stack up, similar to a pile of paper down on your desk. The array is to keep track of where in the "pile" the panel is, so that if you click the 3rd one down to flip back out, it wont clip the ones above it, and will 1st make them fold back before doing the one you clicked.
My complete code is pretty long so I thought it would be better to link it instead, but for anyone that didn't wanna click the link, here it is.
stop();
import flash.events.Event;
import flash.events.MouseEvent;
var panes:Array = new Array();
function photosrotate(event:Event):void {
   if (photos.rotationX < 180){
           photos.rotationX += 6;
        } else {
                return;
function photosrotateout(event:Event):void {
   if (photos.rotationX > 0){
           photos.rotationX -= 6;
        } else {
                return;
photosPane.addEventListener(MouseEvent.CLICK, photoin);
        if (panes.indexOf("photos") === -1) {
                function photoin(e:MouseEvent):void {
                        addEventListener(Event.ENTER_FRAME, photosrotate);
                        panes.push("photos");
                        trace(panes);
        else if (panes.indexOf("photos") === 0){
                photosPane.addEventListener(MouseEvent.CLICK, photoout);
                        function photoout(e:MouseEvent):void {
                                addEventListener(Event.ENTER_FRAME, photosrotateout);
                                trace ("stuff");
                        trace("poopie");
                        // Nothing to see here so back off!

Similar Messages

  • Select statement not working

    hi to all,
    I am trying to write use inner joining . here is code
    DATA:tabname LIKE dd02L-tabname,
         table_disc LIKE dd02t-ddtext.
      SELECT  dd02ltabname dd02tddtext INTO (tabname,table_disc)
        FROM dd02l INNER JOIN dd02t on dd02ltabname = dd02ttabname
              WHERE dd02tddlanguage = 'E' AND dd02ltabclass = 'TRANSP'
                                AND dd02L~tabname = 'ZANKI*'.
        endselect.
          write : tabname.
    I also checked in tables dd02t and dd02l for the table zanki* and data available in both table . but here select statement not working .do u have any idea about this. thank you

    Hi,
    I executed the ur inner join conditin by commenting 'z*' it's working fine.
    I think  where condition is not getting satisfied so u r not getting any data.
    Please conform in where condition you need * 'AND'* or OR
    I change decalration as below.
    DATA:tabname    type TABNAME,
          table_disc type AS4TEXT.
    SELECT dd02l~tabname
           dd02t~ddtext  INTO (tabname, table_disc)
    FROM dd02l  INNER JOIN dd02t on dd02l~tabname = dd02t~tabname
    WHERE dd02t~ddlanguage = 'E' AND
          dd02l~tabclass = 'TRANSP'AND
        dd02L~tabname = 'ZANKI*'.
    endselect.
    write : tabname.
    Regards,
    Pravin

  • Multitouch on track pad not working when running Windows 8 in boot camp

    Does anyone know a work around on how to resolve the issue of more than one fingers on the trackpad? For example, I use one finger to click a window then another finger to slide/move the window to a different location on the screen. This does not work when running Windows 8 in Boot Camp latest version. Any suggestion is much appreciated.

    very very few gestures are supported in windows
    https://discussions.apple.com/message/24548533#24548533
    if it's a limitation from ms you need to contact them
    if it's a limitation from apples drivers you can use feedback channel
    http://www.apple.com/feedback/

  • Powershell Script Send-zip not working when running in cmd

    I found there is powershell send-zip script available in technet.  I tested it and found that it works when the script is running under powershell env, but when it is calling in cmd env, I can see the zip file, but there is nothing in it.  If
    I add the "-noexit" switch it runs normally.  Anyone have ideas what might be happening?
    The orig codes is as following:
    function global:SEND-ZIP ($zipfilename, $filename) { 
    # The $zipHeader variable contains all the data that needs to sit on the top of the 
    # Binary file for a standard .ZIP file
    $zipHeader=[char]80 + [char]75 + [char]5 + [char]6 + [char]0 + [char]0 + [char]0 + [char]0 + [char]0 + [char]0 + [char]0 + [char]0 + [char]0 + [char]0 + [char]0 + [char]0 + [char]0 + [char]0 + [char]0 + [char]0 + [char]0 + [char]0
    # Check to see if the Zip file exists, if not create a blank one
    If ( (TEST-PATH $zipfilename) -eq $FALSE ) { Add-Content $zipfilename -value $zipHeader }
    # Create an instance to Windows Explorer's Shell comObject
    $ExplorerShell=NEW-OBJECT -comobject 'Shell.Application'
    # Send whatever file / Folder is specified in $filename to the Zipped folder $zipfilename
    $SendToZip=$ExplorerShell.Namespace($zipfilename.tostring()).CopyHere($filename.ToString())
    SEND-ZIP C:\abc\a.ZIP C:\a\a.bak

    I've had the same problem with similar code found on another web site.
    The reason the zip file ends up being empty is that the temporary $ExplorerShell object you created is deleted when the send-zip function returns,
    and any incomplete copy operation that may still be ongoing at that time is aborted. (The copy operation is asynchronous, and continues after the CopyHere() function returns.)
    To work around this, you need to add a delay loop before you return, waiting for the copied object to appear in the zip.
    (Note that adding a fixed delay, like I've seen on other web sites, does not work: Small files appear almost immediately, whereas large file or worse still large subdirectory trees can take a long time to appear.)
    Try changing the end of your routine to something like...
    # Create an instance to Windows Explorer's Shell comObject 
    $ExplorerShell=NEW-OBJECT -comobject 'Shell.Application' 
    # Open the zip file object
    $zipFile = $ExplorerShell.Namespace($zipfilename.tostring())
    # Count how many objects were in the zip file initially
    $count = $zipFile.Items().Count
    # Send whatever file / Folder is specified in $filename to the Zipped folder $zipfilename 
    $SendToZip=$zipFile.CopyHere($filename.ToString())
    # Wait until the file / folder appears in the zip file
    $count += 1 # We expect one more object to be there eventually
    while ($zipFile.Items().Count -lt $count) {
        Write-Debug "$filename not in the zip file yet. Sleeping 100ms"
        Start-Sleep -milliseconds 100
    # Return deletes the $zipFile object, and aborts incomplete copy operations.

  • Merge statement not working over db link

    I have a merge statement that works fine when it's run against a local table, but when I try to run it against a table over a database link, I get the following error.
    ERROR at line 1:
    ORA-01008: not all variables bound
    ORA-02063: preceding line from REPOS
    ORA-06512: at "DBADMIN.PING_DB", line 6
    ORA-06512: at line 1
    Here is the code:
    create or replace procedure ping_db
    as
    begin
    merge into availability@repos A
    using (select trunc(sysdate) from dual)
    on (trunc(A.day) = trunc(sysdate))
    when matched then update set A.uptime = A.uptime + 1
    when not matched then insert (hostname,dbname,day,uptime) values
    (utl_inaddr.get_host_name,sys.database_name,trunc(sysdate),1);
    commit;
    end;
    /Code compiles fine, but gets the error when it's executed. Any help would be appreciated.

    9.2.0.x is the version (9.2.0.4,.5 and .6)

  • Case when statement not working

    hi there, I am trying to work out how to get my case statement to work.
    I have got the following code. 
    select pthproto.pthdbo.cnarole.tpkcnarole, pthproto.pthdbo.cnaidta.formataddr as formataddr, cnaidta.dateeffect as maxdate, isnull(cast (pthproto.pthdbo.cnaaddr.prefix1key as varchar (50)),'') + ' ' + isnull(cast (pthproto.pthdbo.cnaaddr.prefix2key
    as varchar (50)),'')+ ' ' + isnull(cast (pthproto.pthdbo.cnaaddr.prefix3key as varchar (50)),'') + ' ' + isnull (cast (pthproto.pthdbo.cnaaddr.houseidkey as varchar (100)),'') + ' ' + isnull (cast (pthproto.pthdbo.cnaaddr.component1
    as varchar (100)),'') + ' ' + isnull (cast (pthproto.pthdbo.cnaaddr.component2 as varchar (100)),'') + ' ' + isnull (cast (pthproto.pthdbo.cnaaddr.component3 as varchar (100)),'') + ' ' + isnull (cast (pthproto.pthdbo.cnaaddr.component4
    as varchar (100)),'') + ' ' + isnull (cast (pthproto.pthdbo.cnaaddr.component5 as varchar (100)),'') as mailaddress, row_number() over(partition by pthproto.pthdbo.cnarole.tpkcnarole order by cnaidta.dateeffect desc) as rn into #address from pthproto.pthdbo.cnarole
    inner join pthproto.pthdbo.cnaidty on cnarole.tfkcnaidty =cnaidty.tpkcnaidty inner join pthproto.pthdbo.cnaidta on cnaidty.tpkcnaidty = cnaidta.tfkcnaidty inner join pthproto.pthdbo.cnaaddr on cnaidta.tfkcnaaddr = cnaaddr.tpkcnaaddr order by cnaidta.dateeffect
    select *, case when mailaddress is not null then mailaddress else formataddr end as test from #address where tpkcnarole = '18306695'
    The case when statement is struggling with how i have created the column mailaddress.  As it does seem to understand when it is null.  In the example I have got there is no value in any of the columns to create
    the mailaddress.  Hence why I am referencing it from elsewhere.  Due to having a way on the system where it picks up data from 2 different places.    The mailaddress is always correct if there is one, hence why
    trying to reference that one first.  So how do i change this case when statement to work ?            

    It's ok I have fixed my own problem
    when
    (mailaddress
    is
    null 
    or mailaddress

    then formataddr
    else mailaddress
    end
    as test
    case

  • Active state not working in scrolling site (with anchor links)

    I'm design a scrolling site with anchor links and an horizontal menu on the top.
    when i publish the site and click on the menu buttons the site scrolling to the place of the anchor but the active state in the menu is not working.
    now... when i leave the main page (were the scrolling site is) and then return back to it all active states are working perfectly
    anyone have this bug? or any one know how to fix it ?

    Hmmm...I've just been playing around, and I think I got the Active State to work correctly.  I think my problem was not understand what Active State means.
    To answer your question, I was changing the Font Color and Box Fill Color of the Active State.
    I did not understand that Active State means the look of the Menu Item when the PAGE is active.  I thought it meant the look of the Menu item when the cursor is scrolling down the Menu (i.e. when the MENU is Active, not the page).
    Look at this page for an example of what I'm trying to achieve...
    http://www.pgavdestinations.com
    When you hover over the "Work" menu item, and move the cursor down the menu, the state of "Work" remains changed until you move the cursor off of that menu column. It does NOT return back to it's Normal state until you are off of that menu column.
    Is there a way to achieve this with the menu states in Muse?
    Thanks for the replies!
    Dave.

  • SELECT INTO ( variable ) STATEMENTS NOT WORKING FOR SYBASE TABLE AS VIEW

    Dear Experts,
    We have connected our 9i db with Sybase db using Hs connectivity.
    and then we have create the view in oracle db for SYBASE_TABLE as SYBASE_TABLE_VIEW.
    ALL THE INSERT, UPDATE AND DELETE COMMANDS ARE WORKING BUT THE
    select Into (variable) is not working.
    Please help to resolve the select into statment which is in BOLD in the below routine
    PLEASE NOTE! FORM WAS COMPILED SUCCESSFULLY AND FORM IS RUNNING BUT SELECT INTO COMMAND IS NOT WORKING.
    Thanks & Regards
    Eidy
    PROCEDURE SRBL_INSERT IS
    CURSOR SRBL IS
         SELECT impno,impcod,impnam
         from oracle_table1 a, oracle_table2 b
         WHERE a.impcod=b.empcod
         v_srpcod varchar2(5);
    BEGIN     
    FOR rec in SRBL loop     
         begin
    select "im_code" into v_impcod                    
         from SYBASE_TABLE_VIEW
         where "im_code"=rec.impcod;
    exception when no_data_found then
         v_srpcod:=null;
    end;
    END LOOP;
    END;
    Edited by: Eidy on Aug 16, 2010 11:28 AM

    hellow
    try this.
    select "im_code" into v_impcod
    from SYBASE_TABLE_VIEW
    where "im_code"=rec.impcod;
    v_srpcod := v_impcod ;
    ........

  • Import/Export statement  not working..

    Hi all,
       I want to export some data from BADI & Import it back in user exit.
    I wrote following line of code in BADI
           export P1 FROM xstr to memory id 'ZABHI'.
    & following line of code in User Exit
          import P1 to xstr FROM memory id 'ZABHI'.
    After export sy-subrc becomes 0 hence export statement is working fine but when aftr import xstr remains blank.(sy-subrc = 4)
    I tried to execute same code in single ztest abap program & it works fine there.
    Thanks in advance.

    hi abhijeet,
    you are most welcome....
    to delete, use
    ** deletes the data to save wastage of memory
    delete from database indx(xy)
      client sy-mandt
      id 'ZABHI'.
    you need to delete it coz, its available to all programs in the R/3
    server via the ID and you don't want anybody to view the data u are
    sending into memory.
    the statement that u used earlier was program specific and hence
    not accessible to the user exit.
    Regards,
    Samson Rodrigues.

  • Hide statement not working

    Hi experts,
    i am using hide statement but it is not working..The problem with it is that after line selection the variable on which i have used hide is carrying the last value of internal table always..<< Removed >>
    Regards,
    Raman
    Edited by: Rob Burbank on Jun 30, 2009 10:41 AM

    I am sending a test program with same problem...iin this after line selection the field variable emp-name is displayin only last entry of internal table...
    *& Report  ZBASICX12
    REPORT  ZBASICX12.
    INITIALIZATION.
      DATA: BEGIN OF ITAB OCCURS 0,
            EMPID  TYPE ZTEMP-EMPID,
            EMPNAME TYPE ZTEMP-EMPNAME,
            END OF ITAB.
    START-OF-SELECTION.
      SELECT EMPID EMPNAME FROM ZTEMP INTO TABLE ITAB.
      SORT ITAB BY EMPID.
      LOOP AT ITAB.
        WRITE: / ITAB-EMPID HOTSPOT.
        HIDE ITAB-EMPID.
      ENDLOOP.
    END-OF-SELECTION.
    AT LINE-SELECTION.
      CASE SY-LSIND.
        WHEN 1.
          WRITE: ITAB-EMPNAME.
      ENDCASE.

  • UPDATE statement not working

    Hi,
    I want to modify the record of PA0009 .I want to change the enddate of personnel No.
    UPDATE PA0009 SET ENDDA = '30.10.2009'
                  WHERE PERNR = '1'
                  AND BEGDA =  '01.09.2008'.
    The above statement is not working. How to modify the enddate which is part of key table.
    Please guide.
    Thanks and Regards
    K Srinivas

    Hello,
    Set the data format to the internal date format (YYYYMMDD), so in the set and the where clause pass '20091030' as ENDA which is to be changed and BEGDA in the where clause as 20080901. Also if the after the changes if the key combination results in dupicate records then the update will faiil. Just make sure that the combination of PERNR,SUBTY,OBJPS,SPRPS,ENDDA, BEGDA and SEQNR remains unique, if a record exists with this combination then sy-subrc will be 4 and the record will not be updated.
    Regards,
    Sachin

  • Collect statement not working

    Hi,
               My collect statement is not working. Kindly let me know what is the other way to add one filed in the loop.
    thanks
    Moderator message - Please ask a specific question - post locked
    Edited by: Rob Burbank on Nov 19, 2009 9:24 AM

    Same thing i faced few days ago --. i have resolved this using following logic ... try this it will workout
    CLEAR: wa_mkpf_mseg, w_werks, w_matnr, w_lgort, w_bwart.
    LOOP AT t_mkpf_mseg INTO wa_mkpf_mseg.
    IF wa_mkpf_mseg-werks EQ w_werks AND wa_mkpf_mseg-matnr EQ w_matnr AND wa_mkpf_mseg-lgort EQ w_lgort AND wa_mkpf_mseg-bwart EQ w_bwart.
    CLEAR: wa_p_coi.
    READ TABLE t_p_coi INTO wa_p_coi WITH KEY werks = wa_mkpf_mseg-werks matnr = wa_mkpf_mseg-matnr lgort = wa_mkpf_mseg-lgort bwart = wa_mkpf_mseg-bwart.
    IF sy-subrc = 0.
    wa_p_coi-Avg Days = wa_p_coi-Avg Days + wa_mkpf_mseg-Avg Days.
    MODIFY t_p_coi FROM wa_p_coi TRANSPORTING Avg Days .
    CLEAR: wa_p_coi, wa_p_coi.
    endif.
    ELSE.
    wa_p_coi-werks = wa_mkpf_mseg-werks.
    wa_p_coi-matnr = wa_mkpf_mseg-matnr.
    wa_p_coi-bwart = wa_mkpf_mseg-bwart.
    wa_p_coi-lgort = wa_mkpf_mseg-lgort.
    wa_p_coi-Avg Days = wa_mkpf_mseg-Avg Days .
    APPEND wa_p_coi TO t_p_coi.
    CLEAR: wa_p_coi.
    ENDIF.
    w_werks = wa_mkpf_mseg-werks.
    w_matnr = wa_mkpf_mseg-matnr.
    w_lgort = wa_mkpf_mseg-lgort.
    w_bwart = wa_mkpf_mseg-bwart.
    CLEAR: wa_mkpf_mseg.
    ENDLOOP.

  • MDX simple case statement not working?

    hi all - any idea what is wrong with this MDX statement? it is returning blank. I am trying to add a calculated measure using the below code but it is not working. thanks for the help.
    CASE WHEN [Accounts].[Account Name].CURRENTMEMBER = "Cash" THEN
    ([Dates].[Hierarchy].currentMember.lastChild, [Measures].[Measures].[Amount]) END

    If you are checking for the 'Cash' member of the Account Name hierarchy, do you need to do something like this?
    CASE WHEN [Accounts].[Account Name].CURRENTMEMBER IS [Accounts].[Account Name].[Cash] THEN([Dates].[Hierarchy].currentMember.lastChild, [Measures].[Measures].[Amount]) END
    Regards,
    MrHH

  • SQL Statement not works using functions or subqueries-MAXDB

    Hello All,
    I created an ABAP program to select information about country(table: T005) with the country names (Table: T005T). I tried to create a sql query with a sql subquery to select everything but for some reason that I don't know it doesn't work. Please find the query below.
    DATA:
    resu        TYPE REF TO cl_sql_result_set ,
    stmt         TYPE REF TO cl_sql_statement ,
    qury        TYPE string .
               qury  = `SELECT land1, spras, `
               &&       `(SELECT landx `
               &&         `FROM SAPNSP.T005T `
               &&         `WHERE mandt = '` && sy-mandt && `' `
               &&           `AND spras = 'EN' `
               &&           `AND land1 = ? ), `
               &&       `(SELECT natio `
               &&         `FROM SAPNSP.T005T `
               &&         `WHERE mandt = '` && sy-mandt && `' `
               &&           `AND spras = 'EN' `
               &&           `AND land1 = ? ) `
               &&        `FROM SAPNSP.T005 `
               &&        `WHERE mandt = '` && sy-mandt && `' `
               &&          `AND land1 = ? `
               &&        `GROUP BY land1, spras` .
    resu = stmt->execute_query( qury ) .
    Well, the query above works but the fields LANDX and NATIO are in blank in ALL THE CASES, even with information registred in table T005T.
    So, exploring the SDN forum and after read some documents regarding ADBC, I create a function to handle this sql select and get the correctly the missing informations, but, still don't work. Please find the function below:
    CREATE FUNCTION select_landx (land1 CHAR(3)) RETURNS CHAR(15)
    AS
      VAR landx CHAR(15);
      DECLARE functionresult CURSOR FOR
      SELECT spras, land1, landx
         FROM SAPNSP.t005t
         WHERE spras = 'EN'
             AND land1 = :land1;
         IF $count IS NULL THEN <- | $count is always 0, my SELECT
           BEGIN                                 it's not work but I don't know why
             CLOSE functionresult;
             RETURN NULL;
           END
         ELSE
           SET $rc = 0;
           WHILE $rc = 0 DO
           BEGIN
             FETCH functionresult INTO :landx;
           END;
         CLOSE functionresult;
         RETURN landx;
    Calling the function in a SQL statement:
    DATA:
    resu        TYPE REF TO cl_sql_result_set ,
    stmt         TYPE REF TO cl_sql_statement ,
    qury        TYPE string .
               qury  = `SELECT land1, spras, select_landx(?) landx `
               &&        `FROM SAPNSP.T005 `
               &&        `WHERE mandt = '` && sy-mandt && `' `
               &&          `AND land1 = ? `
               &&        `GROUP BY land1, spras` .
    resu = stmt->execute_query( qury ) .
    Any comments ?
    Best regards,
    Arthur Silva

    Hello,
    Thank's a lot, it works. It's funny because the given solution works using only abap codes.
    It may be happens because the abap interpretor send the sql statement to the db interface that handle the code in the another way.
    Thanks again, it was driving me crazy.
    Best regards,
    Arthur Silva

  • USB Keyboard not working after running Monolingual

    Okay, I'm not a Mac person and should have known that I was going to mess up my mother's iMac, but here it is -
    In an attempt to improve the mac's performance I performed all of the actions described in the following article: 11 Ways to Optimize your Mac's Performance     ( http://lowendmac.com/eubanks/07/0312.html ). Basically, I cleaned up files and 'other' system preferences. Things seemed to be fine and the computer did run much better. However, after running Monolingual and deleting what I understood to be 'unnecessary' PowerPC files the standard USB keyboard is no longer working.
    I've tried to search for various remedies, but have come to a dead end. So I'm left with reinstalling the Snow Leopard OS (I think it is 10.6.8?) BUT I can't because it is asking to input the account password (which I know) to make the change and I can't figure how to do that when the keyboard not working.
    Any help would be great!
    *feeling like a bone head*

    How are you trying to reinstall Snow Leopard? If you're booting from the Snow Leopard or iMac Install DVD that came with the system then that should eliminate any of the issues you may or may not have caused when you deleted did the clean up work on your mom's system.
    I suggest trying the following:
    0) Verify that the caps lock key is off. It can make inputting passwords difficult if you don't realize it is ON.
    1) Reset the PRAM by restarting the system then quickly press the command-option-P-R keys before the gray screen appears. Wait until you hear the computer restarts two times as indicated by the startup chime. For more info refer to http://support.apple.com/kb/ht1379.
    2) If the issue persists after the PRAM reset then boot from the Snow Leopard or iMac Install DVD, whichever you have. Once you see the menu asking you to choose a language try using the arrow keys on the keyboard to move the language choice selection. If the arrow keys are working at this point it indicates your keyboard is at least partially functional. Go ahead and select the language then proceed to step 3.
    3) Once the next screen appears move the cursor up to the menu bar area and pull down the Utilities menu. Select the 'Terminal' application. Once the Terminal application launches try typing the various keys on the keyboard and check to see if the correct characters are displayed. Please let us know if you detect any errors. If there are no errors then you should be able to quit the Terminal application and proceed with reintstalling the OS.

Maybe you are looking for