How to make it move correctly?

I made a simple Flex application. There is a helicopter which
will move to points that user clicks in the canvas. For example, it
is at A point. When I click at B point, the helicopter will move to
B. Then it will move to C when I click at C.
However, the problem arises when I click at B, C, D
continuously. It moved from A to B. However, I don't think it moved
from B to C. Maybe it moved from B' to C.
Please tell me how to make it move correctly.
[CODE]
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Script>
<![CDATA[
import flash.events.Event;
import mx.controls.Alert;
[Embed(source="library.swf", symbol="Helicopter")]
public var MayBay:Class;
[Bindable]
public var xF:Number;
[Bindable]
public var xT:Number;
[Bindable]
public var yF:Number;
[Bindable]
public var yT:Number;
public function onCanvasClick(event:Event):void
var x:Number= myCanvas.mouseX;
var y:Number= myCanvas.mouseY;
var oX:Number=h1.x;
var oY:Number=h1.y;
xF=oX;
yF=oY;
xT=x;
yT=y;
MoveEffect.play();
// Alert.show("x="+x+" y="+y+" xOld="+oX+" yOld="+oY);
]]>
</mx:Script>
<mx:Move id="MoveEffect" target="{h1}" xFrom="{xF}"
yFrom="{yF}" xTo="{xT}" yTo="{yT}" duration="2000" >
</mx:Move>
<mx:states>
<mx:State id="NewState">
</mx:State>
</mx:states>
<mx:Panel width="70%" height="50%" title="Vi du">
<mx:Canvas click="onCanvasClick(event)" id="myCanvas"
width="100%" height="100%" color="White">
<mx:Image id="h1" source="{MayBay}" width="80"
height="50">
</mx:Image>
</mx:Canvas>
</mx:Panel>
</mx:Application>
[/CODE]

Make clicking disabled when the helicopter is moving. So
right after a click, disable clicking.
There are many coding possibilities for doing so. Make your
own, then add the code below after it:
MoveEffect.addEventListener("effectEnd",
callHandlerFunctionOfSomeSort);
private function callHandlerFunctionOfSomeSort(e:Event):void
// In this section, re-enable it using your own method.
Good luck!

Similar Messages

  • How to make your movie from a template in AE CS6?

    Hello,
    Firstly, I'm new to this forum and Adobe After Effects. Hence, please excuse my beginner's language.
    I recently modified a slideshow template in AE CS6. After doing all the necessary modifications in the template project, I do not know how to make a movie out of it.
    I'll appreciate your help in guiding me by providing the necessary information to create the movie.
    Waiting for a reply.
    Thanks

    JMichael wrote:
    Actually, I have to create the movie urgently and send it to a colleague.
    Ouch. That's rather like saying your thesis committee needs your paper tomorrow and, say, while we're at it, can we help you with your research?
    After Effects is huge, unbelievably deep and stupidly complicated.
    It's not that we don't WANT to help you, it's that we cannot execute the rendering commands for you nor can we make all of the rendering and output decisions for you.

  • I bought and use iPad in Hong Kong, but I cannot update apps because the apple store asked me to change to Hong Kong, how to make the change (correction)?

    I bought and use iPad in Hong Kong, but I cannot update apps because the apple store asked me to change to Hong Kong, how to make the change (correction)?

    Change App Store
    1. Tap "Settings"
    2. Tap "iTunes & App Stores"
    3. Tap on your Apple ID
    4.Tap "View Apple ID"
    5. Enter your user name and password.
    6. Tap "Country/Region."
    7. Tap "Change Country/Region"
    8. Select the country/region where you are located; re-select country/region even if it is correct
    9. Tap "Done".
    Note: If the change doesn't take effect, sign out of account and sign in again.

  • How to make a movie of a presentation keeping audio and pictures in sync

    How can I synch slides and audio (the audios are different lengths) in a presentation and turn it into a video.
    Each slide should stay in place until the audio has finished (the audio's are slightly different lengths).
    I've tried using a free trial of "Adobe Presenter" but I couldn't seem to make a movie of my presentation.
    I will consider purchasing the software that will do this for me as I have  a few presentations I want to make and convert to movie format for my colleagues to watch (this is to help in a teaching environment).
    Is there a program that will let me match up my audios and slides in the correct order and synch them so the audios do not move beyond the slide for which they are intended? Any help much appreciated with this problem.

    Hi,
    The slide duration in presenter is automatically adjusted according to the time of the audio inserted on that slide.
    How are you inserting audio on slide ? Recording or inserting  using presenter option ?
    You cannot create a movie format like avi, mp4 etc
    But you may publish the presenttaion in the swf format which will play in a browser or a swf player. To play in the broswer you just need to have Adobe Flash Player installed on your system. It will play like a movie in the broswer.
    Let me know if you need some more help
    Thanks,
    Alpi Agarwal
    Adobe Presenter Engineering Team

  • How to make a movie from an audio file and 1 static image?

    Hi,
    I want to make a movie that it is basically an 8 minutes audio file and I want to have a background picture that is static and stays there during the whole 8 minutes of my audio.
    How can I do that?
    I'm able to add the audio and the picture, however I can't stretch the picture to 8 minutes.
    My iMovie version is 5.0.2
    Thanks,
    Martin

    Hi mcanovas - Simply duplicate the picture as many times as needed. In the Photos pane you can extend the pic to 30 seconds, so duplicate that 16 times and there you go!
    I hope the audience will stay focused

  • How to make website look correct in Safari, Firefox, and Chrome?

    Hello there. I'm working on a website which was inherited to me by someone who died. So I am left with all of his coding which is about 4 years old. Now I'm working on positioning of the website and i've found that the only browser the website looks like it's supposed to is Safari and I can't for the life of me figure out how to make it look right in all the browsers and on a phone or tablet. It might be easier if I started from scratch but unfortunately I don't get that luxury. Please help me.
    Here's a link...MuseumOfNaturalistory.com

    I dont understand what some of these errors are asking of me. For instance, this one...
    if (xmlhttp.readyState==4 && xmlhttp.status==200)

    This message may appear in several cases:
    You tried to include the "<" character in your page: you should escape it as "&lt;"
    You used an unescaped ampersand "&": this may be valid in some contexts, but it is recommended to use "&amp;", which is always safe.
    Another possibility is that you forgot to close quotes in a previous tag.
    That's the way the code has to be in order to function. What does it want from me?
    And then here....
    Line 71, Column 5: an attribute value must be a literal unless it contains only name characters   </div>✉You have used a character that is not considered a "name character" in an attribute value. Which characters are considered "name characters" varies between the different document types, but a good rule of thumb is that unless the value contains only lower or upper case letters in the range a-z you must put quotation marks around the value. In fact, unless you have extreme file size requirements it is a very very good idea to always put quote marks around your attribute values. It is never wrong to do so, and very often it is absolutely necessary.
    Line 71, Column 5: character "<" is not allowed in the value of attribute "id"   </div>✉It is possible that you violated the naming convention for this attribute. For example, id and name attributes must begin with a letter, not a digit.
    I have absolutely no clue what it is asking of me. Doesn't it have to be that way? Also why when I go to "Line 71" that isn't where this actual code is? Is there some special way to decipher this?

  • How to make a movie clip button into a url link?

    Hello,
    I'm kinda new to using Flash and am trying to edit a template for a friend of mine, the problem is I'm trying to add a url link to the buttons. I tried adding this action to the button
    on(release){
    getURL(http://www.yoururl.com.);
    I saved as swf & got this error msg in the compiler errors: Symbol=but1,layer 4, frame=1 Mouse events are only for button instances
    In the library I checked the properties of the button and its a movies clip, I'm not sure if it will make any difference if I change to button or graphic?
    I would like to upload the fla and swf files but this forum doesn't seem to allow me to attach files to messages.
    Does anyone know how to do this? Any help is greatly appreciated.
    http://jaedenyoo.com

    Unfortunately that doesn't seem to be the problem, I checked and
    in my flash file its typed correctly.

  • CAN'T figure out how to make/edit movies in QuickTime Pro...

    I can't seem to figure out how to creat and edit movies in Quicktime Pro. I would do this in windows movie maker as its sooo simple, but it doesn't save in a format that works on a mac computer (I'm emailing the video to someone who uses a mac!). And, I can't seem to find a program that is as easy to use as Windows Movie Maker...PLEASE help me, I really NEED to get this movie in a format to work on a Mac! I'm at a total loss as to what to do! And I can't seem to find a tutorial, either!
    =( Kourtney

    First of all, Quicktime is not really an "editing" program in the traditional sense. If you are expecting to really edit in QT Pro, you will be disappointed. Yes, you can actually import video directly into QT Pro and edit it, but the functions will be limited to roughly selecting chunks of video and deleting them, and you won't have frame-accurate control like other real editing programs. But lets start at the beginning: 1) Your post does not give enough information to anyone for them to help you. Where are the videos coming from that you want to edit? Camcorder? Digital camera that takes MPEG movies? VHS or DVDs? 2) The answer to #1 will be the clue as whether you are plugging a USB device or a Firewire device into the computer. Once this is determined, then instructions will vary as to how you go about editing. 3) I'm not sure if you are using QT Pro on a PC or a Mac. If you have a Mac, why don't you use the built-in video editing program that came with your computer? It's called iMovie? Quicktime can convert some video files into something that is compatible with iMovie, if they're not already. If you are using QT Pro on a PC, then I'm a little unfamilar as if it works exactly the same between between a Mac and PC. Seeing that you come from the PC side of the Universe, I'd bet that you are trying to plug in and use a USB device. On a Mac, QT Pro can record video directly from a camcorder, but it needs to be connected via Firewire. Otherwise for something transferred via USB, you most likely have an MPEG file. QT Pro can open this, but again, the editing will be very rough as QT is not a refined edit program.
    Message was edited by: Daniel Filice
    Message was edited by: Daniel Filice

  • How to make a movie of the Screen

    In OS 9 I was able to make a QuickTime of the screen while I was drawing in Photoshop. But that was a long time ago. How does it work in OS X Tiger. My old mac had a microphone. My new G5 imac does not.

    You can still capture a screen in OS X. It saves your captures as .png image files to your Desktop.
    Command-Shift-3 will capture all your see. Command-Shift-4 will turn your mouse into cross-hairs that you drag across any area. And a click on the spacebar (after the above keyboard commands) will turn your cursor into a camera icon that can capture individual windows. Still free.
    Snapz Pro allows you to capture (as QuickTime video) anything in its window. It continues to capture until you close it.
    One of my "movies" made with it:
    http://homepage.mac.com/kkirkster/mycareerfuture/
    Only 1.3MB's and it "plays" full screen.

  • How to make first movie un-skipable

    Is there a way to make the first movie (the on all the way to the left) non skipable? Is so, how?
    Thanks!

    If you put a video in the autoplay well (box on the left in the map view), it will automatically play when the DVD is inserted in a DVD player and can not be skipped.

  • How to make my movie clip move slowly towards right after a few seconds?

    Hi,
    I have the following code which will bring my Banner_mc onto the middle of my Introduction page with some effects. Now, I want this movie clip to wait for a while and then move to right until it disappear with the same effects. How can I do that?
    var BannerFadeTween:Tween=new Tween(Banner_mc, "alpha", Strong.easeOut, 0 , 1, 6, true);
    var BannerRotateTween:Tween=new Tween(Banner_mc, "rotation", Strong.easeOut, 360 , 0, 6, true);
    var BannerXTween:Tween=new Tween(Banner_mc, "x", Strong.easeOut, -300 , 500, 6, true);
    var BannerYTween:Tween=new Tween(Banner_mc, "y", Strong.easeOut, -125 , 300, 6, true);
    Thanks in advance for any help in this regard.

    Hi,
    Thanks for the reply. I wnat to make one thing clear that I am using my project SWF file on computer which doesn't have any internet connection. The other thing I can't find link for downloading the plug-ins.
    When I tried to download the file from the below link, I saw the following page:
    http://www.greensock.com/club/
    Please provide the download link for greensock TweenLite & TweenMax. Thanks.

  • How to make a movie start automatically and loop continuously

    Hi there,
    Two beginner questions here for a kind helpful person out there. I have searched the Encore help option but the answers all refer to menu options.
    I have exported a simple movie from Premiere into Encore. There is no menu. It if for a museum and the client wants to simply insert the DVD and for it to launch itself and then play on a continuous loop. They don't want any interactivity.
    So, my question is how do I apply a simple, 'on insert - play' rule and 'on end - go back to beginning and play' so that this happens automatically?
    Thanks in advance for any help.
    M

    Hi peachespeaches,
    rightfully, at the Menu>properties>Motion>just make sure the "Loop #:" stated "Forever" and your "Loop Point" and "Duration" will automatically adjusted when you insert the movie clip on the background of your Menu. I'm using a CS5 Encore... Trying out for very long time yet couldn't achieve it... However, I use to do it on Encore 1.5, no problem at all, it works! Just don't know why it doesn't on CS5 Encore... I'm suspecting that the software I'm holding might have some problem? Hope you are using CS5 Encore also, could you try on and let me know if it works on your side?
    Jaze,
    [email protected]

  • How to make BW mov to be alpha?

    newbie here, and might be very simple question... but I can't seem to find answer here..
    I have CG artist render me plain black and white mov (not pre-multiplied alpha).
    I want to use the mov as alpha for other mov so I can mask out moving object.
    How can I make the BW mov as being alpha?

    Use the SwitchMatte node to copy a channel from the b&w movie
    into the alpha channel of the other movie.

  • How to make home movies sharper on TV screen

    In moving home movies from analog tapes to DVD, I see that the image is much sharper on the computer screen than it is on the TV.  I'm assuming this is because it is blown up so big on the TV.  Is there a way to "share" the movie in iMovie in a way that will confine it on the TV so it doesn't blow it up to full screen?  I want it bigger than the computer, but would like to confine it some for a better image on the TV.  I'm using iMovie 11 and iDVD to create the movies. 
    I have been using the following settings:  Export using Quick Time>Movie to MPEG-4>Video Format: H.264>Data Rate 5000>Image Size:  1280 x 720 HD>Frame Rate 3>Video Options Restrict Profile to Main>Encoding Mode: Best quality (Multi-pass)
    I've also used Export Movie>HD 720p
    While I can't tell much difference between these two settings, they have both created better results than exporting directly to iDVD or Media Browser.
    I'm burning them all to RW disks until I decide what I want.
    Thanks for any suggestions.
    Peg

    elikness wrote:
    ...Standard Definition is what your Videotapes would have been ... at a maximum they would be 640x480 @ 30 frames (really 29.97 frames) and interlaced (meaning you only see 240 of the 480 vertical video lines at one time).
    Elikness, these frame sizes are not correct.
    It doesn't really matter the technical frame sizes, or recording sizes for NTSC or VHS.
    But it's still not good to give advice that is wrong;
    I suggest you have a look at google, or wiki to see what sizes are standard for NTSC.
    640 x 480 is a computer video size, not television.
    But back to the main post....
    Have you considered not using iMovie?
    You don't really need to edit these videos, so any capture program will be fine.
    There are a couple of DV capture programs, like Vidi.
    These may capture the tapes as DV, and should save it interlaced.
    Then you can drag the fiels made (either dv or quicktime) into iDVD and let it convert them.
    Again I suggest you do not save to H.264 before making the DVD; you're essentially converting your videos three times at the moment.
    But if it looks O.K, and it's getting to complicated and annoying then just stick with what you've done, and save the tapes just in case you want to do it again (or someone else can!) another day.

  • How to make quicktime movie export interactive.

    I've keynote 09 presentation that has images and videos inserted into it. I need to share this people across on internet. I've created quicktime .mov file for this. My file size comes roughly around 500MB. Everything is fine, only problem I see is when I play quicktime file on my mac mini it is interactive, so I click on mouse and it moves to next text or next slide. Whereas same file when I run on my Windows 7 machine it just keeps flying thru it without any interaction from user. Same thing happesn when I try to play quicktime file uploaded on vimeo or smugmug.com, file just flies thru all slides without any user interaction.
    Is there a way where I can make my slideshow to be interactive ?
    thanks
    -mj

    The problem probably is because you are opening the QT movie with Windows Media Player
    Solution
    Download Quicktime player to your windows 7 PC
    Then right click the QT movie you made from keynote and select 'open with'
    Then select quicktime (the QT player downloaded)
    Hope that helps

Maybe you are looking for

  • How do I delete iTunes 12 and reinstall 11? 12 installed itself and updated a Library.

    How do I delete iTunes 12? I want to use iTunes 11 to access an older Library on its own Hard Disk Drive. iTunes 12 installed itself, and the moment I opened it with one of my music Libraries, it updated the Library on that disks (and took forever-I

  • How can I properly index mpeg2 (from Newtek's 3Play) in Premeire CS5?

    I'm trying to drop mpeg2 files from NewTek's 3Play system into a Premiere or AfterEffects timeline. They do not index properly. The files play back in Media Player, and I can encode them in Adobe Media Encoder (however, they're absolutely dreadful in

  • Missing 13 GB from HD - nothing accounts for it

    I have a G4 Mac Mini running Mac OS X Leopard with a 40 GB internal drive. The Finder says I have 2.5 GB available. When I use the command line and manually have it calculate the size of every folder on the root of the drive (using the "du" command),

  • Syncing/Streaming Photo's from iPhoto

    Good evening I'm attempting to sync my iPhoto library with my Atv and it says that I have insufficient space to sync the photo's. Elsewhere in support I came across a note that effectively said if your Atv is full of movies and tv episodes the photo

  • Help with Cisco 871-K9

    Hi everyone! I'm having trouble with my 871 router. My problem is the next one. It's starts like this: My ISP give me an address by DHCP, it is connected to a 1841 (Fe 0/1), on Fe0/0 I assign 10.22.1.1 and by DHCP on my 871, I gather the IP the route