I'm using the OnIdle-event for some simple animations, and it works all right.
The trouble, though, is when the user starts to move or resize the window, the OnIdle-event stops firing until the move/resize-operation is completed.
I need to detect when this happens, so that I can pause all animations. But how do I detect movement of the...
I'm looking for a way to smoothly increase or decrease the speed of a circular movement.
Using the parametric equation of a circle, I can move an object in a circle over time:
x = center_x + radius * sin(time * speed)
y = center_y + radius * cos(time * speed)
The problem with this approach is that I can't simply do speed = speed + 1 ...
I am trying to use the marquee plugin with a div but i can't figure out how to do it.
If you visit my testing page here you will see that although there are two slowly moving divs, one to the left, and one to the right, if you continue to wait, they gradually disappear off the page.
I think that using the Marquee plugin, I can fix this...
I've been writing a 2D flash multiplayer game and a socket server. My original plan for the movement algorithm between the client and server was the following:
The client informs the server about the player's movement mode (moving forward or not moving) and the player's turning mode (not turning, turning left or turning right) whenever...
Hi,
I'm writing an application to fully control the mouse click/movement. What I mean is that say for instance, if I have the application running, form fully transparent, fullscreen, then if I click the mouse button, in normal case, it will bring the application in background in focus - I need to stop this from happening (i.e. clicking ...
I'm working on a basic 2D flash MMO. The first alpha will contain the basics: players can move around. This is, I think, also the most important part to be highly optimized. As movement happens all the time and costs a lot of bandwidth.
This is how my current system works:
All movement is calculated by the client
When a client changes...
Update 6:
Fenomenas suggested me to re-create everything as simple as possible. I had my doubts that this would make any difference as the algorithm remains the same, and performance did not seem to be the issue. Anyway, it was the only suggestion I got so here it is:
30 FPS: http://www.feedpostal.com/test/simple/30/SimpleMovement.htm...
I want To make a square that has keyboard movement(up, down, left, right) and will stop when it hits another object such as a wall.
please help me achieve this goal! it will help a lot! thanks :)
EDIT: I already have a square and a keyboard layout but if that needs to be something specific then please tell me!
...
Hello,
I would like to select text on the page by simulating a left mouse button down and drag it to a specified x,y location (in pixels)
Can this be done with JavaScript?
Thank you.
...
I developed a program to draw polygon triangles. The triangles were drawn using mouse drag. The coordinate of the triangles were stored in array list. Every times the mouse cursor, mouse over on the existing drawn triangles(within the area of triangle), the mouse cursor should turns to "CROSSHAIR_CURSOR", however this were not happened. ...
When I press "j" or arrow down in vim/gvim the cursor moves to the next line. which is good for writing code.
When writing text however the lines are usually much longer then the text with. Therefore I can not easily get the word just above THIS word. So in almost all editors and text processors pressing the up arrow HERE ↑ would put th...
I can override onTouchEvent, but there is no x and y coordinates to set in the EditText or usual View.
...
how i can move mouse courser on an element when page load with jquery?
thanks
...
I use MacVim (and gvim) a lot. I'm familiar with and use a lot of the basic movement commands (b, w, $, 0, G). However, for a lot of thingssuch as selecting particular lines on the screen or jumping to a particular column in a different lineI use the mouse (sometimes in concert with my left hand on the keyboard). It also helps that my mo...
hello
I am trying to implement function which moves to the next blank/whitespace character.
I have read manual, and it seems I can use skip-syntax functions. However, I cannot figure out how to use them correctly.
Here is what I have:
(skip-syntax-forward " ")
However, this does not seem to work. If I use "^ " it works, but if point ...
I want to be able to make image move realistically with the accelerometer controlling it, like any labyrinth game. Below shows what I have so far but it seems very jittery and isnt realistic at all. The ball images seems to never be able to stop and does lots of jittery movements around everywhere.
- (void)accelerometer:(UIAccelerometer...
Recently, yesterday actually, I just started learning how to program Objective-C. I am trying to figure out how to make a new button appear midway through the program and then disappear. I am not even sure how to begin on this one. I am not an experienced programmer and any help would be greatly appreciated!
...
Hello everybody!
I am trying to write AI Chess and I have a problem.
I am ready with pieces movement rules, and I'm trying to remove moves that are not valid (leave the king in check etc).
I Wrote something like this:
ValidateMove(board);
{
for(i=0;i<64;i++)
if(board[i]==king.opposite) kingpos=board[i];
createmoves(board);
if (moves.c...
Hi,
I need to send mouse signals in C# so that other applications register them. To be exact, I need to simulate mouse buttons and the move of the mouse. Is there a way to do this in C#? (Windows)
...
I have a floating point value X which is animated. When in rest it's at zero, but at times an outside source may change it to somewhere between -1 and 1.
If that happens I want it to go smoothly back to 0. I currently do something like
addToXspeed(-x * FACTOR);
// below is out of my control
function addToXspeed(bla) {
xspeed += bla;...