How would you write a code to automate this??

Hi team,
Still trying to improve my coding..
So I have got all of these buttons... how would I go about coding so I dont have this function repeated 100 times??
Cheers,
Sub
e.g.
GSmain.gsshape.gss1.gssr.gssr1.addEventListener(MouseEvent.CLICK, page2go)
function page2go(e:MouseEvent){
          gotoAndStop(2);
GSmain.gsshape.gss1.gssr.gssr2.addEventListener(MouseEvent.CLICK, page3go)
function page3go(e:MouseEvent){
          gotoAndStop(3);
GSmain.gsshape.gss1.gssr.gssr3.addEventListener(MouseEvent.CLICK, page3go)
function page3go(e:MouseEvent){
          gotoAndStop(4);
etc etc

// loop from 1 to 100
for(var i:int=1;i<=100;i++){
// use array notation to coerce flash to convert strings to objects
GSmain.gsshape.gss1.gssr["gssr"+i].addEventListener(MouseEvent.CLICK, pagego)
function pagego(e:MouseEvent){
// gssr1,gssr2,etc are all currentTarget event dispatchers. one of them called this function.  to find which, use the flash string methods.
// e.currentTarget.name is a string like "gssr1","gssr2",...,"gssr100"
// the String.substring(n) method returns a substring of String starting at index n.
// so e.currentTarget.name.substring(4) is "1","2",...,"100" depending on which object was clicked
// int("n"), converts a string to an int for use in the gotoAndStop() method:
          gotoAndStop(int(e.currentTarget.name.substring(4)));

Similar Messages

  • How would you write a "wildcard" in a filefilter?

    How would you go about to have a wildcard instead of the "*" in the following filefilter;
              File[] files = new File("./resultat/resultat_" + "*" + "_" + index[0]).listFiles (new FileFilter () {
                    public boolean accept (File file) {
                        return ! file.isDirectory ();
              });All help appriciated
    - Karl XII

    Shouldn't "a*" accept all files that begins with "a" and ends with whatever?No. "*" in regexp is a not a wildcard match. Instead it matches one or more instances of the preceeding
    value.
    Therefore "a*" will match "a", "aa", "aaa", "aaaa" etc but will not match anything which does not end in
    an "a".
    The following might help you out. (not the most elegent expression but it will do
    import java.util.regex.*;
    public class RegExp{
      public static void main(String[] args) {
      Pattern p = Pattern.compile("a*b");     
      Matcher m = p.matcher("aaaab");     
      System.out.println(m.matches());                    
      // interesting bit here
      // match one or more occurances of any characters in the ASCII charset  (the \\p{ASCII}* bit   
      p = Pattern.compile("hello_\\p{ASCII}*_b");     
      m = p.matcher("hello_wibble_b");     
      System.out.println(m.matches());
    }

  • How would you write tthis oracle sql in ABAP. Thank you verry verry much

    SELECT
    to_char(sum(dmbtr)),s.budat,shkzg,hkont
    FROM
    sapr3.bsas s,
    sapr3.bkpf k
    WHERE
    s.belnr=k.belnr AND s.gjahr=k.gjahr AND s.bukrs=k.bukrs AND k.bukrs='02' AND k.gjahr>=EXTRACT(YEAR FROM ADD_MONTHS(SYSDATE,-12)) GROUP BY s.budat,shkzg,hkont;

    GO THRU THE JOINS IN SELECT STATEMNET IN ABAP.
    I JOINED FOUR TABLES WITH DECLARED FIELDS.
    DATA: BEGIN OF I_KNA1 OCCURS 1,
          KUNNR LIKE KNA1-KUNNR,
          LAND1 LIKE KNA1-LAND1,
          NAME1 LIKE KNA1-NAME1,
          ORT01 LIKE KNA1-ORT01,
          END OF I_KNA1.
    DATA: BEGIN OF I_VBAK OCCURS 1,
          KUNNR LIKE VBAK-KUNNR,
          VBELN LIKE VBAK-VBELN,
          ERDAT LIKE VBAK-ERDAT,
          ERNAM LIKE VBAK-ERNAM,
          END OF I_VBAK.
    DATA: BEGIN OF I_VBAP OCCURS 1,
          VBELN LIKE VBAP-VBELN,
          POSNR LIKE VBAP-POSNR,
          MATNR LIKE VBAP-MATNR,
          CHARG LIKE VBAP-CHARG,
          END OF I_VBAP.
    DATA: BEGIN OF I_MARA,
          MATNR LIKE MARA-MATNR,
          MBRSH LIKE MARA-MBRSH,
          MTART LIKE MARA-MTART,
          MEINS LIKE MARA-MEINS,
          END OF I_MARA.
    DATA: BEGIN OF I_DEST OCCURS 1,
          KUNNR LIKE KNA1-KUNNR,
          LAND1 LIKE KNA1-LAND1,
          NAME1 LIKE KNA1-NAME1,
          ORT01 LIKE KNA1-ORT01,
          VBELN LIKE VBAK-VBELN,
          ERDAT LIKE VBAK-ERDAT,
          ERNAM LIKE VBAK-ERNAM,
          POSNR LIKE VBAP-POSNR,
          MATNR LIKE VBAP-MATNR,
          CHARG LIKE VBAP-CHARG,
          MBRSH LIKE MARA-MBRSH,
          MTART LIKE MARA-MTART,
          MEINS LIKE MARA-MEINS,
          END OF I_DEST.
    SELECT KKUNNR KLAND1 KNAME1 KORT01 VVBELN VERDAT VERNAM PPOSNR
    PMATNR PCHARG INTO TABLE I_DEST FROM KNA1 AS K INNER JOIN VBAK AS V ON
    KKUNNR = VKUNNR INNER JOIN VBAP AS P ON VVBELN = PVBELN INNER JOIN
    MARA AS M ON PMATNR = MMATNR.
    LOOP AT I_DEST.
    WRITE: / I_DEST-KUNNR, I_DEST-LAND1, I_DEST-NAME1, I_DEST-ORT01,
    I_DEST-VBELN, I_DEST-ERDAT, I_DEST-ERNAM, I_DEST-POSNR, I_DEST-MATNR,
    I_DEST-CHARG, I_DEST-MBRSH, I_DEST-MTART, I_DEST-MEINS.
    ENDLOOP.
    CHEERS.

  • How would you write this query efficiently?

    I am having a problem doing a particular join in the most optimal fashion, and this kind of join I do often, so I'd like to learn the best way to do it so I can re-use the same logic every time and be comfortable that it is the most efficient means.
    I am using Oracle 11g, and the situation goes like this -- well actually there is a variation of this particular situation, I'll explain the easier one first):
    Table PARENT (
    PARENT_ID NUMBER [PK],
    (OTHER IRRELEVANT DATA COLUMNS)
    Table CHILD (
    CHILD_ID NUMBER [PK],
    PARENT_ID NUMBER,
    CHILD_VALUE VARCHAR2(50),
    START_DATE DATE NULL(NO),
    END_DATE DATE NULL(YES)
    I want to query from PARENT, joining to CHILD when possible (e.g. an outer join) but I only want the MOST RECENT record. MOST RECENT means that it is the record with the latest START_DATE, which is a column that cannot be NULL.
    I usually try a query where I make a inner SELECT in the FROM clauses, then do an outer join against it. But this seems ot be a terrible practice that slows the query down drastically, because looks like the DB analyzes that sub query for the entire DB before joining on my particular result set. Like the main query might filter it down very quickly to a small set of records, but that sub query still analyzes the entire table then joins to my subset. So something like this:
    SELECT
    p.(WHATEVER COLUMNS FROM PARENT),
    x.CHILD_VALUE,
    x.START_DATE,
    x.END_DATE
    FROM PARENT p,
    (SELECT c1.PARENT_ID, c1.CHILD_VALUE, c1.START_DATE, c1.END_DATE
    FROM CHILD c1
    WHERE c1.START_DATE = (SELECT MAX(START_DATE) FROM CHILD)
    ) x
    WHERE
    p.(FILTERING ON PARENT)
    AND x.PARENT_ID(+) = p.PARENT_ID
    Then a variation of this is that the CHILD table has one other column:
    CHILD_TYPE (NUMBER)
    And I need to join on the CHILD getting the MOST RECENT record for each CHILD_TYPE... for this I do two inner queries usually, and again I know its not the right way to do it.

    with most_recent_child as (
                               select  *
                                 from  (
                                        select  c.*,
                                                row_number() over(partition by parent_id order by start_date desc) rn
                                                from  child c
                                 where rn = 1
    select  *
      from      parent p
            left join
                most_recent_child c
              on p.parent_id = c.parent_id
    /SY.

  • How would you code a 3D transform within an mxml?

    How would you code a group of individual text objects, which
    as an associated group, would scroll like the proverbial opening
    Star Wars story description?
    Thanks,
    Pete

    How would you code a group of individual text objects, which
    as an associated group, would scroll like the proverbial opening
    Star Wars story description?
    Thanks,
    Pete

  • How can we write the code for opening the command prompt and closing the

    how can we write the code in java for opening the command prompt and closing the cmd prompt from eclipse (cmd prompt should close when click on the turminate button in eclipse)

    rakeshsikha wrote:
    how can we write the code for opening the command prompt and closing theBy typing in Eclipse (which you seemingly have)?

  • How can i write a code to get sume of value from days.

    Hi,
    how can i write a code to get the sum of value of days(example 1 to 30).
    This is in BPS ...
    i created multi planning area and creted planning function with {keyfigure name,planning area,days}.
    now i want to read all the actual values  from basic planing area(basic cube) and calculate the sum of the value.if you have idea can you share the code.
    ENTRIES = VARC ( 'zvardays' ).     ex(zvardays like 28 days or 29 days or 30 days or 31 days)
    COUNT = ENTRIES.
    *Get the all the days value from actual
    FOREACH PAREA = 'basic planning area'.
      COUNT = 1.
    DO
         SUM = SUM + {amount, count}      (amount is a keyfirgure value)
    ENDDO.
    COUNT = COUNT+1.
       SUMACT =  SUM.
    ENDFOR.
    can you correct the above code ....to read the values and sum of the those value.
    Thanks...

    Hi ..
    That is ok..
    Can you provide sample code for my requirement..
    and also how can i pass the error message (can you help me syntax )
    and if my acutal-total  is not equal to plan-total  then
    i have to pass the error message and then  i have to restrict save the data  how i can i restrict(user can not save the data until the values should be equal) .
    Can you help me it is very urgent..
    thanks.//
    Edited by: Eyda rose on Jun 4, 2008 9:29 PM

  • How can I write HTML code in this forums

    Sorry but I didn't know where to post this thread.....
    How can I write HTML code in this forums?

    Hello,
    Every piece of code in your post should be wrapped with the forum tags [ code] and [ /code], without the blanks.
    In case of the &lt;a> tag, that is not enough. In this case, you have several options. The most elegant one is to use the entity name for the less-then sign - & lt; - without any spaces. Other options is to add a space between the less-then and the ‘a’ character (and make a note of it) or change the less-then character with a left bracket one.
    When posting code, you should always use the forum preview option, just to make sure the forum software “understood” your code correctly.
    Hope this helps,
    Arie.

  • How would you pass more than 255 args?

    I have an SFTP program that currently is only passed a single file. I am modifying it so that it will loop though an array of files to simulate an mput command. Originally I was just going to call the program with each file to be transferred as an argument but noticed the 255 argument limit. I am looking at potentially having 1500 - 2000 files to transfer at one time. I am just looking for advice on how this should be designed. One idea that was forwarded to me was to just create a listing of the files on the server and use that list file as my argument. Would this be the best approach for this issue?

    sdhalepaska wrote:
    georgemc wrote:
    sdhalepaska wrote:
    georgemc wrote:
    sdhalepaska wrote:
    georgemc wrote:
    I see no reason why you need an argument for every file.I would not necessarily need one for every file. Prior to our needing to use this for multiple files, it was easy enough to pass in one file as an argument. That is my question, how would you try to pass in a long list of files?Let's establish what you are concerned about. The 255 argument limit is on method signatures. From what you're saying here, you're talking about arguments being passed into your application from, say, the shell. Am I right?Correct, please see my clarified post. From what I have tested, the 255 argument limit appears to exist even for arguments passed to main.Ah, but arguments passed to main from the command line are passed into main as a single array of Strings, no matter how many of them there are. I have no idea what the limit on those is, but an array can hold millions of elements. I expect your shell will moan about that many, though.
    As I see it, you have a few choices. Unless these files are all in different, arbitrary directories, you can specify a list of directories for your app to search. Or you can pass them all in one at a time, and see how you go. Or you can list them in a text file, pass that to your app and have it work them out. Or write a script that invokes your app multiple times. What you don't need, is a method that takes each file as an argument.Thank you for walking me through this. Would you mind telling me which way you would lean if you were designing this? The files will all be in a single directory on the server and I would not like to invoke the app multiple times as it creates a connection during each invocation. They're all in the single directory. Ok, are all the files in that directory to be transferred? If so, I'd just pass the directory name to the app, and have it iterate over all the files. If it's only to be certain ones, how do you know which ones? Is there some regex or filtering you can do on the command line?
    If you are interested, the 255 argument limit for main that I tested was from this article:
    [http://www.javaspecialists.eu/archive/Issue059.html|http://www.javaspecialists.eu/archive/Issue059.html]
    It does die at 255 using Java 1.5.Like I said, arguments to a method are thus limited. But the args passed to an app are passed to main as one argument - an array. In short, that article is not relevant to your problem.

  • How would you go about saving an online image locally?

    Say if you knew the url such as http://www.yahoo.com/img.jpg
    How would you save this locally?

    Read the answer in your previous posting:
    http://forum.java.sun.com/thread.jspa?threadID=772451
    Use the file as an InputStream to read the data and then use an OutputStream to write the file.
    The logic is the same as reading and writing a file from disk once you have the InputStream.

  • How would you go about limiting file upload

    I don't need source code, just want to know if it's possible or how to go about limiting how many files a user can upload.
    So far
    I can limit what types of files get uploaded.
    I can limit how big those files can be.
    Is it possible, or how would you go about limiting how many files get sent?
    - When the user does a browse they can select multiple files.

    This is the best that I can come up with.
    Ripped from adobe cookbooks
    var fileList:Array = fileReferenceList.fileList;
    if( fileList.length > 4 )
        Alert.show("Too many files" , "Please try again with 4 or less files");
    else
       for (var i:Number=0; i<fileList.length; i++)
           var file:FileReference = FileReference(fileList[i]);
           arrayCollection.addItem({name:file.name, size:file.size, object:file})
    If this post was helpful , please mark it as such.

  • How do you write a deterministic clause?

    How do you write / code a deterministic clause? I was told to use it instead of Target buckets
    Thanks,

    This is my target_bucket function. I have been trying to create a rewrite enabled materialized view and I have been able to do that. I was told to use a deterministic clause to be able to make the code into a re-write enable materialized view.
    THIS IS THE TARGET BUCKET CODE / FUNCTION.
    GRP_OR_BCKT_IN CHAR, -- 'G' or 'B'
    PTD_OR_RESV_IN CHAR, -- 'P' or 'R'
    CLM_KIND_IN CHAR,
    CODE_IN CHAR,
    PTD_1 NUMBER,
    PTD_2 NUMBER,
    PTD_3 NUMBER,
    PTD_4 NUMBER,
    PTD_5 NUMBER,
    PTD_6 NUMBER,
    PTD_7 NUMBER,
    PTD_8 NUMBER,
    PTD_9 NUMBER)
    RETURN NUMBER IS
    TEMP NUMBER := 0;
    BEGIN
    SELECT /*+ INDEX(INDICATOR_SUM IDX_INDICATOR_SUM_GRP)*/
    SUM(DECODE(INDICATOR_SUM.INDICATOR,
    1, PTD_1,
    2, PTD_2,
    3, PTD_3,
    4, PTD_4,
    5, PTD_5,
    6, PTD_6,
    7, PTD_7,
    8, PTD_8,
    9, PTD_9,
    0)) INTO TEMP
    FROM INDICATOR_SUM WHERE
    INDICATOR_SUM.GRP_OR_BCKT = GRP_OR_BCKT_IN AND
    INDICATOR_SUM.PTD_OR_RESV = PTD_OR_RESV_IN AND
    INDICATOR_SUM.CLM_KIND = CLM_KIND_IN AND
    INDICATOR_SUM.CODE = CODE_IN;
    RETURN NVL(TEMP,0);
    EXCEPTION
    WHEN OTHERS THEN
    RETURN 0;
    END;
    This is what I've been trying to do with no LUCK AT ALL.
    CREATE MATERIALIZED VIEW M_reserve
    TABLESPACE mviews_TS
    BUILD IMMEDIATE
    Enable query rewrite
    AS
    SELECT
    Reserve.clm_seq_id_fk as clm_seq_id,
    PID.PID_NBR AS PARENT_ID,
    PID.PID_NAME AS PID_NAME,
    ACCT.ACCT_NBR AS ACCOUNT_NBR,
    ACCT.ACCT_NAME AS ACCOUNT_NAME,
    CLAIM_1.CLM_NBR AS CLAIM_NBR,
    CLAIM_1.CLM_SUFFIX AS CLAIM_SUFFIX,
    ACCT_LOI.LOI AS LOI,
    CLAIM_1.CLM_KIND AS CLAIM_KIND,
    CLAIM_1.ST_CLM_NBR AS STATE_CLAIM_NBR,
    ACCT_LOI.RISK_NBR AS RISK_NBR,
    ACCT_LEVEL1.LEVEL_1 AS LOCATION_1,
    ACCT_LEVEL1.LEVEL_NAME AS LOCATION_1_NAME,
    ACCT_LEVEL2.LEVEL_2 AS LOCATION_2,
    ACCT_LEVEL2.LEVEL_NAME AS LOCATION_2_NAME,
    ACCT_LEVEL3.LEVEL_3 AS LOCATION_3,
    ACCT_LEVEL3.LEVEL_NAME AS LOCATION_3_NAME,
    ACCT_LEVEL4.LEVEL_4 AS LOCATION_4,
    ACCT_LEVEL4.LEVEL_NAME AS LOCATION_4_NAME,
    ACCT_LEVEL5.LEVEL_5 AS LOCATION_5,
    ACCT_LEVEL5.LEVEL_NAME AS LOCATION_5_NAME,
    SERV_OFC.SERV_OFC AS SERV_OFC,
    SERV_OFC.SERV_OFC_NAME AS SERV_OFC_NAME,
    CLAIM_1.BEN_ST AS BENEFIT_ST,
    CLAIM_1.CLM_TYPE AS CLAIM_TYPE,
    CLAIM_1.OPN_CLSD AS OPEN_CLOSED,
    SUBSTR(CLAIM_1.CLM_STAT,1,5) AS CLAIM_STATUS,
    CLAIM_1.CLMT_LST_NAME AS CLMNT_LAST_NAME,
    CLAIM_1.CLMT_FIRST_NAME AS CLMNT_FIRST_NAME,
    CLAIM_1.CLMT_MID_INIT AS CLMNT_MIDDLE_INITIAL,
    CLAIM_2.CLMT_ADDR1 AS CLMNT_ADDR1,
    CLAIM_2.CLMT_ADDR2 AS CLMNT_ADDR2,
    CLAIM_2.CLMT_CITY AS CLMNT_CITY,
    CLAIM_2.CLMT_ST AS CLMNT_ST,
    CLAIM_2.CLMT_ZIP_CD AS CLMNT_ZIP_CD,
    CLAIM_2.CLMT_CNTRY AS CLMNT_CNTRY,
    CLAIM_1.CLMT_SSN AS CLMNT_SSN,
    CLAIM_1.DT_INJ AS DATE_OF_INJURY,
    CLAIM_1.DT_RPT_EMPLR AS DATE_RPT_TO_EMPLOYER,
    CLAIM_1.DT_RECV AS DATE_RCVD_BY_GMCD,
    CLAIM_1.DT_INPT AS DATE_CLAIM_ENTERED,
    CLAIM_1.DT_CLSD AS DATE_CLAIM_CLOSED,
    CLAIM_1.DT_LST_ACTVY AS DATE_OF_LAST_ACTIVITY,
    CLAIM_1.DT_REOPN AS DATE_REOPENED,
    CLAIM_1.INJ_CAUSE AS INJ_CAUSE_CD,
    IJCA_DESC.TBL_DESC AS INJ_CAUSE_DESC,
    CLAIM_1.PART_OF_BODY AS POB_CD,
    IJPB_DESC.TBL_DESC AS POB_DESC,
    CLAIM_1.NATR AS INJ_NATURE_CD,
    IJNT_DESC.TBL_DESC AS INJ_NATURE_DESC,
    CLAIM_1.AGCY AS AGENCY_CD,
    AGAL_DESC.TBL_DESC AS AGENCY_DESC,
    CLAIM_1.MANL_CLSR_REQR AS MANUAL_CLASS_NBR,
    CLAIM_1.REC_ONLY AS RECORD_ONLY_FLAG,
    CLAIM_1.SEX AS SEX,
    NVL(DECODE(CLAIM_1.AGE,0,NULL,CLAIM_1.AGE),
    TRUNC((CLAIM_1.DT_INJ - CLAIM_1.DT_BIRTH) / 365.25))
    AS AGE,
    CLAIM_1.TIME_EMPLD AS TIME_EMPLOYED,
    CLAIM_1.DT_MED_TO_INDM AS DATE_MED_CHG_TO_IND,
    CLAIM_1.DT_INDM_TO_MED AS DATE_IND_CHG_TO_MED,
    TARGET_BUCKET('G','R',
    DECODE(PID.CONV_FLAG,'Y',CLAIM_1.CLM_KIND,'WC00'),
    '200',
    RESERVE.RESV_1,
    RESERVE.RESV_2,
    RESERVE.RESV_3,
    RESERVE.RESV_4,
    RESERVE.RESV_5,
    RESERVE.RESV_6,
    RESERVE.RESV_7,
    RESERVE.RESV_8,
    RESERVE.RESV_9) AS RESV_MEDICAL,
    TARGET_BUCKET('G','R',
    DECODE(PID.CONV_FLAG,'Y',CLAIM_1.CLM_KIND,'WC00'),
    '201',
    RESERVE.RESV_1,
    RESERVE.RESV_2,
    RESERVE.RESV_3,
    RESERVE.RESV_4,
    RESERVE.RESV_5,
    RESERVE.RESV_6,
    RESERVE.RESV_7,
    RESERVE.RESV_8,
    RESERVE.RESV_9) AS RESV_INDEMNITY,
    TARGET_BUCKET('G','R',
    DECODE(PID.CONV_FLAG,'Y',CLAIM_1.CLM_KIND,'WC00'),
    '202',
    RESERVE.RESV_1,
    RESERVE.RESV_2,
    RESERVE.RESV_3,
    RESERVE.RESV_4,
    RESERVE.RESV_5,
    RESERVE.RESV_6,
    RESERVE.RESV_7,
    RESERVE.RESV_8,
    RESERVE.RESV_9) AS RESV_EXPENSES,
    TARGET_BUCKET('G','R',
    DECODE(PID.CONV_FLAG,'Y',CLAIM_1.CLM_KIND,'WC00'),
    '203',
    RESERVE.RESV_1,
    RESERVE.RESV_2,
    RESERVE.RESV_3,
    RESERVE.RESV_4,
    RESERVE.RESV_5,
    RESERVE.RESV_6,
    RESERVE.RESV_7,
    RESERVE.RESV_8,
    RESERVE.RESV_9) AS RESV_RECOVERABLE,
    TARGET_BUCKET('G','R',
    DECODE(PID.CONV_FLAG,'Y',CLAIM_1.CLM_KIND,'WC00'),
    '204',
    RESERVE.RESV_1,
    RESERVE.RESV_2,
    RESERVE.RESV_3,
    RESERVE.RESV_4,
    RESERVE.RESV_5,
    RESERVE.RESV_6,
    RESERVE.RESV_7,
    RESERVE.RESV_8,
    RESERVE.RESV_9) AS RESV_PROPERTY_DAMAGE,
    TARGET_BUCKET('G','R',
    DECODE(PID.CONV_FLAG,'Y',CLAIM_1.CLM_KIND,'WC00'),
    '205',
    RESERVE.RESV_1,
    RESERVE.RESV_2,
    RESERVE.RESV_3,
    RESERVE.RESV_4,
    RESERVE.RESV_5,
    RESERVE.RESV_6,
    RESERVE.RESV_7,
    RESERVE.RESV_8,
    RESERVE.RESV_9) AS RESV_BODILY_INJURY,
    TARGET_BUCKET('G','R',
    DECODE(PID.CONV_FLAG,'Y',CLAIM_1.CLM_KIND,'WC00'),
    '206',
    RESERVE.RESV_1,
    RESERVE.RESV_2,
    RESERVE.RESV_3,
    RESERVE.RESV_4,
    RESERVE.RESV_5,
    RESERVE.RESV_6,
    RESERVE.RESV_7,
    RESERVE.RESV_8,
    RESERVE.RESV_9) AS RESV_OTHER,
    TARGET_BUCKET('G','R',
    DECODE(PID.CONV_FLAG,'Y',CLAIM_1.CLM_KIND,'WC00'),
    '207',
    RESERVE.RESV_1,
    RESERVE.RESV_2,
    RESERVE.RESV_3,
    RESERVE.RESV_4,
    RESERVE.RESV_5,
    RESERVE.RESV_6,
    RESERVE.RESV_7,
    RESERVE.RESV_8,
    RESERVE.RESV_9) AS RESV_CONTENTS,
    TARGET_BUCKET('G','R',
    DECODE(PID.CONV_FLAG,'Y',CLAIM_1.CLM_KIND,'WC00'),
    '208',
    RESERVE.RESV_1,
    RESERVE.RESV_2,
    RESERVE.RESV_3,
    RESERVE.RESV_4,
    RESERVE.RESV_5,
    RESERVE.RESV_6,
    RESERVE.RESV_7,
    RESERVE.RESV_8,
    RESERVE.RESV_9) AS RESV_STRUCTURES,
    TARGET_BUCKET('G','R',
    DECODE(PID.CONV_FLAG,'Y',CLAIM_1.CLM_KIND,'WC00'),
    '209',
    RESERVE.RESV_1,
    RESERVE.RESV_2,
    RESERVE.RESV_3,
    RESERVE.RESV_4,
    RESERVE.RESV_5,
    RESERVE.RESV_6,
    RESERVE.RESV_7,
    RESERVE.RESV_8,
    RESERVE.RESV_9) AS RESV_RECOVERY,
    CLAIM_1.DT_DEATH AS DATE_OF_DEATH,
    CLAIM_1.INJ_CLASS_CD AS INJ_CLASS_CD,
    ICLA_DESC.TBL_DESC AS INJ_CLASS_DESC,
    CLAIM_1.OCCUP_CD AS OCCUPATION_CD,
    CLAIM_1.OCCUP AS OCCUPATION_DESC,
    CLAIM_1.NATR_OF_INJ AS INJ_NATURE,
    CLAIM_1.ACCD_DESC AS ACCIDENT_DESC,
    RESERVE.DT_INPT AS DATE_RESERVE_ENTERED,
    RESERVE.TIME_INPT AS TIME_RESERVE_ENTERED,
    RESERVE.RESV_OTH_DESC AS RESV_OTH_DESC,
    ASSOCIATE.HP_LOGON AS FIELD_OFFICE,
    ASSOCIATE.USER_LST_NAME AS EXAMINER_LAST_NAME,
    ASSOCIATE.USER_FIRST_NAME AS EXAMINER_FIRST_NAME,
    ASSOCIATE.SUPV AS EXAMINERS_SUPERVISER,
    ASSOCIATE.MGR AS EXAMINERS_MANAGER,
    CLAIM_1.BUS_UNIT AS BUSINESS_UNIT,
    CLAIM_1.CLM_CLASS AS CLAIM_CLASS,
    CLAIM_1.NURSE_RESP AS NURSE_RESPONSIBLE,
    CLAIM_2.EMPL_NBR AS EMPL_NBR
    FROM
    ACCT,
    ACCT_LOI,
    PID,
    INCIDENT,
    CLAIM_1,
    CLAIM_2,
    ACCT_LEVEL1,
    ACCT_LEVEL2,
    ACCT_LEVEL3,
    ACCT_LEVEL4,
    ACCT_LEVEL5,
    RESERVE,
    SERV_OFC,
    ASSOCIATE,
    AGAL_DESC,
    IJCA_DESC,
    ICLA_DESC,
    IJNT_DESC,
    IJPB_DESC
    WHERE
    CLAIM_1.OPN_CLSD <> 'Z' AND
    PID.PID_SEQ_ID = ACCT.PID_SEQ_ID_FK AND
    ACCT.ACCT_SEQ_ID = ACCT_LOI.ACCT_SEQ_ID_FK AND
    INCIDENT.ACCT_LOI_SEQ_ID_FK(+) = ACCT_LOI.ACCT_LOI_SEQ_ID AND
    CLAIM_1.INC_SEQ_ID_FK(+) = INCIDENT.INC_SEQ_ID AND
    CLAIM_2.CLM_SEQ_ID_FK = CLAIM_1.CLM_SEQ_ID AND
    RESERVE.CLM_SEQ_ID_FK(+) = CLAIM_1.CLM_SEQ_ID AND
    SERV_OFC.SERV_OFC_SEQ_ID = CLAIM_1.SERV_OFC_SEQ_ID_FK AND
    ACCT_LEVEL1.LEVEL1_SEQ_ID(+) = CLAIM_1.LEVEL1_SEQ_ID_FK AND
    ACCT_LEVEL2.LEVEL2_SEQ_ID(+) = CLAIM_1.LEVEL2_SEQ_ID_FK AND
    ACCT_LEVEL3.LEVEL3_SEQ_ID(+) = CLAIM_1.LEVEL3_SEQ_ID_FK AND
    ACCT_LEVEL4.LEVEL4_SEQ_ID(+) = CLAIM_1.LEVEL4_SEQ_ID_FK AND
    ACCT_LEVEL5.LEVEL5_SEQ_ID(+) = CLAIM_1.LEVEL5_SEQ_ID_FK AND
    ASSOCIATE.PROCS_UN(+) = CLAIM_1.EXAMR_RESP AND
    ASSOCIATE.SERV_OFC_SEQ_ID_FK(+) = CLAIM_1.SERV_OFC_SEQ_ID_FK AND
    (AGAL_DESC.TBL_TYPE = ACCT_LOI.AGCY_CD_TBL OR
    AGAL_DESC.TBL_TYPE IS NULL) AND
    AGAL_DESC.TBL_CD(+) = CLAIM_1.AGCY AND
    ICLA_DESC.TBL_CD (+) = CLAIM_1.INJ_CLASS_CD AND
    IJCA_DESC.TBL_CD (+) = CLAIM_1.INJ_CAUSE AND
    IJNT_DESC.TBL_CD (+) = CLAIM_1.NATR AND
    IJPB_DESC.TBL_CD (+) = CLAIM_1.PART_OF_BODY ;

  • How would you change an integer variable per second

    Im new to action script, and I'm working on a game were your health variable will add 1 hp automatically every second if the health variable is not equal to 100. How would you do that?

    If you are using AS3, you can use the Timer class.  You can specify it to activate every second and use an event listener.event handler function to add to the value if it is less than 100.
    var healthTimer:Timer = new Timer(1000);
    function addHealth(evt.TimerEvent):void {
         if(health < 100) health += 1;
    healthTimer.addEventListener(TimerEvent.TIMER, addHealth);
    healthTimer.start();
    If you are using AS2, look into setInterval().

  • How would you change the state to the base state?

    How would you change the state to the base state? Its not
    letting me do something like:
    currentState='<Base State>';

    Sorry about the vagueness of that last reply :)
    What I have done now in my code is this:
    viewstack1.addChildAt(loginCanvas,0);
    toggle.selectedIndex = 0;
    However nothing happens at this line of code:
    toggle.selectedIndex = 0;
    but this works:
    toggle.selectedIndex = 1; or ...
    toggle.selectedIndex = 2;
    toggle.selectedIndex = 3;
    toggle.selectedIndex = 4;
    toggle.selectedIndex = 5;
    toggle.selectedIndex = 6;
    The strange thing is that if I have a button on the screen:
    <mx:Button x="10" y="3" label="Button"
    click="toggle.selectedIndex =0"/>
    and the user clicks it the toggle.selectedIndex = 0; works.
    I'm stumped, any ideas?

  • How would you realize a "blinking"-Effect

    The question narrows down to : Which is the best solution to trigger each 0,5 seconds an event (on the JavaFX thread) ?
    I could do this with a TimelineAnimation or with a Task<Void>, the problem withthe Task is that I have to update the UI with Platform.runLater() each time which is an impact on the overall perfomance. On the otherhand the TimerLineAnimation is useful to update a property and I do not think that it is the approriate method to realize a blink effect.
    How would you do this ?
    E.G. I have a circle. This shape is supposed to change its Color every 0,5 seconds (And there can be many of this circles..)

    I would use some kind of Transition, not because of any performance consideration but merely because it will keep your code cleaner. Used properly, a Task with Platform.runLater(...) to update the UI will be as efficient as anything else, but it can be a bit tricky to get it right (and using Transitions, you delegate the job of getting the code right to the JavaFX team, who are probably better at this kind of thing than either you or I).
    The Timeline will actually animate the transition between property values. Almost anything you want to do can be expressed as a change in property; your example of changing the color of a Circle simply involves changing the value of the fillProperty. So using a Timeline will fade one color into another.
    If you want a "traditional" blink, you could two PauseTransitions with the onFinished event set to change the color.
    This compares the two approaches:
    import javafx.animation.Animation;
    import javafx.animation.KeyFrame;
    import javafx.animation.KeyValue;
    import javafx.animation.PauseTransition;
    import javafx.animation.SequentialTransition;
    import javafx.animation.Timeline;
    import javafx.application.Application;
    import javafx.beans.property.ObjectProperty;
    import javafx.beans.property.SimpleObjectProperty;
    import javafx.event.ActionEvent;
    import javafx.event.EventHandler;
    import javafx.scene.Group;
    import javafx.scene.Scene;
    import javafx.scene.layout.HBox;
    import javafx.scene.paint.Color;
    import javafx.scene.paint.Paint;
    import javafx.scene.shape.Circle;
    import javafx.stage.Stage;
    import javafx.util.Duration;
    public class BlinkingCircles extends Application {
         @Override
         public void start(Stage primaryStage) {
           final HBox root = new HBox();
              final Group faders = new Group();
              final Color blue = new Color(0, 0, 1.0, 0.3);
              final Color red = new Color(1.0, 0, 0, 0.3);
              final ObjectProperty<Paint> colorFader = new SimpleObjectProperty<Paint>(blue);
              for (int i=0; i<20; i++) {
                faders.getChildren().add(createCircle(colorFader));
              KeyValue blueKV = new KeyValue(colorFader, blue);
              KeyValue redKV = new KeyValue(colorFader, red);
              KeyFrame blueKF = new KeyFrame(new Duration(1000), blueKV);
              KeyFrame redKF = new KeyFrame(new Duration(500), redKV);
              Timeline fadeTimeline = new Timeline(redKF, blueKF);
              fadeTimeline.setCycleCount(Animation.INDEFINITE);
              fadeTimeline.play();
              final Group blinkers = new Group();
              final ObjectProperty<Paint> colorBlinker = new SimpleObjectProperty<Paint>(blue);
              for (int i=0; i<20; i++) {
                blinkers.getChildren().add(createCircle(colorBlinker));
              PauseTransition changeToRed = createPauseTransition(colorBlinker, red);
              PauseTransition changeToBlue = createPauseTransition(colorBlinker, blue);
              SequentialTransition blinkTransition = new SequentialTransition(changeToRed, changeToBlue);
              blinkTransition.setCycleCount(Animation.INDEFINITE);
              blinkTransition.play();
              root.getChildren().addAll(faders, blinkers);
              Scene scene = new Scene(root, 640, 400);
              primaryStage.setScene(scene);
              primaryStage.show();
         private Circle createCircle(ObjectProperty<Paint> color) {
           Circle c = new Circle(Math.random()*300, Math.random()*300, 20);
           c.fillProperty().bind(color);
           c.setStroke(Color.BLACK);
           return c ;
         private PauseTransition createPauseTransition(final ObjectProperty<Paint> colorBlinker, final Color color) {
           PauseTransition changeColor = new PauseTransition(new Duration(500));
              changeColor.setOnFinished(new EventHandler<ActionEvent>() {
                @Override
                public void handle(ActionEvent evt) {
                  colorBlinker.set(color);
              return changeColor ;
         public static void main(String[] args) {
              launch(args);
    }

Maybe you are looking for