character movement needs fine tuning

This code to move my mc hero around the screen.

However, when you click directly below or above the mc it does not move. When I say directly above, I want to say the angle distance. That is to say: I am well above the mc, but it does not move.

Kids are going to read that and he needs to be more sensitive, or they feel frustrated.

var speed: Number =. 99;

public void onEnterFrame(event:Event):void {}

var xDistance:Number = clickPoint.x - this.hero.x;

var yDistance:Number = clickPoint.y - this.hero.y;

if (Math.abs (xDistance) > 10) {}

var angle: Number = Math.atan2 (yDistance, xDistance);

this.hero.x += v * Math.cos (angle);

this.hero.y += v * Math.sin (angle);

{ } else {}

this.hero.gotoAndPlay ("static");

}

enemy1.x = speed * enemy1.x +(1-speed) * hero.x;

enemy1.y = speed * enemy1.y +(1-speed) * hero.y;

if (clickPoint.x > = hero.x) {}

this.hero.gotoAndPlay ("right");

/ / trace (Math.abs (xDistance));

}

if (this.hero.x > = clickPoint.x) {}

this.hero.gotoAndPlay ("left");

/ / trace (Math.abs (xDistance));

}

}

Glad I could help!

Tags: Adobe Animate

Similar Questions

  • Use the mouse to perform fine tuning settings

    I just installed Ligthroom improved Ligthroom 1.4 2.5; It seems that I can't no more fine tuning of the adjustment by using the mouse wheel, but I am stock to move slides by dragging with the mouse or by entering a value...

    is the ability of mouse wheel to make the SETTINGS abandoned with Ligthroom 2.5; If this is not the case, how I got on the use of the mouse wheel?

    Thank you

    The ability to use the scroll wheel of the mouse for cursor adjustments has been removed from Lr2 as it was causing data loss. 'Some' mouse models you can press the scroll wheel to activate the function, but I do not have models.

  • [AS2] Character movement

    Okey my character got this script: (its a lot more but yes it's the code of the fault).

    Frame 1 = character hiding again

    Frame 2 = character (MC) - movement

    Frame 3 = character (MC) - jump movement

    It works fine, when I press UP, he jumpes and play frame 3.

    When I press the left and right plays frame 2.

    When I press... nothing, frame 1 is played.

    That correct!

    BUT when I press... to the left or right + upwards, he will play the Framework 1.

    No idea how I can do play 3 Frame (break) even if I press two buttons at the same time? Would be great if anyone knew.

    onClipEvent (enterFrame) {}

    If (Key.isDown (Key.RIGHT)) {}

    _root. Player.gotoAndStop (2);

    }

    If (Key.isDown (Key.LEFT)) {}

    _root. Player.gotoAndStop (2);

    }

    If (Key.isDown (Key.UP)) {}

    _root. Player.gotoAndStop (3);

    }

    If (!.) Key.isDown (Key.LEFT) and (!) Key.isDown (Key.RIGHT) and (!) {Key.isDown (Key.UP)))}

    this.gotoAndStop (1);

    }

    }

    onClipEvent (enterFrame) {}

    If (Key.isDown (Key.UP)) {}

    If (Key.isDown (Key.LEFT)) {}

    do something

    } Else if (Key.isDown (Key.RIGHT)) {}

    do something

    }

    _root. Player.gotoAndStop (3);

    } else {}

    If (Key.isDown (Key.RIGHT)) {}

    _root. Player.gotoAndStop (2);

    } Else if (Key.isDown (Key.LEFT)) {}

    _root. Player.gotoAndStop (2);

    } else {}

    this.gotoAndStop (1);

    }

    }

    }

    This should solve it. but I can't guarantee if it will cause any problem for your game.

  • fine tuning of the FMS

    Hi all

    Could someone help me suggest some items related to the performance of the FMS tweaking as one of my management server is inefficient and would like to know where are the vulnerabilities and want to remove unwanted stuff that is really carry out the execution.

    -Shiva

    There's a Foglight performance tuning guide

    http://eDOCS.quest.com/Foglight/567/files/FoglightPerformanceTuning_Field.PDF

    When you look at dashboards performance Foglight, Foglight (or Management Server) > diagnosis > Performance, you can see the use of memory, use of connection pool and other performance data.

    There may be some resons of many performance issues, the question may be the use of the memory JVM that needs to increase memory, it can be use to the pool connection that need tweaking, the backend DB which is used and who has problems, unhandled alarms and stay in memory, issue BONES, the parameters of the virtual machine to the machine , the FMS is running on.

    If you open a support case and send support a support package for Foglight Server they can help you with these performance issues, they will also need to know if it's all the edge who have problems or those specific tables as well as OS information and details on the BONE being virtualized or physical host.

    Hope this helps,

    Golan

  • Sounds of Windows Live Movie Maker fine in project but no sound when recording video

    So, when I put the video set the sound worked fine, but after that I had edited and saved as a video rather than a project of wmm and then opened it in Windows Media Player, there is no sound.

    I would appreciate any advice.
    Thank you!

    So, when I put the video set the sound worked fine, but after that I had edited and saved as a video rather than a project of wmm and then opened it in Windows Media Player, there is no sound.

    I would appreciate any advice.
    Thank you!

    =============================================
    More that likely there is a problem of compatibility with one or more
    of your source files. Even if the project plays when
    under the direction... the problem occurs when it is coded as a video file.

    The only solution I know is to convert your source files
    the formats that are no longer compatible with Movie Maker.

    Several formats are apparently compatible
    with different versions of Movie Maker
    but the most reliable choices are:

    Photos - bmp, jpg
    Video - wmv
    Audio - wav, wma, wmv

  • In edit mode: Fine tuning off audio tempo

    Hey all,.

    I've been recording guitar and singing, and often overall, is good, except for only 1 or two places where the game accelerates or slows down a little by taking it seem sloppy.

    I have not found a way to "bump" or "nudge" of small portions of an audio file to manually put in the time. Something like that, you would be as it should completely for any record type.

    Are plugins that can help?

    threeshirtlessmen wrote:

    I have not found a way to "bump" or "nudge" of small portions of an audio file to manually put in the time. Something like that, you would be as it should completely for any record type.

    But this does not mean that there isn't a way to do, but it's just that it's not what change the display is for.

    If you need to do this, put your part in multitrack view and put two copies on adjacent tracks, initially in the same place vertically. When you get the first instance synchronization errors (let's call it the title of 'master'), to a split in the beginning and then cut the clip after the split, so it is not show more for the duration of the appropriate section.

    Either way, put shrapnel around the part you want to move. At this point, it is easier to spend the rest of the second track off a little. All you do then is to drag the second track where the timing is best and crossfade between the captain and the second delayed piece and then come back. You can do this with an amazing accuracy if you zoom in, and using the crossfade performs the join inaudible, with a little practice. It's almost harder to describe what to do, but once you get used to it, it becomes almost second nature - I use this a lot when reassembling takes and spot errors in acoustic recordings. When you're done and he got correct, you can mix the track down to a single instance again if you wish - it should not remain as a composite multitrack.

    Strictly speaking, you can do a lot of that with an instance of the component, just by splitting and slippery, but usually it's easier to do it with two, especially when it comes to getting the ends to coincide again in time. The whole process is sometimes known as a variant of the technique of 'chequerboarding', and there is almost never.

  • Fine tuning JRockit in NetBeans6.1

    Hello
    I am a new user of JRockit and I am facing a problem in the Jrockit setting in Netbeans6.1. Actually I'm setting options of tunning in VMOptions netbeans6.1 as -XgcPrio: pausetime - XpauseTarget: 10 ms. as I hear the pause time to 10 ms, but it shows put it as...

    init:
    DEPS-jar:
    compile:
    run:
    * 1 [main Thread | http://forums.oracle.com//] INFO com.foo.bar.MyApp - entry request
    * 23 [main Thread | http://forums.oracle.com//] DEBUG com.foo.Bar - did it again! *
    * 24 [main Thread | http://forums.oracle.com//] INFO com.foo.bar.MyApp - outgoing request
    BUILD successful (total time: 1 second)

    and I am unsing the next version of JRockit.

    Java version "1.6.0_05".
    Java (TM) SE Runtime Environment (build 1.6.0_05 - b13)
    BEA JRockit (R) (build R27.6.0-50_o-100423-1.6.0_05-20080626-2104-linux-ia32, update mode)


    Your help will be appreciated.



    Thank you

    Hi the gills.

    JRA data usually shows a value that is a sum of all breaks in a GC cycle. Each individual break must be less than 10 ms, but there are 3 (or 4?) break phases spread over time so the amount may be larger than your configured value. Make sure that you are looking at the point of good data.

    Having said that - 70 ms seems high. Down to 10 ms or less requires reasonably powerful material (my laptop dual core is not enough in most cases) and there are some models of application that should be avoided such as excessive use of finalizers, and other objects of reference. There is some information in the docs on it:
    http://e-docs.BEA.com/wlrt/docs20/intro_wlrt/tuning.html

    You can send your file JRA to jrockit - improve AT oracle DOT com for your comments. Or get one of JRRT Oracle experts involved to help you set your environment and application - check with your local sales office Oracle.

    You don't need a license for version 3.0 of JRRT file - the license file is required for legacy BEA releases. Oracle uses no technical license controls.

    Kind regards

    Henrik

  • Bandwidth fine tuning

    Hello

    Nice day.

    Thank you everyone for the wonderful support... we're trying to refine the configuration of bandwidth on our tours and need your help

    We have active .policing for Netbios trafficon our metro LAN circuit and 30% of the bandwidth is allocated (with bandwidth control), rest all that traffic has 70% of bandwidth. It's initially slow when the data is copied by several users.  We never see that circuit is used at 100%.

    Could you be it someone please let me know if we can capture the QoS configuration as far as Netbios can deal with the surplus of available bandwidth and should not cause any famine bandwidth for rest any cause of traffic which is critical.

    If there is congestion, no netbios traffic shouldn't be deleted.

    I think that the priority queues can be active but not an expert on Queuing technology :-(needs your help

    Thanks in advance

    Disclaimer

    The author of this announcement offers the information in this publication without compensation and with the understanding of the reader that there is no implicit or explicit adequacy or adaptation to any purpose. Information provided is for information purposes only and should not be interpreted as making the professional advice of any kind. Use information from this announcement is only at risk of the reader.

    RESPONSIBILITY

    Any author will be responsible for any damage that it (including, without limitation, damages for loss of use, data or profits) arising out of the use or inability to use the information in the view even if author has been advised of the possibility of such damages.

    Poster

    The problem with 6500 LAN QoS, it can prioritize different traffic, but priority is when there is congestion, which happens when the port is congested.  When you have low-speed bandwidth, you'll have a problems of congestion downstream, but your switch will not deal with it.

    Law enforcement doesn't create congestion.  You can ensure a portion of the traffic is unusable on its allocated bandwidth, but prevents them from using the available bandwidth, and it's not the same.

    Basically, the 6500, with LAN cards, does not lend itself to a low speed hand-off bandwidth.  If you want to effectively manage your problem, you need something "better."

  • Preparing to move need FrontPage comments on my assumptions

    CS 5.5, Windows XP and 7

    1. the only unique features Frontpage which I think are used are includes common data. I have my navigation bar, defined as an inclusion, and the question of foot at the bottom of each page is an inclusion. I guess if I disable Frontpage extensions on my host, each page stands on its own, and if I change the navigation bar, I have to update all the pages that include it. Other than that, I guess I can update any page without problem. I understand that the PS code is bad and needs to be cleaned.

    2. I plan to replace him includes with Dreamweaver library items. Won't happen immediately, as the data included rarely changes. I don't want to do it at the server level.

    3. I am a little familiar with CSS and HTML.

    4. shared files - at the moment we have a single site on a shared disk - Windows XP and 7. I don't know if I can continue to do - have Dreamweaver on both computers, with the ability to update and publication of the changes. It is a very simple configuration, with low rates - once every two weeks, but sometimes one person does, sometimes another, depending on the page. The pitfalls here?

    The short answer is Yes.

    However, this site is full of code, invalid, obsolete HTML and Frontpage cruft formatting tags.

    http://validator.w3.org/check?URI=http%3A%2f%2Fwww.backpack45.com%2f&charset=%28detect+aut connect % 29 & doctype = Inline & group = 0

    Set as it is not value the time and effort involved.

    If it were me, I'd start over in DW with a model of formatting CSS modern, clean.

    Nav bar etc, I would like to use the Server Side Includes rather than DW library items. There is no advantage using library items in DW.

  • Fine-tuning a spry navigation bar

    I'm changing a little navigation bars.  Web design and Dreamweaver is very new to me, I don't know all the terminology.  The width of my sidebar is good but the actual box that contains words like how to help our topic is not wide enough and worth to two lines by default.  There is plenty of room on each side to expand it without having to change the width of the sidebar, but I know not where to do.  I guess that's in the padding somewhere, but don't know where to look.

    There is a detailed tutorial on customizing a menu bar Spry on my site at http://foundationphp.com/tutorials/sprymenu/customize1.php. It also explains how to change the width of the menu items.

  • What setting Format video camera

    I have the new camera Sony DSC HX90V and would like to know the best setting for the video such that it will be used PE11 to make a Blu - Ray disk and viewed on a big HD US TV. 


    Can I use:


    XAVC S HD or AVCHD or MP4


    and


    60i 24 M or 17 M or 60 60i p 28 M or 24 p 24 M or 24 p 17 M

    Thank you.

    ED C Jake

    Think to offered a Sony DFS HX90V record using video compression XAVC-S and the frequency of images, if either 29.97/30 progressive frames per second. In the mini series of tests determine if XAVC-S or AVCHD choice for video compression works best for you.

    XAVCs Vs AVCHD: Open Forum discussion: Digital Photography Review

    I would be that import into your project first elements 11 Windows, using the preset of the project

    NTSC

    DLSR

    1080 p

    DLSR [email protected]

    To burn it to Blu - ray disc on Blu - ray disc format, then

    Publish + share

    Disc

    Blu - ray

    with Presets = H.264 1920 x 1080i NTSC Dolby

    (This setting uses 29.97 images per second interlaced. In version 11, there is no support for a progressive rate for this burn at or any rate other than 29.97 images per second in NTSC interlaced)

    Questions or need any clarification on any of the above, do not hesitate to ask. From the details in your response, we can then decide which needs fine tuning to give you a personalized answer.

    Thank you.

    RTA

  • Problems with the menu of glass template

    I created slideshow DVD and video by using the menu of glass template and have problems to make the buttons on the function menu in the DVD player.  The buttons are fully functional on computer.  I tried several DVD players, none allows me to use the buttons.  I created many DVDs in the past using first Elements 8 using menu templates provide and have had no problem using them on the same DVD player.  I used different types of discs and have also tried bury computer using IMGBurn to burn to the disc.   Nothing works...

    I love the menu of glass for the project, I am working currently on and I would keep it as my menu template, could someone help me try to get this working?  I'm short on time because I need complete an event which is fast approaching.   Any help will be greatly appreciated!

    amdmparody

    Thank you. I received the content of the message in your private messages.

    Let us work through the details of these files of glass flowers DVD Template.psd culminating in a form at the moment. Replacement of the climax in the .psd involved layer solves the problem. My form of replacement needs fine tuning (to put it nicely), but the modified menu allows excellent navigation via the TV remote during playback of DVD-VIDEO on the TV DVD player.

    I'm working on as version using text as the climax instead of a form. Using the text as a no-brainer can be easier and better to appear?

    In this case, change the Menu of the scene is a little more complicated than that for the main Menu. The reason why I find this conclusion is that the culmination of scenes in the scene selection Page was designed to include both forms, a small rectangular shape to the left of the name, and also a framework.

    Later.

    Thank you for considering the troubleshooting.

    RTA

  • How to make a character in my color of black and white film? I need him to be able to walk in the scenes and be always green.

    I just finished a movie black and white, I did between a man and a dinosaur of edition. My problem is that I want to stay black and white besides than the dinosaur that I wanted to give a green tint to the entire film. The problem is that is not as simple as a work of photoshop coloring him because it's a moving character I want to stay green regardless of composition or how it moves through it. I tried to find a way to do two days but had no chance of having the character move and remain its color. I am a complete novice and lose hope so I hope someone out there understands what I'm asking. Help, please!

    Your rotoscoped character would be on its own layer. Then you'd just color grade this layer.

    Here are some useful tips on rotoscoping: using After Effects | Management and animation of masks and paths of the form

  • 5.1 on XP Windows Movie Maker.

    I am trying to create educational videos using Windows Movie Maker 5.1, which came with the laptop that I use.

    Screenshot of CamStudio2 movie plays fine in Windows Media Player, but once registered under film after editing in Movie Maker, the resolution is shot to bits when played in Windows Media Player.

    Screen shot films are blurred, and weird colors appear by text captured on screen.

    I tried the different output settings (NTSC, PAL, best to play on my computer, etc.) but with no improvement.

    Audio plays fine, but the video is blurry. Do I need a filter or a profile to correct this problem, or is it just a settings error I do? Thanks in advance for your help.

    Native mode in Win XP, Movie Maker 2.1 the best
    quality save option would be DV - AVI.
    (FWIW... 5.1 is your version of Windows)

    XP Windows Movie Maker 2.1...
    To save a DV - AVI movie file...
    (and other options)
    Type of... CTRL + P (or go to...) File / save movie file)
    to open the wizard movie recording.
    Choose... My computer.
    Next /.
    Enter a name and a location.
    Next /.
    Show more choices.
    Other parameters.
    Open the window of the droplet and choose... DV - AVI.
    Next /.
    Wait while the movie is saved.
    Finishing...

    If your saved video files are not the resolution you
    require... you may need to use a custom profile:

    Personally, I find the following .wmv profile to be
    useful when recording movies.
    Slide show-1024x768WMV9

    Download from the following site...

    Movie Maker - economy
    Movies - profiles custom WMV
    http://www.Papajohn.org/mm2-SavingMovies-CustomProfiles.html

    Right click / Save as... drop in the following folder:
    Folder of C:\Program Maker\Shared\Profiles Movie

    If you do not have the profiles folder... you
    to create.

    In Movie Maker... the next time that you save a movie...
    Go to file / save movie file / show more choices.
    Other settings / open the window menu and choose...
    Slide show-1024x768WMV9

  • Windows Movie Maker 2, 6-How do I change the length of time of the image

    Easily change the time

    Windows Movie Maker 2.6 can I change the duration of an image easily without leaving the storyboard / timeline? It takes too long to delete images and report them to the timeline/storyboard. If possible it is possible to easily select all the images I want currently on my slideshow and you change the length of time from there?

    Windows Movie Maker 2.6 can I change the duration of an image easily without leaving the storyboard / timeline? It takes too long to delete images and report them to the timeline/storyboard. If possible it is possible to easily select all the images I want currently on my slideshow and you change the length of time from there?

    ================================
    The change of setting to: Tools / Options /.
    Advanced... tab applies only to the added clips
    to the timeline * after * you change the setting.

    If you switch to view "Storyboard" and select
    all of the clips as a batch (select one and the type...
    CTRL + A)... you can add the 'Speed Up, Double.
    or "Slow down, half" effect of changing the
    duration. Simply select all clips / right click
    the effect on the menu... Choose...
    Add to storyboard table.

    'Speed Up, Double' cuts the duration of half.

    "Slow Down, half ' double life.

    These effects can be added up to six times.

    If you need finer adjustment...
    the info may be useful:

    You can change the duration for each clip
    manually. Move your pointer autour the
    edge of an element until you see a double red
    arrow. Now, drag the double red arrow...
    you will see if show a ToolTip displays the duration
    train to change.

    Or... just to redo the project after changing
    the long-term: Tools / Options / Advanced
    tab.

    Volunteer - MS - MVP - Digital Media Experience J - Notice_This is not tech support_I'm volunteer - Solutions that work for me may not work for you - * proceed at your own risk *.

Maybe you are looking for

  • In the notification of my iphone 5 s hit

    My notification iphone5s Center is not shutingdown iam not able to turn off my iphone too and it cannot reset setting, because I can't open settings. because the notification Center is on my screen I can not open any application

  • Satellite L50-B-1NM - speakers turned off when you move the screen

    Hello yesterday, I got Toshiba L50-B-1NM.Everything seems to be ok except for one thing.Speakers to stop when the screen is slightly moved. There are positions of the screen, when they work, but just slightly push the screen and they are now closed.

  • Bad wireless connection made account Satellite L500-1DT (Win 7-64 bit)

    Hello I hope someone might be able to help me with this problem. I brought a L500-1DT for my daughter elder for Christmas (and birthday) but I'm having problems with connecting to my wireless router. From his bedroom (to about 10 meters), it is luckl

  • HS tutorials - DIO / guides / examples? SMU-6544

    Hi all Is a repository for examples of HS-DIO VI available? Are there tutorials? I use a HS SMU-6544-RIO and want to use the generation of static and dynamic signals. So far, I've had a few basic features, but often I'm stuck. For the RIO or DAQ syst

  • LaserJet Pro M127fw MFP: LaserJet M127fw MFP printer - scan Pro

    I created the printer and the scan setting. I can scam out of the glass flat, however, the printer won't let me not scan from the charger. When I select this option, I get a notice saying pop - up: "communication scanner cannot be established. If mak