Help Me please How to combine one tab press and continuesly press on keyboard

Hy all, I am new here... Btw I have a problem when I making a game Flash with action script 3,. I want to
make my character move when the key helding and I want  my character attack
with one tab press either ,.. how to make  it work?? please give me sample to make it ... Thanks before

yea thats correct but.. how to combine it with continuesly press.. I have script like this :
package
    import flash.display.MovieClip;
    import flash.events.KeyboardEvent;
    import flash.ui.Keyboard;
    import flash.events.Event;
    public class Main extends MovieClip
        var vx:int;
        var vy:int;
        var attack:Boolean=true;   
        public function Main()
            init();
        function init():void
            vx=0;
            vy=0;
            attack=false;
            stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDownF);
            stage.addEventListener(KeyboardEvent.KEY_UP, onKeyUpF);
            stage.addEventListener(Event.ENTER_FRAME, onEnterframe);
         function onKeyDownF(event:KeyboardEvent):void
            if (event.keyCode == Keyboard.LEFT)
                vx = -5;
                Player.gotoAndStop(2);
                Player.scaleX = -0.3;
            else if (event.keyCode == Keyboard.RIGHT)
                vx = 5;
                Player.gotoAndStop(2);
                Player.scaleX = 0.3;
            else if (event.keyCode == Keyboard.DOWN)
                vy = 5;
                Player.gotoAndStop(2);
            else if (event.keyCode == Keyboard.UP)
                vy = -5;
                Player.gotoAndStop(2);
          else if (event.keyCode == Keyboard.SPACE)
               Player.gotoAndStop(3);
        function onKeyUpF(event:KeyboardEvent):void
            if (event.keyCode == Keyboard.LEFT || event.keyCode == Keyboard.RIGHT)
                vx = 0;
                Player.gotoAndStop(1);
            else if (event.keyCode == Keyboard.UP || event.keyCode == Keyboard.DOWN || event.keyCode == Keyboard.SPACE)
                vy = 0;
                Player.gotoAndStop(1);
        function onEnterframe(event:Event):void
            Player.x+=vx;
            Player.y+=vy;
when I try to include key code SPACE to moving character to attack.... It will going continuesly attack when I helding the key,.. and It stop when I relase the key.. I need one press to attack.. please help me.. :'(

Similar Messages

  • TS1453 Hi, I bought Apple tv traying to rent a movie but there problem with itunes, and there is on apple tv don't have my country. could you help me please how can I solve this problem?

    Hi, I bought Apple tv traying to rent a movie but there problem with itunes, and there is on apple tv don't have my country. could you help me please how can I solve this problem?

    Whinston,
    I live in Azerbaijan. Recently I bought apple tv in New York. When I come back to my country tried to rent movies from my country but couldn't find my country name on apple tv menu, so there is a problem I don't know how to fix it. is there have another way to take a rent movies?

  • Is there a way to move a group of tabs to a new window? I know how to move one tab to a new window, but is there a way to mark a group of tabs and move them to a new window?

    Is there a way to move a group of tabs to a new window? I know how to move one tab to a new window, but is there a way to mark a group of tabs and move them to a new window?

    * Tab Mix Plus: https://addons.mozilla.org/firefox/addon/tab-mix-plus/

  • Please someone could help in explain how calenders are related among icloud and my imac ?

    please someone could help in explaining how calenders are related among icloud and my imac in terms of backuping and recovery ?
    Thanks
    JBS

    Open GarageBand's preferences, and under Audio/MIDI set the Input popUp menu to the iMic. You can also set the Output popUp to the iMic if you have headphones plugged into it, otherwise set it to Built-In.
    Create a New Basic Track, and you're ready to record.
    --HangTime [Will Compute for Food] B-|>

  • That was of someone else now i cant activate my iphone help me please how to activate my phone now .

    I have forgot my apple id and password that was of someone else now i cant activate my iphone help me please how to activate my phone now .because i buy this phone form Ebay.but the guys no tell me this phone icloud is locked...so bad for me,i buy $299..how can i do?

    Hello AryanRajesh,
    It sounds like you do not have your Apple ID/iCloud password to activate your iPhone.  I recommend resetting your Apple ID password using the steps in the following article:
    Apple ID: If you forget your password
    http://support.apple.com/kb/HT5787
    Thank you for using Apple Support Communities.
    Best,
    Sheila M.

  • HT4859 Help!  My whole family shares one apple id and my daughter deleted all of our contacts from her phone, unknowingly deleting them from ours too!  I need to find out how to restore an archived copy.

    Help!  My whole family shares one apple ID and one of us deleted a large amount of contacts from our phone, not realizing that they would be deleted from all of our devices.  Is it at all possible to restore an archive of our contacts?  Is there such a thing? 

    icloud is designed so that only one user uses it to keep his/her devices in sync.  Problems such as yours occur when multiple users use the same account - icloud is not designed for that.
    If a user is using your account, they should get their own account and disconnect from your account.
    To create a new icloud account, go to
    http://www.apple.com/icloud/setup/
    Once they have a new account, they should go to Settings>icloud, scroll to bottom of screen and tap Delete Account.  This only disconnects the device from that account, no data is lost on icloud.  Then enter the account ID that you want to use.
    Note that an ID used for iCloud does not have to be the same ID used for iTunes.  You can all keep the same iTunes store Apple ID to share purchases, but for iCloud, use different IDs.

  • HT201359 Please how do I update my iOS and iTunes?

    Please how do I update my iOS and iTunes?

    Welcome to the Apple Support Communities
    See > http://support.apple.com/kb/HT4623
    To install the latest iTunes, open Help > Check for Updates, or download iTunes 11.0.1 > http://www.apple.com/itunes/download

  • How to configure one dsl connection and one public ip in cisco router and map to one interface for using exchange server

    how to configure one dsl connection and one public ip in cisco router and map to one interface for using exchange server

    Hi ,
     Have you got any additional public IP Address from your service provider , If yes on router you can have static route for those additional IP Address pointing to your ASA  outside interface . 
    Accordingly you can configure NAT 
    HTH
    Sandy . 

  • Please: How to sinchronize "contacts" between pc and ipad in windows 8?

    Please: How to sinchronize "contacts" between pc and ipad in windows 8?
    Thank you.
    Ramón Mª

    http://support.apple.com/kb/HT1296
    Regards.

  • How to add one date column and charecter column

    hi all,
    i have 3 column start_date(date),end_date( date),duration (varchar2)
    i am trying to add start_time and duration like this
    end_date := to_char(start_time) + duration;
    but its showing value_error
    how to add one date column and charecter column.
    Thanks

    you need something that does:
    end_date (DATE) := start_date (DATE) + <number of
    days> (NUMBER)Not necessarily, because if the duration is just a string representation of a number then it will be implicitly converted to a number and not cause an error
    e.g.
    SQL> ed
    Wrote file afiedt.buf
      1  with t as (select to_date('01/07/2007','DD/MM/YYYY') as start_dt, '3' as duration_days from dual)
      2  -- END OF TEST DATA
      3  select start_dt + duration_days
      4* from t
    SQL> /
    START_DT+
    04-JUL-07

  • Fixing itunes library - HELP - multiple copies, how to combine?

    I moved my entire itunes folder to an external hard drive.  This worked mostly ok, but when I tried to change the location of the library in itunes I only retrieved half of my music.  At some point prior to all of this I started opening my library as a 'Previous Itunes Library' and everything new has been put there.  I don't know how to combine everything back into one.  I have been trying differnt things from postings online and now i'm afraid i've completely goofed it up.  I have about 10 xml and itl files.  HELP.  I'm losing it.

    DDtB wrote:
    Any help/suggestions welcome.
    i'll take your word for it
    perhaps this read will provide pointers.
    JGG

  • How to combine multiple fact tables and dimensions in one worksheet?

    Hello Forum,
    I am encountering a reporting problem when trying to create a worksheet that uses more than one cube/fact table and common dimensions. I have used Oracle Warehouse Builder 10Gr2 to design and deploy a pretty simple ROLAP data mart. We are using Discoverer Plus for OLAP as our reporting tool. We have 5 dimension tables using a star schema and 3 fact tables, when I create the worksheet I bring in our sales measure from our sales item table and then Store_Name from my Stores Dimension and then day from my time dimension, everything looks good at the stage, we're just trying to get a sum of all sales for that store on that day. Then I bring in a measure from our advertising cost table and a join window pops up asking which join to use, if I choose either the Store or the Time dimension I get correct data for the first fact table (sales) and grossly incorrect data for the ad cost measure from the second fact table (advertsing costs)...... any help would be appreciated

    You have encountered one of the key limitations of Discoverer... which I complained about to the Discoverer product manager at OpenWorld in 2001....
    Anyhow, to get around this, you are going to have to deal with it either in the database, (views, materialized views, tables), or within the admin tool by creating a custom folder.
    Discoverer also calls this the "fan trap", but never really had a solution to the problem. [The solution only worked is you joined to one and only one dimension!]
    What you want (using Sales_Fact and Inventory_Fact as an example) is to join Sales to Time, Store, and Product, and save that result. Then join Inventory to Time, Store, and Product, save that result, then do a double outer join between the two intermediate temporary tables in order to calculate something useful like inventory turns by store and product line.
    This is also known a "multipass SQL", and is supported by some (but not many) other tools.
    So, to accomplish this with Discoverer, you'll either need to create a view, or table, or materialized view that has already put Sales and Inventory into a single (virtual?) fact table. Alternatively you can write the SQL for how to do this linkage (don't forget to handle missing data), and use the Discoverer admin tool to create a custom folder that uses your SQL.
    Hope this helps!

  • Help! Please~ How to remove this spyware?

    God I just can't believe that my husband had installed a spy software on my phone!
    I am sure he is monitoring me, because I find some emails including my text messages, phone calls and screenshots of my BB, and smoothly I get the purchase address: http://www.remotespy.co/android-blackberry-spy.htm​l  I ask the support to help me to uninstall this software, they say they don't have the right to do so, but it is password protected and I don't know. So I write here to ask for your help, please! Any advice is OK. Thanks very much.

    The first thing you do is get your husband to admit he installed the software on your phone. Once he admits it, you threaten to go to the police because installing spy software on someone's phone without their permission is illegal.
    If he won't admit to it, or he does but will not uninstall it, you divorce him and do a security wipe of the phone and start over fresh (both with your phone and your life). 
    Keep us up to date.  
    (My suggestion might seem extreme. I would stop short of the divorce and just get him to admit he's responsible for the software on your phone.)  
    - If my response has helped you, please click "Options" beside my post and mark it as solved. Clicking the "thumbs up" icon near the bottom of my response would also be appreciated.

  • How to combine the analog input and analog output vi's

    Hi !
    I have a perfectly running triggered analog input acquisition vi. I have a seperate vi for analog output that's running perfectly too. Can someone tell me how to combine these two operations so that I could get a vi that does simulataneous AI and AO without missing triggers. I have tried all the different kinds of configurations suggested by NI support but nothing seems to work. Can someone help ?
    thanks,
    Shiva
    Attachments:
    dac_good.vi ‏77 KB
    adc_good_fw.vi ‏124 KB

    Shiva;
    I'm attaching a good Application Notes that shows how to synchronize multiple DAQ tasks, in Labview.
    Hope this helps.
    Filipe
    Attachments:
    Advanced_Sync_Techniques_for_DAQ.zip ‏166 KB

  • Help needed please, with Iphone stuck with apple picture and progress bar after software update attempted

    Help needed please, everytime I try to update the software version on my iphone it comes up with a message saying it could not be completed and is now frozen with the apple picture and progress bar on it. Do I unplug it and hope the macbook pro sees it again, I also stupidly did not back up before starting the download which I realise I will have to go back to the previous back up. This keeps happening, everytime I do this type of update, I'm starting to think I should just give up on updating my software on the Iphone. I thought it was happening because I was using a window based computer to do the updates, this time I used my Macbook Pro. Please somebody help

    ljm17 wrote:
    ...This keeps happening, everytime I do this type of update, I...
    Then you should know what you need to do... If you don't remember...
    See Here  >  http://support.apple.com/kb/HT1808

Maybe you are looking for

  • Cannot open the manually downloaded apps on my iphone 4 after upgrading it to 4.3.3. Can anyone help?

    I have just upgraded my iphone 4 to version 4.3.3. The upgrade was successful but I cannot use anymore those applications (e.g. facebook, google) which I downloaded from the Appstore. I tap on an app, I can see it opens itself but the screen changes

  • CS3 won't start after system restore, fails to reinstall

    I am running CS3 design premium on Windows 8. I've have the computer (Lenovo with Intel i5) for two months, though I used the design suite on my previous computer. I had to run System Restore to fix a problem with Firefox, and after I did none of my

  • Macbook Pro "Screen Flash"

    I have a Macbook Pro 15" 2.4GHz Processor. I believe the Macbook Pro has a NVIDIA GeForce 8600M GT. Sometimes while using my Macbook Pro, either plugged into a external monitor (so I can dual-screen) or when it is not plugged into the external monito

  • DSR-500 I cannot change the color saturation

    Hi, I have a Sony DSR-500 and I wish to change the color saturation. I read the manual very carefully and it says you must go to the MENU at the page 12. The problem is there is no page 12 !. Pages are from 1 to 9.Do you have a solution to my problem

  • Re: Syncing Issue

    Hi, I have a video file in .avi format which I want to burn to a disc but sound and vision are badly out of sync. Any advice on how I correct this will be greatly appreciated. Thank you.