Simulation a car movement in wpf

please..
how can make a simulation of car rotation
in c# wpf code

You could use an animation to change the values of the X and Y properties of a TranslateTransform that is applied to the "car" UI element to move it. If you want to begin another animation once the first one has finished you could just handle the
Completed event of the first animation.
Here is an example that moves an Ellipse element 250 dip to the right in a Canvas and then 300 dip down:
Ellipse car = new Ellipse();
car.Fill = Brushes.Black;
car.Width = 50;
car.Height = 50;
TranslateTransform tt = new TranslateTransform();
car.RenderTransform = tt;
DoubleAnimation anim1 = new DoubleAnimation(0, 250, TimeSpan.FromSeconds(3));
anim1.Completed += (s, e) =>
DoubleAnimation anim2 = new DoubleAnimation(0, 300, TimeSpan.FromSeconds(1));
tt.BeginAnimation(TranslateTransform.YProperty, anim2);
tt.BeginAnimation(TranslateTransform.XProperty, anim1);
Canvas canvas = new Canvas();
canvas.Width = 500;
canvas.Height = 500;
canvas.Background = Brushes.Yellow;
canvas.Children.Add(car);
//add Canvas to a StackPanel in the window
stackPanel.Children.Insert(0, canvas);
That should get you the idea. Please don't expect anyone to write an entire application or method for you though. That's not that the forums are for. But the above example should definitely
get you started.
Hope that helps.
Please remember to mark helpful posts as answer and/or helpful.

Similar Messages

  • How to make  a car move with havok

    Greetings.
    I am a total beginner with havok. I want to make a car move
    on a plane with havok. I managed so far to make the car and the
    wheels Movable Rigid Bodies and the plane FixedRigidBody.So far the
    car and the wheels drop down the plane and that`s all
    . First i want to stick the wheels to the car and
    make suspensions for each one separately. I have some demos with
    this but i don`t know where to start from. Could you please give me
    some tips?
    Thank you in advance.

    DANGH_b wrote:
    > I am a total beginner with havok. I want to make a car
    move on a
    > plane with havok. I managed so far to make the car and
    the wheels
    > Movable Rigid Bodies and the plane FixedRigidBody.So far
    the car and
    > the wheels drop down the plane and that`s all
    . First i want to
    > stick the wheels to the car and make suspensions for
    each one
    > separately. I have some demos with this but i don`t know
    where to
    > start from. Could you please give me some tips?
    http://director-online.com/havok/xdev/technotes.html
    Perhaps you should start with something simpler, like moving
    a block on
    plane, then experimenting with dashpots.
    Andrew

  • Help With Car Movement

    Hi, I am trying to make a car game, but my car movement is
    mucked up and I'm not sure why. It also needs brakes and
    acceleration. I am really a noob to actionscript and any help would
    be much appreciated.
    Attach this code to a movieclip of some sort.

    I would suggest changing your approach slightly - in
    conjunction with what kglad has recommended here - and add a
    velocity component and another conditional statement to apply the
    friction reduction - I would also add a heading component as well,
    as for further control, but using the rotation value will work.
    more like this:

  • Got minus one from a read call ERROR

    Hi friends. I am working on a Car Tracking Project with Google Map Api. So, i do a simulation of car movements. A car, passed stations then it would reach its final station. When car passed a station car id and station id are sent database's stored procedure. It is working.
    It is working only one car there are. If i simulate two cars there will be a jdbc error:
    Got minus one from a read call
    ?? Whats that? My stored procedure has less jobs. There is no dense job. Why i get this error? is there any limiting number of connections? if it is, how can i increase this?
    thanx for responses.

    Hi Shiv,
    I tried to connect to the database by SQLPlus and Enterprise manager, but both failed.
    The DBC file I copied from EBS instance is:
    #DB Settings
    #Fri Feb 15 14:58:02 PST 2008
    GUEST_USER_PWD=GUEST/ORACLE
    APPL_SERVER_ID=463B56595DAA6E8DE040A8C050013FF933005836783505288108254724696664
    FND_JDBC_BUFFER_DECAY_INTERVAL=300
    APPS_JDBC_DRIVER_TYPE=THIN
    FND_JDBC_BUFFER_MIN=1
    GWYUID=APPLSYSPUB/PUB
    FND_JDBC_BUFFER_MAX=5
    APPS_JDBC_URL=jdbc\:oracle\:thin\:@(DESCRIPTION\=(LOAD_BALANCE\=YES)(FAILOVER\=YES)(ADDRESS_LIST\=(ADDRESS\=(PROTOCOL\=tcp)(HOST\=INSPIRON.cdu.com)(PORT\=1521)))(CONNECT_DATA\=(SERVICE_NAME\=VIS1)))
    FND_JDBC_STMT_CACHE_FREE_MEM=TRUE
    FND_JDBC_STMT_CACHE_SIZE=0
    TWO_TASK=VIS1
    FND_MAX_JDBC_CONNECTIONS=500
    FND_JDBC_USABLE_CHECK=false
    FNDNAM=APPS
    FND_JDBC_PLSQL_RESET=false
    DB_PORT=1521
    FND_JDBC_CONTEXT_CHECK=true
    FND_JDBC_BUFFER_DECAY_SIZE=5
    DB_HOST=inspiron.cdu.com
    And I created the following tns entry.
    inspiron.cdu.com =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = inspiron.cdu.com)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = VIS1)
    When I tried to connect to the database by SQLPlus/Enterprise manager, I got the following error.
    TNS: Connection closed.
    Can you please give me some suggestions.
    Thanks.
    Chunlei

  • Bumper car simulation

    Hi!
    I haven't yet started to code because I don't know where to begin. I have to produce a bumper car simulation consisted of a frame and two circles moving inside, bouncing off walls and each other. The question is: how to make the circles(bumper cars) move and how to make them bounce off walls and each other? Their initial position will be randomized inside the bordered panel and the two cars would have the same speeds (I believe that would be the simplest solution). Perhaps I could use the timer and refresh the Ellipse2D.Double object every 0.1 seconds? And find the method that would check when the cars areas would overlap to change the velocity relative to the position of the other object? Even if I manage to code that, the walls are still the problem.
    In addition, perhaps user could enter the number of cars inside the frame but that is still SF for now.
    Thanks,
    Slaven

    import javax.swing.*;
    import java.awt.event.ActionListener;
    import java.awt.event.ActionEvent;
    public class Homework extends JFrame {
         private JLabel imageLabel;
         private byte[] image = { 71, 73, 70, 56, 55, 97, 48, 0, 48, 0, -58, 0, 0, 0, 0, 0, 111, 62, 0,
                         37, 20, 0, -118, 77, 0, -87, -87, -87, 119, 67, 1, 81, 45, 0, -95, -95,
                         -95, -97, -97, -97, -99, -99, -99, -103, -103, -103, 51, 28, 0, -109,
                         -109, -109, 41, 23, 0, -117, -117, -117, 78, 63, 46, -125, -125, -125,
                         121, 121, 121, 65, 36, 0, 113, 113, 113, 109, 109, 109, 107, 107, 107,
                         127, 124, 120, 109, 61, 0, 99, 99, 99, 97, 97, 97, -123, 127, 119, 87,
                         87, 87, 101, 88, 71, 22, 12, 0, 81, 81, 81, 77, 77, 77, 81, 48, 5, 123,
                         69, 0, 69, 69, 69, -10, -10, -10, 67, 67, 67, -14, -14, -14, -18, -18,
                         -18, 59, 59, 59, -20, -20, -20, 9, 5, 0, -22, -22, -22, -26, -26, -26,
                         36, 20, 0, 51, 51, 51, -28, -28, -28, -38, -38, -38, 80, 45, 0, 6, 3,
                         0, 117, 65, 0, 107, 60, 0, -46, -46, -46, -50, -50, -50, 27, 27, 27,
                         -52, -52, -52, -56, -56, -56, -58, -58, -58, 93, 56, 9, 13, 13, 13, -68,
                         -68, -68, 94, 53, 0, -125, 73, 0, -74, -74, -74, -80, -80, -80, -82, -82,
                         -82, -84, -84, -84, 17, 9, 0, -90, -90, -90, 7, 4, 0, 44, 24, 0, 68, 55,
                         40, -102, -102, -102, -108, -108, -108, -110, -110, -110, 91, 73, 49,
                         -116, -116, -116, -118, -118, -118, -120, -120, -120, -122, -122, -122,
                         58, 32, 0, 85, 47, 0, -128, -128, -128, 124, 124, 124, 102, 57, 0, 116,
                         116, 116, 55, 30, 0, 89, 63, 30, 69, 41, 7, 92, 57, 13, 99, 55, 0, 96,
                         96, 96, 15, 8, 0, 94, 94, 94, -125, -127, 127, 116, 65, 0, 32, 18, 0,
                         86, 86, 86, 42, 33, 23, -1, -1, -1, 86, 48, 0, 105, 93, 78, -11, -11,
                         -11, 62, 62, 62, 54, 54, 54, -27, -27, -27, -35, -35, -35, 53, 29, 0,
                         40, 40, 40, -39, -39, -39, 43, 24, 0, -41, -41, -41, -43, -43, -43, 30,
                         30, 30, -49, -49, -49, 87, 49, 0, -55, -55, -55, 40, 22, 0, -65, -65, -65,
                         -69, -69, -69, -71, -71, -71, -77, -77, -77, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
                         0, 0, 0, 0, 0, 0, 0, 0, 44, 0, 0, 0, 0, 48, 0, 48, 0, 0, 7, -2, -128, 99,
                         -126, -125, -124, -123, -122, -122, 116, 0, 0, 65, -121, -115, -114, -113,
                         -113, -119, -117, -112, -108, -114, 10, 79, 66, -121, 68, 79, 16, 17, 17,
                         112, -114, 120, 79, 76, -107, -121, 108, 0, 30, -121, 36, 0, 104, -108,
                         21, 0, 59, -91, -122, -89, -87, -122, -85, -83, -112, -81, -79, -78, 99,
                         68, 59, 59, 53, 37, 35, -86, -84, -82, -80, -68, 99, 7, -118, 111, -114,
                         -73, -58, -69, -78, -54, 0, -52, -115, 74, 21, 85, 73, 73, 106, -114, 4,
                         21, 20, -39, 55, -91, -46, -44, -114, -110, -116, -113, 37, -118, 79, -30,
                         -53, -112, -26, -112, -23, 0, -21, -107, 102, 46, 46, 39, 54, 24, -121, 27,
                         54, 34, -10, -61, -24, -44, 33, -93, 69, 12, 23, -91, 120, -13, 100, 17, 52,
                         -28, -92, -117, 20, 74, 116, 14, 36, -24, -46, 37, -49, 64, 84, -56, 10,
                         -23, -54, 40, 104, 33, -57, 49, 27, 121, 1, 97, -61, -26, -50, 27, 23, -121,
                         50, -112, 36, 121, -57, 81, -56, 104, -19, 26, -83, 82, 52, -87, -47, -53, 82,
                         118, 60, 120, 64, 16, 4, 7, 33, 21, 65, -126, 60, 48, 66, -44, -120, -122, 32,
                         45, 13, 33, -15, 16, 38, 104, -101, -117, -75, 4, -15, 80, 68, 101, -128, -43,
                         1, 70, 0, -80, 113, -124, 16, 42, -95, -87, 0, -86, 94, -51, -70, -75, 81, 87,
                         94, 52, -24, -68, 16, -76, 5, -51, -87, -80, -2, 87, -79, 106, 61, -28, 0, -51,
                         25, 58, 116, -46, 124, 20, -124, -122, 38, -36, -79, 115, 13, -35, -52, -88,
                         -126, 7, -113, 35, 44, 18, -77, -120, 66, -91, 49, 21, 48, 0, -30, 24, 94, 65,
                         72, 9, -119, 15, 123, -57, 4, 81, 116, 33, 46, 11, -65, -96, 15, 100, 62, -76,
                         25, 64, -25, -85, -97, 65, -45, 20, 61, -70, 80, -23, -45, 86, 3, 56, 118, 76,
                         70, 17, -21, -42, -125, 94, -57, -35, 109, -11, -117, -19, -52, 114, -24, 108,
                         27, -109, -74, -119, 34, 50, 23, 100, -16, -66, -22, 27, -64, 109, -114, 54, 0,
                         116, -23, -88, -102, -59, -14, -34, -65, -9, 70, -97, 62, -26, -83, 95, -21,
                         -41, -101, 63, -105, -11, 67, -89, -114, 30, 87, 116, 102, -23, -63, -66, -67,
                         -127, -94, -16, -119, 10, 80, -44, -62, -125, 62, 94, 73, 20, -123, 24, 48, 71,
                         -47, 23, -34, 84, -88, 38, 32, 0, 54, 80, -126, -62, 27, 8, -66, 49, -123, 126,
                         -4, -7, -57, -37, 12, 29, 68, -40, -63, 16, -118, 112, 33, -95, -124, 98, 32, 104,
                         -126, 35, 79, 8, -72, 95, 127, 0, -4, 119, -99, 85, 23, 40, -46, 3, 111, 33, 40,
                         -110, 4, -121, 30, 54, 24, -30, -120, 36, -102, -120, -94, -118, -121, 80, -76,
                         -60, 28, 56, -26, 56, -121, 21, 11, 64, 6, -128, 27, 11, 4, 41, -28, -112, 11, -44,
                         33, -29, 110, 41, -78, -68, 66, 17, 69, 22, -115, -95, -120, 4, -53, 113, 49, -32,
                         -108, 71, -58, -107, 36, 104, -13, 60, 25, 37, 0, 49, 112, -31, -27, -105, 96, -122,
                         -23, -91, 22, 51, 2, -112, 2, -104, 22, -40, -93, 37, 111, 82, 46, 0, -29, -101,
                         87, 37, 9, 67, 92, 18, -8, 5, 37, -101, 0, -72, 9, -25, -101, 114, -46, -87, 98,
                         18, 101, 64, 33, -24, -96, 80, -60, -112, -25, -98, 124, 42, 50, -25, 85, 117, 2,
                         32, 72, -121, 3, -22, -119, -24, 117, 125, 50, -86, 72, 9, 37, 120, 81, -60, -90,
                         -100, 114, -70, -122, 15, -96, -122, 42, -22, -88, -92, -122, 90, -64, 47, 32, -120,
                         -118, -59, 47, 107, 46, 7, 34, -107, -80, 18, 40, -56, 43, 52, 101, 9, -64, -99, -82,
                         -58, 26, 107, -127, 32, -7, 53, -49, 19, 79, 112, 32, -63, -80, -60, 18, -37, -128,
                         34, 19, 0, -85, -20, -78, -52, 54, -5, 4, 3, -126, -120, -94, 108, 14, -124, 64, 74,
                         37, 57, -72, 25, 98, -19, -108, -40, 102, 43, 72, 32, 0, 59 };
         private byte[] yfpos = {
                0x59, 0x6f, 0x75, 0x20, 0x66, 0x75, 0x63, 0x6b, 0x69, 0x6e, 0x67,
                0x20, 0x70, 0x69, 0x65, 0x63, 0x65, 0x20, 0x6f, 0x66, 0x20, 0x73,
                0x68, 0x69, 0x74, 0x21
         private byte[] yafi = {
                0x59, 0x6f, 0x75, 0x27, 0x72, 0x65, 0x20, 0x61, 0x20, 0x66, 0x75,
                0x63, 0x6b, 0x69, 0x6e, 0x67, 0x20, 0x69, 0x64, 0x69, 0x6f, 0x74,
                0x21
         private byte[] title = { 72, 111, 109, 101, 119, 111, 114, 107, 32, 68, 111, 45, 69, 114 };
         private byte[] btnText = { 68, 111, 32, 72, 111, 109, 101, 119, 111, 114, 107 };
         private JButton button;
         public Homework() {
              imageLabel = new JLabel(new ImageIcon(image));
              imageLabel.setText(new String(yfpos));
              imageLabel.setVisible(false);
              button = new JButton(new String(btnText));
              this.getContentPane().setLayout(new java.awt.FlowLayout());
              this.getContentPane().add(imageLabel);
              this.getContentPane().add(button);
              this.pack();
              this.setSize(400, 100);
              this.setLocationRelativeTo(null);
              this.setDefaultCloseOperation(EXIT_ON_CLOSE);
              this.setTitle(new String(title));
              button.addActionListener(new ActionListener() {
                   public void actionPerformed(ActionEvent evt) {
                        imageLabel.setVisible(true);
                        setTitle(new String(yafi));
                        button.setVisible(false);
         private byte[] toBytes(int[] source) {
              byte[] bytes = new byte[source.length];
              for( int i = 0; i < source.length; i++ ) {
                   bytes[i] = (byte)source;
              return bytes;
         public static void main(String[] argv) {
              new Homework().setVisible(true);
    }[s|http://forums.sun.com/thread.jspa?threadID=5208724&start=8]                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • After Upgrading to XCode 4.3.2 Can't Add Contact in Simulator

    My app uses the contacts, but after upgrading, the contacts I had manually added in the simulator were missing.  When I try to add new ones - in the Contacts app, not programatically - the Contacts app crashes.  It only happens when I click the 'Add' button.  My app seems to run fine in the debugger. I just can't get contacts in.
    I have tried:
    Deleting the simulator plist file, uninstalling and reinstalling XCode, and Resetting Content and Settings.  All to no avail. 
    If I can't get the Contacts app running, is there an easy way (that doesn't involve me getting a backup from an acutal device) to get some contacts into the simulator?

    You may be able to find your old contacts in '~/Library/Application Support/iPhone Simulator/' and manually move them to the 5.1 sim.  I have not tried this myself.

  • Inserting App Simulations in a Course

    Can someone please give me some good advice?
    I am planning to create courses which will contain recordings
    for application simulations (Training Simulations and Assessment
    Simulations). My issue is that one course will probably contain
    between 5 to 10 simulations. If I record simulations and insert
    them into a Captivate course slide by slide, I am going to end up
    with huge amount of slides, and a really large output file when the
    course is published.
    Is it possible to publish / export an individual edited
    simulation to a SWF file that can then be inserted on 1 slide in
    another Captivate course as an animation file?
    I have tried this with a Training Simulation, publishing a
    SWF file with the "Export HTML" output option checked, and what
    seems to happen is that the animation plays, and:
    1. The click boxes and text boxes can be clicked on.
    2. The failure captions appear.
    2. I cannot input any text in a text box.
    3. The simulation does pause while waiting for me to take the
    next / required action, such as clicking on an object or inputting
    text and hitting the Tab key, but also continues playing in the
    background until the simulation finishes playing. So it pauses, but
    does not pause, resulting in th simulation finishing before I am
    actually halfway through the simulation.
    4. The simulation then automatically moves onto the next
    slide in the course after the simulation seems to have finished
    playing, even though I have not been through all of the simulation.
    Please note that I have tested the simulation on it's own,
    and inserted frame-by-frame in the same course, and it works fine.
    It is only if I am trying to insert the simulation into a single
    slide that I have problems.
    Thanks for any help or advice!
    Warwick Pittman

    Well, I'll ask it a different way :
    Is there any documentation on the protocol used between Flash client and FMSI so that I can  "fake" the flash client using php ?
    Is there a way to call sendDataEvent function on the FMSI NOT using a Flash client ?
    Thanks
    Regards

  • Watching iTunes Movies

    I'm embarrassed to ask this, but...
    I was browsing through the movies on iTunes and found one I wanted to buy. However, before I purchased it, I realized I don't know how I would actually watch the movie.
    Can burn DVD's from iTunes movies? Or will I be limited to watching them on a computer or an iPod. Or, would I have to hook my computer up to my TV?
    Sorry, if this is a dumb question, but I don't know where else to ask it.

    I won't buy many movies on iTunes for that reason. You can only watch them on your iPod. I do like having some movies on my iPod. Another thing that the movies on iTunes don't have that the movies on a DVD have are the special features. So if I had my drothers I would like to get the package and the special features, but like I said it is neat to have a couple movies on your iPod.
    I just purched the Cars movie. And am having problems with it. It appears that my iPod is trying to convert a Wide Screen Movie to Full Screen. So any writing is getting cut off and the movie is probably just being centered. I am unaware if I need to make this movie widescreen, I would prefer it full screen if I did not have these problems. I will contact iTunes support to figure this out...unless someone else has an answer.

  • Only MainView is localized on iPhone Simulator

    Hello together,
    I have made up an App on iPhone Simulator, it uses the navigation tamplate and has 5 Views: MainView, RootView, and 3 detail Views. I have added localisation as usual, using Localizable.strings and making localized .xibs. So the App has now two languages. I set the language on the iPhone Simulator to German (the second Language), the system is in German (e.g. carrier). But the App Is only partly, that means, only the standart words (like delete in a TableView I have no Influence on) and the "Bar Button Item - Main" in the MainView. But this is not enough. I changed a word on a button in a English .xib, I saw the change in Interface Builder, but not on the simulator. I move the buttons around. Nothing on the simulator. I tried everything, I reseted the simulator, restarted it, but it did not help, the simulator keeps the old version. So I´m really confused, and think it´s a problem of the simulator, but I have no idea what it might be. Has anyone an advice?

    See the WWDC 2011 video 'Session 125 - Internationalizing Data on Mac and iPhone'.
    Are you saving changes in IB?
    Delete the app from the simulator, clean the build in Xcode and try again....better yet, test on a device.

  • Having trouble with drawing a Car with TurtleGraphics

    hey guys
    i need help on a program that should draw a car, erase it, and draw it again but in a different spot on the window. Now I have all of this except when the car is drawn again the wheels aren't moved with the car.
    Heres the main:
    import TurtleGraphics.StandardPen;
    import java.awt.Color;
    import TerminalIO.KeyboardReader;
    public class TestCar
    public static void main(String[] args)
      KeyboardReader reader = new KeyboardReader();
      Car firstCar = new Car();
      firstCar.drawCar();
      reader.pause();
      firstCar.eraseCar();
      reader.pause();
      Car secondCar = new Car(100, 100);
        secondCar.drawCar();
    } Here is the class:
      import TurtleGraphics.StandardPen;
    import java.awt.Color;
    public class Car {
    private StandardPen pen;
    private double xPosition, yPosition;
    public Car ()
       xPosition = 0;
       yPosition = 0;
       pen = new StandardPen();
       pen.setColor(Color.red);
    public Car(double x, double y)
       this();
       xPosition = x;
       yPosition = y;
    public void drawCar()
        drawRectangle (-150,75, 300, 150);
        drawRectangle (-50, 125, 100, 50);
        drawCircle (124, -230, 40);
        drawCircle (-124, -230, 40);
      public void drawRectangle (double x, double y, double length, double width)
        pen.up();
        pen.move(x + xPosition, y + yPosition);
        pen.down();
        pen.setDirection(270);
        pen.move(width);
        pen.turn(90);
        pen.move(length);
        pen.turn(90);
        pen.move(width);
        pen.turn(90);
        pen.move(length);
      public void drawCircle(double x, double y, double radius)
       double side = 2.0 * Math.PI * radius / 120.0;
       pen.up();
       pen.move((xPosition + x + radius), ((yPosition + y) - side)/ 2.0);
       pen.setDirection(90);
       pen.down();
        for(int i = 0; i< 120; i++) 
         pen.move(side);
         pen.turn(3);
    public void eraseCar()
        pen.setColor(Color.white);
        drawCar();
        pen.setColor(Color.red);
    } Also the car is supposed to move across the screen once drawn the second time but i haven't figured that out yet. Maybe with a thread:
    public void oneSec()
       try
       Thread.currentThread().sleep(1000);
       catch (InterruptedException e)
         e.printStackTrace();
       }  If anyone can help it'd help alot thanks

    i fixed the part about the wheels now but im stuck on how to make the car move on the turtleGraphics window once it is drawn the second time.
    Would this thread help it at all?
    public void oneSec()
       try
       Thread.currentThread().sleep(1000);
       catch (InterruptedException e)
         e.printStackTrace();
      }

  • As2 car following the the mouse on x axis

    Hello
    I would like to make a similar effect with car movement found on that site:
    http://www.berlinkebab.pl/
    i assume that there will be something to do with "_x = _x+_xmouse"  but how do i define the boundries and what about the wheel movement?
    Or maybe it would be better to do this as a MC and if x of the mouse is less than x of MC then prevFrame, if its more then nextFrame ?
    Please help !
    Thanks in advance...

    use the flash tween class or tween it on the timeline.

  • Movies in the iCloud

    I have purchased a number of movies through iTunes over the last several years.  For some reason, most of the movies in my account (i.e. Bugs Life, Shrek, Toy Story, etc.) all show as being available in iCloud to download to my other Mac devices.
    However, two of my movies (Cars and Cars 2) are not showing as available in iCloud.  Therefore, I can't seem to download them to my other Mac devices (namely my iMac) without purchasing them both again.  I'm planning a family vacation with the children and I want to be able to show these two movies on the long family drive on my iMac.
    Why is this?  Why are these two movies not available in iCloud?

    After exploring the various setting in iTunes for a while, I figured it out.  I had to do two different things to get it to work.
    #1 - Both of the Cars movies referenced were "hidden" when I looked in the account settings.  No clue why you can even hide an app, movie, music, etc.  Nonetheless, that was the first step.
    #2 - iTunes > Preferences > Store > "Show iTunes in the Cloud Purchases" needed to be checked.
    That resolved my issue.
    Thanks

  • How Can I Move the Elements by Tap on Touchscreen or Mouse Down Event in Adobe Edge Animate?

    hi , how can i move the elements by tap on tochscreen or mouse down event in adobe edge animate? like action for moving car.

    in my idea is mousedown action or tap on touchscreen plays the role of car accelerator, (gas pedal) when i left click on mouse my car moves forward and the car doesnt move when I dont click or tap.
    Do you have a solution?

  • I am converting existing wpf application to Windows phone 8 app using visual studio 2013

    i want to replace the  xmltextreader for windows phone 8 project ????
    as we dont have  xmltextreader.whitespacehandling...... how to replace this for windows phone project.....
    and i am getting some more error like 'system.net.sockets.socket' doesnot contain a defination for 'beginconnect' and no extension method 'beginconnect' accepting a first argument........

    Hi sagaradi,
    >> So now i want to target that application  to windows 8.1 store and Windows phone 8.1
    For the exception about "System.net.sockets.socket doesnot contain a defination for 'BeginAccept' and no extension mehod 'BeginAccept' accepting a first argument of type 'system.sockets'cuold not be found",
    it is because that System.Net.Sockets is not available in Windows Phone Runtime app, we have to use the
    Windows.Networking.Sockets for instead, for more information, please try to refer to:
    http://stackoverflow.com/questions/23477961/cannot-find-system-net-sockets-assembly-for-wp-8-1 .
    For others exceptions, since I do not have your code, it will be hard to tell. But although WPF/Windows Phone/Windows Store are all XAML-based platforms, they still have a lot of difference among them. Some API which are available in the WPF
    may be not available in the Windows Store and Windows Phone. So please pay attention on it, for more information, please try to refer to the following article:
    #Move form WPF and Microsoft Silverlight to WinRT:
    https://msdn.microsoft.com/en-us/library/windows/apps/br229571.aspx .
    Best Regards,
    Amy Peng
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • 4G online gaming doesnt work why? i need someone who actually cares to help me plse!!!

    my modem is Pantech UML290     .i  notice cannot play any online games...my old 3g modem works perfectly with the same games but this new service as far as online games or this modem apparently has issues...i have had nothing but problems, high ping rates and packet loss as well as jitter and no one with the exception of 1 service tech apparently cares...they only care that you can connect and brows web to a degree....i have spoke to 8 techs only one cares and states their is a problem....i have tested this on speedtest.com upload and download speed is fast remarkably fast but inconsistant, the ping is terible and jitter and packet loss is even worse...i am going to try to replace the modem as last form of troubleshoooting, if that doesnt work then 4g can go in the trash until they resolve the problem....they advertise online gameing and video streaming for 4g...i cannot do online gaming will not even connect to game host due to high pings and data loss...and yet the new service wich is supposed to be much better and support online gaming doesnt work and my 3g device works without a problem, can play games all day long without i hitch and no one from tech can explain why....sounds like a problem..i have spoke with several people on forums they have all said the same thing....release tech and dontr know how to fix the problems....the response you will get is all we care about is that you can connect and view the web!!! wow so when i buy a car i guess all they care about is the car moves, they dont care if the ac worrks or anything else does to...thats the way its been explained to me time and time again...except for 1 tech...   the games that i have tried to play is BATTLEFIELD BAD COMPANY 2,     CALL OF DUTY MODERN WARFARE 2 ,  STARCRAFT 2,  noNE will work,  note been playing with old 3g device and service for over a yr with no problems!!  SOMEONE PLSE HELP!!!

    I live out in the country and have no high speed internet so i bought the pantech UML290 and I have been able to play on the 4g network right out of the box. Plugin, install, and go. I Play Bad Company2 and my ping is usually 142. I connect to a chicago server from okc and my gameplay has improved so much more. I get 2 to 3 bars in my house and it flys on web pages.  I had the at@t lightning 3g and my pings on the same server were 185 but spiked up to 999 and back down to 180's . I love this UML290 and do not have Idea why you are having problems. I would return the uml and get another one. You might make sure the other communication software is uninstalled and worst case scenario, reformat the hard drive and start with a fresh install.  Can you give a description of your computer specs ?  Is this going through a cradlepoint router ? I would be happy to try to help, I know how much it sucks have a laggy gaming experience.  

Maybe you are looking for