ActionsScript 3 how to create on key down function?

Ok so I understand that you make an event listener and an
event handler, but I do not understand how to create a function
were I can hold down a key and the object keeps moving until the
key is up.
With the following function it only moves it every time I
press a certain key. I need to move while the key is held down
until released. I looked around with google and couldn't really
find anything other than how to do this in AS2, which isn't
helpful. Please help! :D
stage.addEventListener(KeyboardEvent.KEY_DOWN, jumpEvent);
private function jumpEvent(event:KeyboardEvent):void
if(event.keyCode == 17)
nissanZ.x += 10;

hey thanks a bunch vario pegged!
its working pretty well :D

Similar Messages

  • How to created Costing Key

    Hi,
    How to create costing key and wwhere to assign for value fields.Kindly provide me the Tcodes for the same.
    I will assgin poiints
    Thanks
    Sunitha

    Hi,
    The tcode to create costing key: KE40
    The tcode to assign value fields: KE4R

  • How to create AES keys?

    How to create AES keys in Java Card SDK 2.2.1?
    The manual is confusing.

    The oncard building of an AES key is somehow similar to an DES key.
    On applet installation build an AES key by:
    AESKey key = (AESKey) KeyBuilder.buildKey(KeyBuilder.TYPE_AES,KeyBuilder.LENGTH_AES_128,false);
    //Now you can fill the key with random data.
    key.setKey(randomDataof128bitLength,(short)0);For generationg random data see RandomData.
    But you should keep in mind that most JavaCards only support DES /3DES as symmetric cipher. I only know two card that support AES (g&d SmartCafe Expert 64 and Axalto Cyberflex Access 64 K).
    Jan

  • How to create the change document functionality for a dependent objects?

    May I please know how to create the change document functionality for a dependent objects?
    I have done it follow the same process as for business process objects. But when i try to test it in BOBT, there is no records under "FIELD_CHANGE_WITH_FILTER". It seems the change hasn't been recorded.
    If the way I did to create change document for dependent object is correct, please also kindly advise the possibilities for why there is no record during testing.
    thanks in advance.

    I also have some doubts about the business object.In this case,one abstract BO hase a subnode wihich is root extended.I added the change document for this node under the category "root_extended" and then tested the function in BOBT.I got some error message "can't find the root key".Shall i redefine the method /BOFU/IF_CDO_CREATION~IS_CDO_CREATION_ACTIVE so as to solve the problem?
    Thx.

  • How to create and execute a function whose return value is  a table

    hi folks ,
    i would like know how to create and execute a function whose return value is a table ,
    am new to pl/sql ,
    my statement for the function is
    SELECT ct.credential_code, c.expiration_date
    FROM certifications c, credential_types ct
    WHERE ct.crdnt_id = c.crdnt_id
    AND c.person_id = person_id;
    i would like to have the result of the above query as return value for the function.
    Thanks in advance ,
    Ashok.c

    hi Ps ,
    Can you please do small sample ,
    that would help me in clear understanding
    thanks in advance
    ashok.c

  • How to Create a Remotely Enabled Function Module

    Hi All,
    How to Create a Remotely Enabled Function Module.
    I Want to Create a FM Using Sample Data , This for Practice
    What Fields can i give in the Import and Export Parameters.
    Please Give me one Example
    Can Any one Give me the Steps to do this.
    Regards
    Vamsi

    Hi Vamsi,
    Lets do simple example where you will first create a RFC in one server (say A) and create normal program in othere server (say B). Finally you will call the RFC in A from B.
    Do the following steps for creating RFC in server A.
    1. log on to server A
    2. go to se37
    3. Edit -> function groups-> create function group and give the function group name (say ZGRP).
    4. create a FM ( say Z_TEST_RFC) in se37 providing the function group which is created just now.
    5. go to attribute tab -> choose remote-enabled module from processing type.
    so that your FM will become RFC.
    6. provide the import parameter in import tab.
    we will provide only two import parameters.
    - parameter name : P_NUM1, typing: TYPE, associated type : I & <b>check the pass value</b> (all the parameters of RFC must pass by value).
    - parameter name : P_NUM2, typing: TYPE, associated type : I & <b>check the pass value</b>
    7. provide the export parameter in export tab.
    parameter name : P_SUM, typing: TYPE, associated type : I & <b>check the pass value</b>
    8. write the given simple code in source code tab.
    FUNCTION Z_TEST_RFC.
    P_TOT = P_NUM1 + P_NUM2.
    ENDFUNCTION.
    Do the following steps for creating ABAP program which will call the RFC in server B.
    1. se38 - > creat a program.
    2. write the given simple code.
    data tot type i.
    call function 'Z_TEST_RFC' destination '<b>XXXXXX</b>'
      exporting
        p_num1 = 10
        p_num2 = 15
      importing
        p_tot = tot.
    write tot.
    please note that <b>XXXXXX</b> is RFC connection which is avialable in <b>sm59</b> transaction in server A.
    -go to sm59 - > abap connection (list of RFC connection configurations are avialable). choose server B connection and replace it of <b>XXXXXX</b> in the code.
    finally you can execute the normal abap program that will call the RFC and display the result.
    Regards,
    Sukhee

  • How to create a drop down box and text box in screen painter?

    Hi i am totally new to this concept of screen painter..please can any tell me
    how to create drop down box in screen painter?
    How to create or display default date and time values?
    How to create text box for giving comments?
    How to store the records that we are entering in a table?
    Please can any one send me the procedure for creating all these its very urgent useful information will be surely rewarded.

    Hi,
    Check all these.
    1.how to create drop down box in screen painter?
    To get Drop Drown Box on screen .
    Follow these steps.
    1.
    Go to T.Code SE51 and Select Laypout for the Screen.
    2.
    Double click on the field for which u want Dropdown box.
    3.
    Then U will see Name ,Text ,DROPDOWN.Click on that and select List Box or ListBox with key . Better to to select first one.
    4.
    Save and Activate ur screen .
    5.
    Enter the following piece of code in the PBO of the screen.(Change for ur requirement).
    6.
    The following code should be written under PROCESS BEFORE EVENT in the MODULE.
    TYPE-POOLS :vrm.
    DATA:
      i_natio TYPE vrm_values, "-->Table that is passed through FM vrm_set_values
      w_natio LIKE LINE OF i_natio.
    DATA:
    BEGIN OF i_t005t OCCURS 0,
        land1 TYPE t005t-land1,
        natio TYPE t005t-natio,
    END OF i_t005t.
    IF i_t005t[] IS INITIAL.
      SELECT land1 natio
         FROM t005t
           INTO TABLE i_t005t
       WHERE spras = sy-langu.
      IF sy-subrc = 0.
      LOOP AT i_t005t .
          w_natio-key = i_t005t-land1.
          w_natio-text = i_t005t-natio.
          APPEND w_natio TO i_natio.
          CLEAR w_natio.
      ENDLOOP.
      ENDIF.
    ENDIF.
    CALL FUNCTION 'VRM_SET_VALUES'
    EXPORTING
                          id = 'I_IT0002-NATIO' "-->Field for which dropdown is needed.
                    values = i_natio
    EXCEPTIONS
       id_illegal_name = 1
                OTHERS = 2.
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    * WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    2.1.How to create or display default date and time values?
    1.
    create input field for DATE and TIME on screen.ex. DATE1 and TIME1 are screen field names .
    2.
    Just assign SY-DATUM to DATE1 and SY-UZEIT to TIME1 under PROCESS BEFORE EVENT.
    3.How to create text box for giving comments?
    1.
    Define one variable in the TOP include with type STRING means Global variable.
    2.
    Create one input field by giving screen field name which u have defined in the above step.
    4.How to store the records that we are entering in a table?
    For this case.. Create one table control. you can select one record and create record in the Z table by pressing button on Application toolbar..
    Check the following steps to handle Table control.
    1).
    U should take one variable in your internal table or in structure which
    is used for table control fields
    ex :
    data :
    begin of itab occurs 0 ,
        mark type c , "This is to select the record.
        matnr like mara-matnr ,
        matkl like mara-matkl,
        maktx like makt-maktx,
    end of itab .
    Controls: TABC types TABLEVIEW using screen 100.
    2).
    This mark variable should be given in Table control properties.
    follow the path
    double click on the table control-->attributes .->select
    w/SelColumn and in that itab-mark. Check in the figure.
    [Table control properties screen|http://bp2.blogger.com/_O5f8iAlgdNQ/R99gOUH8CXI/AAAAAAAAA9I/d3gOum1fJ6s/s1600-h/pic28145-796618.jpg]
    3).
    After that. Take this example.
    PROCESS BEFORE OUTPUT.
    MODULE STATUS_0100.
    LOOP AT ITAB WITH CONTROL tabc
    ENDLOOP.
    PROCESS AFTER INPUT.
    MODULE CANCEL AT EXIT-COMMAND.
    LOOP AT ITAB.
       Module read_table_control.
    ENDLOOP.
    module user_command_0100.
    In this Module read_table_control, You should write the following code
    MODULE read_table_control INPUT.
    MODIFY itab INDEX tabc-current_line."( This will update the
    "ITAB table MARK field with 'X ' whatever we have selected
    "on table control.)
    ENDMODULE.
    4)
    If you want to Delete some of the records from Table control
    follow this code …Create one pushbutton and give Fucnction code to that
    and write below code
    CASE OKCODE.
    WHEN 'CREATE'.
    LOOP AT itab WHERE mark = 'X'.
    "Use UPDATE statement to create new record.
    ENDLOOP.
    ENDCASE.
    I hope that you will get something.
    Regards,
    Venkat.O

  • How to create a key figure in SNP plannignbook which generate FA type order

    Hello
    trying to create a Key Figure in SNP planning book which generates FA type orders
    could kindly suggest how to do it?
    thanks
    elena

    Hi,
    You would be having different key figures in SNP. The type of orders that you see in Key figure is driven by type of categories or category group that you assign in planning area to each key figure. You can modifiy these cateogry groups in IMG settings.
    When you manually create a forecast through a report then automatically you will see those orders in key figures where you have assigned the category FA.
    Hope this helps.
    Regards
    Alhad

  • How to create A/R Down payment Invoice

    Hi;
    I am trying to create A/R Down Payment Invoice through DI API by using the below mentioned object but the system is giving me the following error "Invalid Value. {DPI1.ExLineNo} {Line No. 1}".
      SAPbobsCOM.Documents oDoc SAPbobsCOM.Documents)x.CompanyObject.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDownPayments);
                oDoc.Lines.SetCurrentLine(0);
                oDoc.CardCode = "C0001";
                oDoc.Lines.ItemCode = "Test";
                oDoc.Lines.Quantity = 2;
                oDoc.Lines.UnitPrice = 10;
                oDoc.Lines.ActualDeliveryDate = DateTime.Now.Date;
                oDoc.Lines.BaseType = 17;
                oDoc.Lines.BaseLine = 1;
                oDoc.Lines.BaseEntry = 1;
                oDoc.Lines.ExLineNo
                int oRetVal = oDoc.Add();
                if (oRetVal != 0)
                    MessageBox.Show(x.CompanyObject.GetLastErrorDescription());
    Please suggest me how I can create AR Down Payment Invoice along with Incoming Payment and then wanted to link AR down payment invoice with AR invoice.
    Regards;
    Deepak

    Hi
    Try this code
    Try
    'Create DownPayment Invoice Object
            oDPM = oCompany.GetBusinessObject(SAPbobsCOM.BoObjectTypes.oDownPayments)
            'Set Down Payment Header Values
            oDPM.CardCode = "Some Card code"
            oDPM.DocDueDate = "Suitable Date"
            oDPM.DownPaymentPercentage =" Numeric value (Double)"
            oDPM.DownPaymentType = SAPbobsCOM.DownPaymentTypeEnum.dptInvoice
            'Set Down Payment Line Values
            oDPM.Lines.ItemCode =" Some Item Code"
            oDPM.Lines.Quantity =" Quantity"
            oDPM.Lines.Price =" Item Price"
            lRetCode = oDPM.Add ' Try to add the invoice to the database
            If lRetCode <> 0 Then
                 oCompany.GetLastError(lErrCode, sErrMsg)
                 MsgBox(lErrCode & " " & sErrMsg) ' Display error message
            Else
                 MsgBox("Down Paymeny Invoice Added to DataBase", MsgBoxStyle.Information, "Invoice Added")
            End If
        Catch ex As Exception
            MsgBox(ex.Message)
        End Try
    Regards
    Arun

  • How to create Basic Key Figure, Key Figure and Characteristic

    Hello Gurus,
    I have copied a standard layout of KP06, named it as a Z- layout and made changes to it, like defined the plan data upload field as Object Currency enabled.
    However I want to add a Z-Field , tax holiday unit as a column to this layout which I am not being able to do. The reason is when I go to Insert a new element from Edit > Element > Insert Element and click on 'Key figure with Characteristics' I do not get the Z-Field as a key figure.
    I want to define the Z-field as a key figure, so that I can add it as an element.
    Would be really nice of you if you can let me know the t-code/menu path to do that.
    Regards.

    Hello Gurus,
    I wanted to share this information with you, hoping this will help you to help me.
    I also tried to create a Key Figure in t-code GS32. In the table I mention --> FAGLFLEXR and hit enter. It says no Key figure has been defined for FAGLFLEXR. Then I put the cursor on the 'Reference Entry'and click on copy. Then give the name of the Key Field I want to create.
    'Create Key Figure' dialog box appears. When I input the 'Row Text' 'Column Text' and click enter, I am getting an error 'The basic key figure  entered for table FAGL is not defined'. I go back and do an F4 on 'Basic Key Figure' field, then I do not get any options.
    I would be highly grateful if you can let me know how to create this 'Basic Key Figure' for table FAGLFLEXR.

  • How to Create ACCESS key for different users

    How to create or generate an ACCESS KEY which is required to make changes to the table V_FAGL_ACTIVEC (For New General ledger) for IDES 6.0. Is it created in table DEVACCESS, if so where or is it created in SU01 where user id's are maintained. Since I am working on IDES, I thought probably we can create it for each user in SU01, but dont know the steps to do it. Please help me. It is urgent.

    Hi
    ACCESS KEY - First of all its provided by SAP. You can get the key from http://service.sap.com -> SAP SUPPORT PORTAL -> Keys & Requests -> SCCR Keys -> Registration. Here u can register a DEVELOPER or an OBJECT, by this time SAP will give the ACCESS KEYS.
    **Note : To access http://service.sap.com u should have S number login or like that.
    Only after obtaining that ACCESS KEY, SAP will allow the DEVELOPER to create some objects or change or modify Delivered objects.
    Why ACCESS KEY - For creating or accessing any object some one should be responsible. Suppose, any issue arises with an object then can easily track the details who has created or modified.
    Reward with suitable points

  • How to create composit key ??

    Hello Friends!
    i need your help. I have to create composit key.
    I have 2 tables. Table 1 contains 9 colums and table 2 contains 3 colums. I am writing down just related colums of table1
    Table1: SID (pk) , Bytes_convert_test , Operator , Value , offset_test , Bytes_convert_jump , offset_jump
    Table2: SID (fk) , value , type , ID (pk)
    in table2 type represents the 2 colums in table 1 (Bytes_convert_test and Bytes_convert_jump). Type colum could be anyone of them may be for one record it is Bytes_convert_test or for another record bytes_convert_jump. values
    Value colum in table2 having different values or may be same values for both records. but my task is that i have to store record like if the type in table2 is bytes_to_convert then the values colum stores values for bytes to convert record. In short i have to separate values according to type. I am not sure that i need SID as fk in table2.
    Remember value colum in table1 containing different entries.
    Waiting for quick reply.
    BR,
    Zeeshan
    Edited by: user10899712 on 2009-apr-20 03:42

    Hello Zeeshan,
    You are saying you want to use Type and Value fields in Table2 as foreign keys to Table1 and based on logical operations,Type maps to Bytes_convert_test and/or Bytes_convert_jump in Table1. This means that there is no way to do a straight join between Table1 and Table2 that I can see. Unless you have some simple logic you can add to a query to get the joins to work consistently, I would strongly recommend you use a simple foreign key in Table2.
    Using a simple foreign key that goes to Table1's primary key not only makes the table joins easier, it also will reduce database hits - since now the primary key can be used when traversing relationships to search the cache instead of having to always go to the database.
    Best Regards,
    Chris

  • How to create manual key for AES with 256 key size

    we are just finding Different Approch for secure Key Genration and Store.
    For security purpose which way would be secure to store key in database and retrive that key.
    And can u tell me how to create secure maual key.
    Database user has access they should not able to find the what key we are using .
    Anybody has idea.

    1) Use 'keytool' with option -genseckey
    2) Use SecureRandom and store in a Java Keystore.
    3) Use a Secure Random with something like http://www.strongkey.org/
    4) Use hardware encryption such as produced by nCipher and others.
    There are many other approaches and I would suggest that you bring in an expert to advise you.

  • How to create table top-down approach?

    i know, how to create table in bottom-up approach?
    but i don't know, how to create table in top-down approach?
    please guide me? i am new to abap

    Hi,
    This is called as forward navigation.
    You start first by creating the table.
    You add a field to it.
    You realise that the data element to the field is not there.
    You write the data element name and double click on it.
    It forward navigates to the Create data element screen.
    You want to have a new domain.
    You enter the domain name and double click on it.
    It takes you to Create domain screen.
    You now create domain.
    Go back and assign it to data element.
    Go Back. You now have a field with the required data element.
    Hope that helps!
    Regards,
    Tanveer.
    <b>Please mark helpful answers</b>

  • How to create conditional drop-down lists

    I would like to create a form that utilizes conditional drop-down selection boxes like at http://blogs.office.com/b/microsoft-excel/archive/2009/11/24/create-conditional-drop-down- lists.aspx
    How can I create a form that contains fields like this?
    Is there a sample I can download?

    I have downloaded the AcroForm version (ListProgramming_Part1_AcroForm.pdf).
    I'm not able to consistently recreate.  I was first playing with the form by selecting values in the drop down.  At one point I went to Document Javascripts and select "Example1".  I chose to edit.  Make no changes and select "OK" I get "SyntaxError: missing } in compound statement 39 at line 40"
    The sec ion of code is:
    function SetPartEntries()
       // Only run this code on when the selection is commited.  
       if(event.willCommit)
          // There are 3 rows in the order form so in order to use other fields in 
          // the same row we first have to acquire the name of the row
          // we are operating on.  This is part of the List field's name, so we 
          // just have to split it off 
          var cRowName = event.target.name.split(".").shift();
          // Now get the new parts list from the Master List
          // Since the selection is being committed, event.value contains the selection text
          var lst = oAssemblyParts[event.value];
          // If an entry is selected that we don't have a parts list for, then
          // the parts list is just cleared. 
          if( (lst != null) && (lst.length > 0) )
             this.getField(cRowName + ".PartSelect").setItems(lst);
          else
             this.getField(cRowName + ".PartSelect").clearItems();
          // We have a new parts lists and the first entry is 
          // is a non-selection.  so clear the price field.
          this.getField(cRowName + ".Price").value = 0;
    I am not able to recreate if I select "Edit all Javascripts" only when I use document javascripts.

Maybe you are looking for

  • Reading the value of the "WaitForTarget" attribute of the Wait step

    I am trying to access the  "Step.WaitForTarget" attribute for the Wait step but can't find the correct syntax to use in an expression or the correct API calls to use in an action step.  I intend to use this in an expression as I am looking for a spec

  • Unable to install update iOS 5.1.1 iPad

    I tried to update my iPad (first version) with iOS 5.1.1. It failed, and I received the following error message:  "Unable to Install Update - An error occurred installing iOS" Now what? Thanks in advance for any help you can offer.

  • [SOLVED] Problem copying objects in Inkscape 0.48.0-4

    I have problems when I copy any object when using inkscape. Even after removing the config directories and using a completely blank document. I create a simple rect and press ctr+c (or use the context menu) and this error comes up: El script inkex.py

  • WebUtil and DDE-package

    Hello, does anybody know, if there will be something like a CLIENT_DDE-package (related to the old DDE-package of forms) in webutil. The first announcements of Oracle about WebUtil told so, but now there is nothing left about it. Any suggestions? Tha

  • Just updated to OS 10.0.9.2372

    When I first brought my Z10, its OS was 10.0.9.348. I connected it with BB Link for an update and it said the updated version is 10.0.9.2372. Others are talking about OS 10.0.10.684 when updating. Any idea for diff? Btw, I am in Vietnam. Long