Rotate Movieclip depending on its direction its traveling?

hello, this is prolly a simple question..
but i need help making my arrow object rotate in the direction its traveling, since  i have gravity on the object..
my arrow is called ArrowMC.
anyone?

This is my code to move the arrow and with gravity. with array
function UpdateArrow():void
    var TempEnemy:MovieClip;
    for (var ia:int =Arrows.length-1; ia>=0; ia--)
        TempEnemy = Arrows[ia];
     TempEnemy.x+=5;
        //start gravity + collision
        var vyT:Number = 0;
        var GravityT:Number = .5;
        vyT +=  GravityT;
        //GroundObject
        if (! GroundObject.hitTestPoint(TempEnemy.x,TempEnemy.y,true))
            TempEnemy.y +=  vyT;
        for (var i:int=0; i<10; i++)
            if (GroundObject.hitTestPoint(TempEnemy.x,TempEnemy.y,true))
                TempEnemy.y--;
                vyT = 0;
i want the arrow to start rotate down when it comes down to the ground with gravity...
i tryd TempEnemy.rotation = TempEnemy.direction..
this dosnt seem to work...

Similar Messages

  • Error: Illegal use of when -style tag without choose as its direct paren

    Hi,
    I'm using the Code:
    <c:choose>
    <c:when test="${empty param.usernaseme}" >
    <B>Hello <c:out value="${param.usernaseme}" /></B>
    </c:when>
    <c:otherwise>
    unknown user name.
    </c:otherwise>
    </c:choose>
    and keep geting the Error:
    Illegal use of <when>-style tag without <choose> as its direct parent
    As far as know
    the code is OK.
    Declare Is OK (Other thigs using <c:out /> working)
    thanks for your halp
    Shimon

    Hi,
    I'm using the Code:
    <c:choose>
    <c:when test="${empty param.usernaseme}" >
    <B>Hello <c:out value="${param.usernaseme}" /></B>
    </c:when>
    <c:otherwise>
    unknown user name.
    </c:otherwise>
    </c:choose>
    and keep geting the Error:
    Illegal use of <when>-style tag without <choose> as its direct parent
    As far as know
    the code is OK.
    Declare Is OK (Other thigs using <c:out /> working)
    thanks for your halp
    Shimon

  • I just received a nano for Christmas. I bought an iwatch wristband but I can't get the face to rotate.  Should this happen on its own or do I need to set it manually?

    I recently received a nano for Christmas but i cant get the face to rotate. Should this happen on its own or do I need to set it manually?

    I guess it helps to read the manual... haha... just figured it out!

  • Ussd not Working on my iphone 5 Ios 7.0.3 i am form India , BSNL Carrier  Any one can Help me please . when i dail *123# then can't work its direct dailing.

    Ussd not Working on my iphone 5 Ios 7.0.3 i am form India , BSNL Carrier
    Any one can Help me please . when i dail *123# then can't work its direct dailing.

    Not ony for BSNL, Not working for all carriers in India right from 7.0 , 7.0.1, 7.0.2 and 7.0.3
    Apple needs to work it out in their  upcoming patch , All older versions of iphones from 4 and 4s works perfectly without any flaw  right from 7.0

  • My pen tool will only make angles and I cannot direct its path.

    my pen tool will only make angles and I cannot direct its path.

    Have you tried click-drag? This should give you handles to work with.

  • Illustrator CS3: how to extend a line along its direction

    This is my line
    I have to extend it along its direction. How can I do?

    If you want to extend it to a specific length/angle:
    1. White pointer. Select the anchorPoint you want to move. Drag it and snap it to the anchorPoint at the opposite end of the segment. Leave it selected.
    2. DoubleClick the white Pointer. Enter the desired angle and distance.
    Or:
    1. LineTool. Click (don't drag) at the "origin" anchorPoint. In the resulting dialog, enter the desired length and angle.
    2. White Pointer: Select the anchorPoint you want to move and snap it to the end of the line you just drew.
    3. Select and delete the line.
    If you want to extend/shorten its current length by a specific length:
    1. White pointer. Select the anchorPoint you want to move. Drag it and snap it to the anchorPoint at the opposite end of the segment. Leave it selected.
    2. DoubleClick the white Pointer. Change the sign (+, -) of the movement values. Key + or - after the existing value(s) and the distance you want to add/subtract.
    JET

  • When Booting Cisco 6500 its directly going to Rommon

    Hi All, When we reboot or Hrad boot the Cisco 6509 its directly going to rommon again to make the switch boot in IOS each and everytime we need to give the command boot, we have checked and found that flash is working fine and even the boot sequence is configured properly.
    what could cause this problem ?

    Check your boot statement , if this is a native box it should be "boot system flash sup-bootflash: or "boot system flash disk0: . Anything else will cause it to go to rommon if the config register is correct. It has to be pointed at the supervisor bootflash or disk0 and that is where the image should be located because that is where the initial boot starts , it boots the supervisor then hands it over to the mscf to be loaded.

  • [CS4 or CS5] How to change frame of movieclip depending on relation to mouse

    I have a movie clip that follows the mouse..
    Its not done yet but its gonna be a dog chasing a/the mouse...
    I want to have it where the if the mouse is left or right of the following movie clip it shows it walking toward the mouse... so something like
    if mouse positions is less the the cursor + 10 (pixels) goto and play frame with dog walking left
    and one for right
    up
    down
    (I want this to walk till its directly under or over mouse and then laydown or jump only when over or under mouse.. IS THAT POSSIBLE?? )
    (say its a 20 pixel wide object and 10 on each side will cover the whole thing and not just the exact center pixel, thats what the 10 + movie clip position is for, but Is there a way to tell it to goto and play whatever_frame when mouse is left of any graphic on the sitting dog section???
    like the equivalent of onRollLeft or whatever.)
    this is the code i have..
    its the top statement that doesn't work the bottom 2 do..
    Code
    if (_xmouse < detail.x+10) {detail.gotoAndPlay(61);
    detail.onRollOver = function() {
    detail.gotoAndPlay(31);
    detail.onRollOut =function(){
    detail.gotoAndPlay(1);
    I dont have all the animations made so if you know how to do this just do it with a shape like i did in frame 61 of the instance "detail" of the movieclip "dog"
    if i cover all directions i shouldn't need the last one- onRollOut.
    really what im asking for if you havent figured it out by now is to help me with the actionscript that will do what i did with the rollover and rollout, but put
    1 (a shape of a different color in a frame in the clip dog) when mouse is any left of dog
    2 (a shape of a different color in a frame in the clip dog) a shape of a different color when mouse is any right of dog
    3 (a shape of a different color in a frame in the clip dog) a shape of a different color when mouse is directly under dog
    4 (a shape of a different color in a frame in the clip dog) a shape of a different color when mouse is directly above dog
    I already created the shapes and placed them in the appropriate frames..
    you should only need to mess with the actions on the instance "detail" (the dog face in frame 1 of scene 1 in layer "follower"
    my fla is to big to upload to this form so im placing it on my website
    here

    Hello utcpunk201,
    I have edited your FLA but can't send you the file in this forum as there is no such option to upload FLA files here. I am giving you a brief detail what I have done with your file.
    1. Just remove your frame script
    2. Edit your script what you wrote on your MovieClip (instance name: detail). Use the script I am sending you below:
    Script :
    onClipEvent (load) {
        _x = 0;
        speed = 15;
        ymov = false;
    onClipEvent (enterFrame) {
        endX = _root._xmouse;
        endY = _root._ymouse;
        _x += (endX - _x) / speed;
        _y += (endY - _y) / speed;
        if (_root._xmouse > this._x + 20)
            this.gotoAndStop(90);
        else if (_root._xmouse < this._x - 20)
            this.gotoAndStop(61);
        }else{
            ymov = true;
        if (_root._ymouse > this._y && ymov == true)
            this.gotoAndStop(120);
        else if (_root._ymouse < this._y && ymov == true)
            this.gotoAndStop(150);
    3. Change the dog movieclip name with detailmc
    4. Use a small line in your dog movieclip's frame number 61, 90, 120 and 150. Write down this line : _root.detailmc.ymov = false;
    Now export your Flash file. It will work. I can send you the edited file if you can give me your email ID.
    Thanks
    Amitava D

  • I am signed into the App Store on my iphone 4 and one of my apps need updating and my brother was signed into it but its like its locked to his Apple ID I have tried signing out and turning my phone off its just not working

    I am signed into the App Store on my iphone 4 and one of my apps need updating and my brother is signed into it because I didn't have any credit to make an ID so he signed in so I could download apps but its like its locked to his Apple ID I have tried signing out and turning my phone off its just not working please help.

    Apps are locked to the Apple ID that was used to download them. You will have to sign in as your brother in order to update it.

  • I have an Iphone 4 which I just updated with the latest software, which put in it in Recovery Mode. It has the picture of the plug with Itunes, I downloaded it now its saying its in Recovery Mode, how do I save all of my previous data without Restoring?

    I have an IPhone 4 which I just updated with the latest software, which put in it in Recovery Mode. It has the picture of the plug with ITunes, I downloaded it now its saying its in Recovery Mode, how do I save all of my previous data without Restoring?
    I updated the phone before backing it up on iTunes, now the update wanted me to connect the phone with iTunes and it says the phones in recovery mode and it must be restored before its used with iTunes. I go to click restore and it says it will reset it to factory default and I'll lose all my current data. I have all my sons pictures and videos along with this notes. I can't lose all of this data! Please help!

    You have to restore the iPod, no ifs, ands, or buts...
    After iOS is installed you will be asked if you what to set it up as a new iPod or if you want to restore from a backup.
    If you have a good backup you can restore that and you're good to go.
    If you don't have a good backup, then you end up with a "clean" iPod....

  • Why can't I download from kuler, my computer doesn't recognise the .ase files its says its an unknown format, can anyone help please.  Thanks?

    why can't I download from kuler, my computer doesn't recognise the .ase files its says its an unknown format, can anyone help please?

    why can't I download from kuler, my computer doesn't recognise the .ase files its says its an unknown format, can anyone help please?

  • I backed up my old mac to transfer to my new mac,but when i entered my password its saying its wrong ?what can i do ?

    i backed up my old mac to transfer to my new mac,but when i entered my password its saying its wrong ?what can i do ?

    1. [email protected], you can go here to figure out your appleid/password, and reset if needed
    2. iCloud.com, you can go here to get your numbers, but you will need your id/password.

  • Maps direction of travel

    I am using the "Maps" app and when I am viewing the map with the direction of travel in the "up" position, my device shows that my direction of travel does not align with the road that I am currently on.  I have tried to calibrate the compass, but that usually only makes things worse.  I am running an iPhone 5c, iOS 8.3.

    Unfortunately, Google Maps does the same thing.  I am currently using Waze because they align with the roads every time, but there are advertisements in that software.  I tried to tap the blue/white arrow, but that just switches from the view I get to "North Up", and these phones have such a short area to the side that the navigation is pretty useless when they point that way.

  • Hey i have this problem with my mac.. that its on its own shuts itself whenever i m using google chrome..i updated to yosemite but the problem never ended and i m experiecing unexplained shutdowns

    hey i have this problem with my mac.. that its on its own shuts itself whenever i m using google chrome..i updated to yosemite but the problem never ended and i m experiecing unexplained shutdowns

    Hi doctor.saddam,
    If your MacBook Pro is shutting down unexpectedly, I would suggest that you troubleshoot using the steps in this article - 
    OS X: When your computer spontaneously restarts or displays "Your computer restarted because of a problem." - Apple Support
    Thanks for using Apple Support Communities.
    Best,
    Brett L 

  • Whenever i m trying to install firefox the error will come that is previous firefox want complete uninstalation its required to restart the computer when its restart its not installed tell me why

    whenever i m trying to install firefox the error will come that is previous firefox want complete uninstalation its required to restart the computer when its restart its not installed tell me why in

    I have had a similar problem with my system. I just recently (within a week of this post) built a brand new desktop. I installed Windows 7 64-bit Home and had a clean install, no problems. Using IE downloaded an anti-virus program, and then, because it was the latest version, downloaded and installed Firefox 4.0. As I began to search the internet for other programs to install after about maybe 10-15 minutes my computer crashes. Blank screen (yet monitor was still receiving a signal from computer) and completely frozen (couldn't even change the caps and num lock on keyboard). I thought I perhaps forgot to reboot after an update so I did a manual reboot and it started up fine.
    When ever I got on the internet (still using firefox) it would crash after anywhere between 5-15 minutes. Since I've had good experience with FF in the past I thought it must be either the drivers or a hardware problem. So in-between crashes I updated all the drivers. Still had the same problem. Took the computer to a friend who knows more about computers than I do, made sure all the drivers were updated, same problem. We thought that it might be a hardware problem (bad video card, chipset, overheating issues, etc.), but after my friend played around with my computer for a day he found that when he didn't start FF at all it worked fine, even after watching a movie, or going through a playlist on Youtube.
    At the time of this posting I'm going to try to uninstall FF 4.0 and download and install FF 3.6.16 which is currently on my laptop and works like a dream. Hopefully that will do the trick, because I love using FF and would hate to have to switch to another browser. Hopefully Mozilla will work out the kinks with FF 4 so I can continue to use it.
    I apologize for the lengthy post. Any feedback would be appreciated, but is not necessary. I will try and post back after I try FF 3.16.6.

Maybe you are looking for