How can I put move requests in stuck and continue working?

I have a map and a unit moving on this map, I wont to give him 2 moving orders and continue for my another staff.
this is part of my program so I try to explain to you the parameters of this function in the way I choose to represent it:
destination:String is a string looking like this: "x,y" where x and y are the coronations.
getLocNum(location:String, isX:boolean) returns the x value if isX set to true or the y value if its false.
_units is an Array with images and you can ignore from unitID for now.
_location:String is also a string form "x,y" family, that show the correct unit location.
I hope this were clear enough for you to try and help me out with this.
Here we go:
public function testMoveUnit(destination:String,unitID:int=0):void
var myMove:Move=new Move();
myMove.target=_units[unitID];
myMove.xTo=getLocNum(destination,true)*30+38;
myMove.duration=Math.abs(getLocNum(destination,true)-getLocNum(_location,true))*1000;
myMove.play();
myMove.yTo=getLocNum(destination,false)*30-28;
myMove.duration=Math.abs(getLocNum(destination,false)-getLocNum(_location,false))*1000;
myMove.play();
_location=destination;
Right now the unit only moves for his x direction and if I remove the first myMove.play() request so its going for the destination, so the only problem is when I am adding my first move().
And for another question may be more complicated then that is how can I know if my unit is in a middle of his move and I don't wont to interrupt him right now, I mean at the future when the function be called again.

sorry for missunderstanding about Move
possibly its not working because you are calling myMove.play() twice and setting duration twice , try omitting one myMove.play() like below
public function testMoveUnit(destination:String,unitID:int=0):void
var myMove:Move=new Move();
myMove.target=_units[unitID];
myMove.xTo=getLocNum(destination,true)*30+38;
myMove.duration=Math.abs(getLocNum(destination,true)-getLocNum(_location,true))* 1000;
myMove.yTo=getLocNum(destination,false)*30-28;
myMove.play()
_location=destination;

Similar Messages

  • HOW CAN I PUT MOVIES FROM MY LAPTOP TO MY IPAD

    HI, HOW CAN I PUT MOVIES FROM MY LAPTOP TO MY IPAD

    Sync movies to iPad
    http://ipad.about.com/od/iPad_Guide/ss/How-To-Sync-An-iPad-With-iTunes-Music-Mov ies-Apps_4.htm

  • How can't I move all my contacted and photos from my old iCloud account to my new account

    How can't I move all my contacted and my photos from my old iCloud account to my new iCloud account . And how do I know I got photos saved on my iCloud account

    If you sign into your old account using your iPhone and turn on contacts (Settings > iCloud) then once all of your contacts are on your iPhone turn contacts back off and select keep on my iPhone.  Then delete account on the old account and sign in with your new iCloud account and turn on contacts and select merge.  That will get your contacts over.
    If you have photos stored in iCloud it will be in My Photo Stream.  This section only keeps the last 30 days of auto uploads from any of your devices or computers that are using this feature.  You can access these photos by signing into the old iCloud account in Settings > iCloud and enable Photos > My Photo Stream.  If you have any photos in there, they will load into your Photos App.  In the Photos App, tap Albums in the bottom right, then tap My Photo Stream.  There is no way to upload them to your new iCloud account once you sign into it short of creating a Shared Photo Stream and inviting yourself to it.
    In the end you should really try to keep one Apple ID for everything when possible as there is no way to merge Apple IDs and you can end up in a tangled mess.
    How to export iCloud contacts as vCards: http://support.apple.com/kb/PH3606
    My Photo Stream FAQs: http://support.apple.com/kb/ht4486
    Shared Photo Stream FAQs: http://support.apple.com/kb/HT5903

  • How can I put content on the AppleTV and have it STAY there??

    I want to put movies on the AppleTV and delete them from my computer. I want the movies to be persistently on the AppleTV How do I do that?

    Most important thing to realise is that AppleTV cannot be regarded as a storage or backup device - once content is on AppleTv you cannot get it back to your computer.
    Assuming you have a backup copy of a movie elsewhere in case your AppleTV fails or needs a factory restore you could either:
    - Show the files location using a right click on it in iTunes and delete it from the laptop drive directly but not delete the entry from iTunes. (Not ideal but apparently works)
    - Keep larger files on an external drive and change iTunes Preferences not to import to the main library - when the drive is connected you will be able to add new entries to iTunes and synce them. When disconnected iTunes won't delete them from AppleTV as again there's still an entry in the library, just that the file isn't available.
    These are workarounds - it's a shame you can't just drag and drop media to AppleTV manually rather than having to sync things.
    AC

  • How can I put asterisk in the beginning and end of a search parameter..?

    Hi!
         I'm developing a program for a user where he wants a search parameter for the description about some purchase orders....
    The problem is if the user want to make a search for any word he need to put asterisk in the beginning and end of the word because if the user don't put the asterisk the search will not find anything because the program don't know if the word is in the beginning of the description or in the end or in the middle...
    How can I put one asterisk in the beginning and end of the search topic entered by the user internally in the program..? I was thinking using the concatenate function but for this will not work because the program think that the asterisk is part of the word and not..
    The search parameter of the Description is in range.. (Select-Options).
    Thanks for your help!!

    Thanks keshav!
    OK... and if I concatenate the asterisk latter I can make this search?
    In the code desc_search is the select_option that I tell u. I use the DESCRIBE to see first if it is not initial... if desc_search have an entry then access the DELETE to remove all the records that are diferent from desc_search.. This desc_search will have the word with the asterisk... and the question is if it works if I use the concatenate before this... anyway I will try but I think that if I use the concatenate the program confuse and take the asterisk as part of the word..
    DESCRIBE TABLE desc_search LINES desc_count.
      IF desc_count IS NOT INITIAL.
        DELETE core_table WHERE desc NOT IN desc_search.
      ENDIF.
    Let u know if works!!
    Thanks!

  • How can I store movies in the cloud and access them from my devices?

    Hello,
    I would like to store movies in the cloud and access them from my device without having to download them to the device because there is not enough space on the harddrive to store them on it. How would I do this? Would I have to download the movies to my PC or could I store them directly in the cloud?
    Thanks,
    Tyler

    Unfortunately I don't use sugarsync myself, I have a dropbox account and it works slightly differently.
    As I understand it you can upload files to a folder in sugarsync from your computer without having them sync to any of your devices. You can access that folder from any of your devices, and although you would need to download them in order to play the video file, you could then delete them without deleting the files in the sugarsync folder in the cloud.

  • How can I store movies in the cloud and access them on my devices without having to download them to them?

    Hello,
    I would like to store movies in the cloud and access them from my device without having to download them to the device because there is not enough space on the harddrive to store them on it. How would I do this? Would I have to download the movies to my PC or could I store them directly in the cloud?
    Thanks,
    Tyler

    Would I have to download the movies to my PC or could I store them directly in the cloud?
    There is good news coming!
    Technology experts are working on a movie storage system where YOU have physical possession of the movie.
    This system stores the movie digitally on an optical disk system that will not be dependent upon a congested, complicated, and fragile network.
    Because all of the data is stored only a few feet from your television, all the bottlenecks are removed.  Performance and reliability are virtually flawless.
    Further, the system will not utilize any form of security codes, authentications, or passwords. Once the optical disc is purchased it can be moved around freely at will, and can even be lent or given to friends and neighbors with zero hassles.

  • How can I make Final cut pro 7 and Yosemite work?

    Hi dear Apple.
    I have this huge problem with Final cut pro 7 and Yosemite.
    I have tried to install it on a Mac book pro that has Yosemite but it doesn't work.
    I have an I mac with finalcut pro 7 working on Lion but I need to upgrade it to Yosemite to be able to use CC Adobe.
    I have a feature film worth 6,7 million SEK with Final cut pro 7 and I can't translate it to XML files to premiere cause it is in its last editing process. I get an error everytime I try. Also the last version of Fcp (X) ***** for a professional editor. So.. My only option is to finish this film in Fcp7.
    How can I use Yosemite and still be able to keep Fcp7?
    Please help me or do something about this issue soon. I bought fcp7 for 11000 SEK at the time that was quite expensive. 

    Hi Meg the dog! Thanx for answering!
    I know it was left to die 4 years ago. I just think its ****** up.. I work with documentaries and it takes quite a while to finish. I have done one for 6 years now. If I had known that Fcp7 was left to die I would never had started to edit 6 years ago...
    I did try this recommended on the forum by another user:
    Go to the app location in finder, CTRL click on the app and choose [Show Package Contents]. A folder [Contents] appears, click on it and choose [MacOS]. You'll see a Unix executable. Double click, you'll start Terminal. At the same time fcp will launch. After fcp is launched, close terminal and confirm when asked. Now fcp is up and running. Close fcp and the next time, just open fcp the normal way. DONE!
    But it doesn't work for me. I can't launch fcp7.
    I have Fcp7 Installed on my I mac and I wonder if that will effect fcp7 if I upgrade to Yosemte?
    I tryed to export XML to work on premiere and this is what happends:
    Any recommendations? I am going crazy here..

  • How can I put movie into my new ipod video ??

    I would like to know how I can put a movie (dvd) into my ipod video ??

    Commercial or home made?
    If you mean commercial-we aren't allowed to tell you, it violates terms of service.
    Home made-you will need to convert the mpeg2 files into mpeg4 files that comply with the iPod accepted format.

  • How can I put .mov (movies) on my iPad?  I get a message saying iPad cannot play video.

    After downloading movies into iPhoto from my camera, I tried syncing into iPad, but iPad won't accept the .mov format.  Any suggestions please?

    The videos must be in an iPad compatible format.
    Copied from this link.
    http://www.apple.com/ipad/specs/
    Video formats supported: H.264 video up to 720p, 30 frames per second, Main Profile level 3.1 with AAC-LC audio up to 160 Kbps, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; MPEG-4 video, up to 2.5 Mbps, 640 by 480 pixels, 30 frames per second, Simple Profile with AAC-LC audio up to 160 Kbps per channel, 48kHz, stereo audio in .m4v, .mp4, and .mov file formats; Motion JPEG (M-JPEG) up to 35 Mbps, 1280 by 720 pixels, 30 frames per second, audio in ulaw, PCM stereo audio in .avi file format.
    iTunes includes an option to create an iPad/Apple TV version for an existing video in your iTunes library. This creates a copy of the existing video that can be transferred to and viewed on your iPad.

  • How can i put one part in front and one part in the back?

    Alright i made this phone and a person and i want to put the bottom in front of his chin and the top behind the ear. How should i do this? Couldnt find anything in my classroom in a book, book.
    thanks

    The part in front and the part in back have to be two separate objects. Put a rectangle to completely cover the bottom part of the phone and let it mask the whole phone. Copy the clipping group (or duplicate its layer in the layers panel); on the copy, direct-select the end of the mask rectangle that doesn't bisect the phone and drag it the other way, so the rectangle now covers (and crops) the top half of the phone. If you do this on layers you need only make sure the phone-bottom is on the top layer, phone-top is on the bottom layer, and the person layer is between them.

  • How can I erase movies from my iTunes and IPod???

    Dell Dimension 4600   Windows XP   iPod is 5th Generation

    Click on the movie and press the Delete key?

  • How can you help Apple ID get done and start working write way.

    Hi Apple Support Communities,
    This is excellent helping me.  I am very happy because I really want enjoy with my iPhone 5.  Apple ID and my own email is same I am using the am I write or worng explain for me.  If I wrong how sall I do the write way to do send my email.
    Kind regards
    Margaret Thompson
    <Email Edited by Host>

    The link in your post is not leading anywhere. You are in good hands there with  @CherylG and @erico and @lasvegaswireman. 
    I will just echo that you did not get recovery disks with your PC....no PC maker provides them in the box any more. When the laptop is new you are prompted to make recovery disks but most people do not do that. You can download a disk image of your licensed Windows 7 version from which you can burn a DVD and then fill in the drivers as mentioned on your other post. Let me know if you need a link for the download. But frankly it is worth getting the recovery disks from HP. I would not buy them from eBay and I buy lots of stuff from eBay....too much chance you will get the wrong ones. 

  • How can I copy movies into iPhone from my PC?

    How can I put movies into Iphone from PC.
    When I'm trying to put video files into library (mp4 format) it not appear in my iTunes library.

    You sync it to your iPad.
    http://i1224.photobucket.com/albums/ee374/Diavonex/Album%204/9d04e8509b150edc93a 9a8b2adc4dc59.jpg

  • I know this has been asked before but how can i put dvds on my ipod

    how can i put dvds on my computer and or save them to it any help apreciated
      Windows XP  

    To use Videora iPod Convertor to convert movies for use on your iPod, consult these helpful links:
    To get started: http://www.videora.com/en-us/Converter/iPod/
    If you have questions: http://www.videora.com/en-us/Converter/guides.html
    If you have more questions, post them here: http://www.pspvideo9.com/forums/index.php?c=8
    Note that Videora iPod Convertor is a 3rd party program. If you need help with it, post your question there.
    GFF

Maybe you are looking for

  • How can i detect if my PC is not on Network..... Urgent Pls Help Soon !!!!!

    Hello Everyone, We all know whenever we try to connect to a PC which is not on network, we get UnKnownHostException etc..... by which we can detect that the corresponding PC is not an network(intranet/internet) But when i send a msg from my PC to my

  • Apple TV Is Not Reacting Properly To My Remote

    Howdy Folks! So since yesterday my Apple TV is not reacting properly to my remote. Now I click on the remote button and the light switches from that pure white light on the front to a golden light. So it is receiving a signal from the remote. Only no

  • Cannot install itunes AND Apple Mobile Device

    Ok so there is a BIG problem, 3 weeks ago, itunes was working perfectly, and then i got a problem and i had to delete itunes and i also deleted Apple Mobile Device and bonjour and quicktime, but when i try to reinstall itunes, i can't, it just skips

  • How to send two decision

    I receive a request: From a customized table get  many approver, For example , I get three approver from this cusomiezed table. When the workflow has been triggered, then workflow trigggerd three descion. The three approver received this workflow in

  • Best graphics card for After Effects CC?

    Been pondering which CUDA card to get for my "Mid 2012" Mac Pro as I was sadled with a useless AMD Radeon HD 5870 by the systems builder, so even though I have 12 cores I get very little acceleration from Premiere Pro & After Effects CC when editing