Search Results

Search found 2528 results on 102 pages for 'animation'.

Page 4/102 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • Sprite animation problem

    - by hustlerinc
    I have this sprite I have to animate. The sprite is 7 images total but animation is 10 frames (2 positions are repeated). The order I want to go through the frames is like this: 3 - 4 - 5 - 6 - 4 - 3 - 2 - 1 - 0 - 2. My problem is how can I skip 1 frame once I reach the end of each direction? The reason I want to skip is to save me from creating duplicate positions in the spritesheet. I'm doing this in Javascript.

    Read the article

  • How to syncronize two animations without delays

    - by GeKi
    I have one character idle animation running inside a game in a loop, over and over again. A a certain time I trigger another animation to be played, for the same character. The second animation won't play immediately, as will be a discontinuity in my character animation. First I wait for the idle animation to finish and then I play my second animation. Now I have a smooth, continuous animation, BUT I have introduced a delay between my action and character animation. If I play the second animation right away as it is triggered, the character animation won't be continuous and smooth. I was thinking on breaking the idle animation in small pieces and also to have the same number of second action animations to match the last frame of the idle pieces. This won't solve the delay completely, only will minimize it a bit. So it's a magic formula of how can I get rid of this delay? Thanks.

    Read the article

  • What are the key "connectors" for animation creation?

    - by qaisjp
    I'm creating an animation "engine" for a 2D game which loads a *.2dped file to load a character (it's body part positions, height, length of arm etc), and then a *.2difp to manipulate the body part positions. I'd like to know what the key body parts (bones, I mean) I should allow to be manipulated. My current list, sorted by ID's: 1: BONE_PELVIS1 2: BONE_PELVIS 3: BONE_SPINE1 4: BONE_UPPERTORSO 5: BONE_NECK 6: BONE_HEAD2 7: BONE_HEAD1 8: BONE_HEAD 21: BONE_RIGHTUPPERTORSO 22: BONE_RIGHTSHOULDER 23: BONE_RIGHTELBOW 24: BONE_RIGHTWRIST 25: BONE_RIGHTHAND 26: BONE_RIGHTTHUMB 31: BONE_LEFTUPPERTORSO 32: BONE_LEFTSHOULDER 33: BONE_LEFTELBOW 34: BONE_LEFTWRIST 35: BONE_LEFTHAND 36: BONE_LEFTTHUMB 41: BONE_LEFTHIP 42: BONE_LEFTKNEE 43: BONE_LEFTANKLE 44: BONE_LEFTFOOT 51: BONE_RIGHTHIP 52: BONE_RIGHTKNEE 53: BONE_RIGHTANKLE 54: BONE_RIGHTFOOT It's currently made to support real people, but am I going too accurate for a 2D character?

    Read the article

  • background animation algorithm for single screen

    - by becool_max
    I’m writing simple strategy game (in xna), and would like to have an animated background. In my game all the actions happens inside one screen and thus standard parallax effect does not look appropriate. However, I found a video of a game with suitable background animation for my game http://www.youtube.com/watch?v=Vcxdbjulf90&feature=share&list=PLEEF9ABAB913946E6 (from 3 to 6s, while main character stays at the same place). What is the algorithm to do this stuff? It would be nice if someone can provide a reference for a similar example (language is not important).

    Read the article

  • Implement looped movement animation with tap to cancel

    - by Nader
    Hi All; My app is based around a grid and an image that moves within a grid that is contained within a scrollview. I have an imageview that I am animating from one cell to another in time with a slow finger movement and recentering the scrollview. That is rather straight forward. I have also implement the ability to detect a swipe and therefore move the image all the way to the end of the grid and the uiscrollview recentering. I have even implemented the ability to detect a subsequent tap and freeze the swiped movement. The issue with the swipe movement is that the UIScrollView will scroll all the way to the end before the Image reaches the end and so I have to wait for the image to arrive. Also, when I freeze the movement of the image, I have to re-align the image to a cell (which I can do). I have come to the realization that I have to animate the image one cell at a time for swipes and recentering the uiscrollview before moving the image to the next cell. I have attempted to implement this but I cannot come up with a solution that works or works properly. Can anyone suggest how I go about implementing this? Even if you are able to put up code from a different example or sudo code, it would help a lot as I cannot workout how this should be done, should I be using selectors, a listener in delegates, I just simply lack the experience to solve this design pattern. Here is some code: Note that the sprite is an UIImageView - (void)animateViewToPosition:(SpriteView *)sprite Position:(CGPoint)pos Duration:(CFTimeInterval)duration{ CGMutablePathRef traversePath = CGPathCreateMutable(); CGPathMoveToPoint(traversePath, NULL, sprite.center.x, sprite.center.y); CGPathAddLineToPoint(traversePath, NULL, pos.x, pos.y); CAKeyframeAnimation *traverseAnimation = [CAKeyframeAnimation animationWithKeyPath:kAnimatePosition]; traverseAnimation.duration = duration; traverseAnimation.removedOnCompletion = YES; traverseAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear]; traverseAnimation.delegate = sprite; traverseAnimation.path = traversePath; CGPathRelease(traversePath); [sprite.layer addAnimation:traverseAnimation forKey:kAnimatePosition]; sprite.center = pos; }

    Read the article

  • Implement looped movement animation with tap to cancel

    - by Nader
    Hi All; My app is based around a grid and an image that moves within a grid that is contained within a scrollview. I have an imageview that I am animating from one cell to another in time with a slow finger movement and recentering the scrollview. That is rather straight forward. I have also implement the ability to detect a swipe and therefore move the image all the way to the end of the grid and the uiscrollview recentering. I have even implemented the ability to detect a subsequent tap and freeze the swiped movement. The issue with the swipe movement is that the UIScrollView will scroll all the way to the end before the Image reaches the end and so I have to wait for the image to arrive. Also, when I freeze the movement of the image, I have to re-align the image to a cell (which I can do). I have come to the realization that I have to animate the image one cell at a time for swipes and recentering the uiscrollview before moving the image to the next cell. I have attempted to implement this but I cannot come up with a solution that works or works properly. Can anyone suggest how I go about implementing this? Even if you are able to put up code from a different example or sudo code, it would help a lot as I cannot workout how this should be done, should I be using selectors, a listener in delegates, I just simply lack the experience to solve this design pattern. Here is some code: Note that the sprite is an UIImageView - (void)animateViewToPosition:(SpriteView *)sprite Position:(CGPoint)pos Duration:(CFTimeInterval)duration{ CGMutablePathRef traversePath = CGPathCreateMutable(); CGPathMoveToPoint(traversePath, NULL, sprite.center.x, sprite.center.y); CGPathAddLineToPoint(traversePath, NULL, pos.x, pos.y); CAKeyframeAnimation *traverseAnimation = [CAKeyframeAnimation animationWithKeyPath:kAnimatePosition]; traverseAnimation.duration = duration; traverseAnimation.removedOnCompletion = YES; traverseAnimation.timingFunction = [CAMediaTimingFunction functionWithName:kCAMediaTimingFunctionLinear]; traverseAnimation.delegate = sprite; traverseAnimation.path = traversePath; CGPathRelease(traversePath); [sprite.layer addAnimation:traverseAnimation forKey:kAnimatePosition]; sprite.center = pos;

    Read the article

  • Unable to use Maya animation with scripts when imported to Unity

    - by keshk
    I am testing to import Maya animation over to Unity. I set up a simple cylinder with 2 bones and an IK handle. Made a simple animation where the cylinder bends and goes back to straight position over 24 frames. Following that, I selected everything and baked, all bones,ik,(animation by selecting all at the graph editor) and even the cylinder. I saved the scene and then select all and export as FBX with animation and bake checked. In unity imported it and at the preview able to see the animation. When I load the model into scene and play (after assigning the controller), able to see animation too. But now when I try to script it and control the animation, nothing happens. Even to test, I tried the following under the Update method. if(animation.isPlaying) Debug.Log("Animation Works"); else Debug.Log("Animation not working"); The bool doesn't even return true nor false. My animation is called "bend", thus just for try I did the following and nothing happens. animation.Play("bend"); Can please advice based on my steps, am I missing something. Do I need to add the controller or is that an unnecessary step? Did I screw up on the Maya part or the Unity part. Thanks for help.

    Read the article

  • Core Animation performance on iphone

    - by nico
    I'm trying to do some animations using Core Animation on the iphone. I'm using CABasicAnimation on CALayer. It's a straight forward animation from a random place at the top of the screen to the bottom of the screen at random speed, I have 30 elements that doing the same animation continuously until another action happens. But the performance on the iPhone 3G is very sluggish when the animations start. The image is only 8k. Is this the right approach? How should I change so it performs better. // image cached somewhere else. CGImageRef imageRef = [[UIImage imageWithContentsOfFile:[[NSBundle mainBundle] pathForResource:name ofType:@"png"]] CGImage]; - (void)animate:(NSTimer *)timer { int startX = round(radom() % 320); float speed = 1 / round(random() % 100 + 2); CALayer *layer = [CALayer layer]; layer.name = @"layer"; layer.contents = imageRef; // cached image layer.frame = CGRectMake(0, 0, CGImageGetWidth(imageRef), CGImageGetHeight(imageRef)); int width = layer.frame.size.width; int height = layer.frame.size.height; layer.frame = CGRectMake(startX, self.view.frame.origin.y, width, height); [effectLayer addSublayer:layer]; CGPoint start = CGPointMake(startX, 0); CGPoint end = CGPointMake(startX, self.view.frame.size.height); float repeatCount = 1e100; CABasicAnimation *animation = [CABasicAnimation animationWithKeyPath:@"position"]; animation.delegate = self; animation.fromValue = [NSValue valueWithCGPoint:start]; animation.toValue = [NSValue valueWithCGPoint:end]; animation.duration = speed; animation.repeatCount = repeatCount; animation.autoreverses = NO; animation.removedOnCompletion = YES; animation.fillMode = kCAFillModeForwards; [layer addAnimation:animation forKey:@"position"]; } The animations are fired off using a NSTimer. animationTimer = [NSTimer timerWithTimeInterval:0.2 target:self selector:@selector(animate:) userInfo:nil repeats:YES]; [[NSRunLoop currentRunLoop] addTimer:animationTimer forMode:NSDefaultRunLoopMode];

    Read the article

  • Watch Favorite Classic Movies in 16-Bit Animation Glory at PixelMash Theater

    - by Asian Angel
    Are you ready for a quick bit of retro fun? Then sit back and enjoy movie favorites like Star Wars, Indiana Jones, Back to the Future, and more in these condensed version 16-bit animated GIFs. Note: You can select your favorite movies from the list on the left side of the homepage. PixelMash Theater Homepage [via Neatorama] 7 Ways To Free Up Hard Disk Space On Windows HTG Explains: How System Restore Works in Windows HTG Explains: How Antivirus Software Works

    Read the article

  • 2D animation example in pyglet (python) looping through 2 images/sprites every x seconds

    - by Bentley4
    Suppose you have two images: step1.png and step2.png . Can anyone show me a very simple example in pyglet how to loop through those 2 images say every 0.5 seconds? The character doesn't have to move, just a simple black screen with a fixed region wherein the two images continually change every 0.5 secs. I know how to make a character move, shoot projectiles etc. but I just can't figure out how to control the looping speed of the images.

    Read the article

  • My first animation - Using SDL.NET C#

    - by Mark
    Hi all! I'm trying to animate a player object in my 2D grid when the user clicks somewhere in the screen. I got the following 4 variables: oX (Current player position X) oY (Current player position Y) dX (Destination X) dY (Destination Y) How can I make sure the player moves in a straight line to the new XY coordinates. The way I'm doing it now is really awfull and causes the player to first move along x axis, and finally in y axis. Can someone give me some guidance with the involved math cause I'm really not sure on how to accomplish this. Thank you for your time. Kind regards, Mark Update: It's working now but whats the right way to check if the current positions are equal to the target position? private static void MovePlayer(double x2, double y2, int duration) { double hX = x2 - m_PlayerPosition.X; double hY = y2 - m_PlayerPosition.Y; double Length = Math.Sqrt(Math.Pow(hX, 2) + Math.Pow(hY, 2)); hX = hX / Length; hY = hY / Length; while (m_PlayerPosition.X != Convert.ToInt32(x2) || m_PlayerPosition.Y != Convert.ToInt32(y2)) { m_PlayerPosition.X += Convert.ToInt32(hX * 1); m_PlayerPosition.Y += Convert.ToInt32(hY * 1); UpdatePlayerLocation(); } }

    Read the article

  • How do I export physique animations without breaking them?

    - by Paul Ferris
    I've been trying to export a simple footstep animation that I made in 3ds Max, but its either failed to export or broken (imported into unity sans a few frames, or appearing to have imported but not playing) every single time. I've tried .fbx and .3ds, but neither works. I'd rather not use the Skin modifier, because it would require starting from scratch and learning a new system. Any ideas? EDIT: I found a workaround, here it is if you're curious: Create your biped, and make sure it lines up with your mesh. Animate it Export the mesh without Physique (or with Physique turned off), then delete it (the mesh) Export the biped Recombine in Unity (or whatever your game engine of choice is)

    Read the article

  • 2D animations frames vs 3D animation for small indie project: timing considerations

    - by mm24
    pretty lame question but was wondering.. I am developing a 2D game using Cocos2D for iOS. The art work till now is all 2D (is a shooter game) but some of the characters would benefit of complex animations (eg. 20 frames). I feel a bit stupid because I came across only now that there is the chance to do 3D to 2D frames exporting and then to use them in Cocos2D. The thing that put me off on 3D gaming at first was that it takes more than one person in a team to do so properly (Illustrator, 3D modeller, 3D animator and programmer). Now I feel a bit stupid because having a 3D model I could do and modify the poses whenever I wanted (I should ask to the 3D animator which I guess would be time expensive). Instead now is me and two illustrators (as I require many frames per character). Is my impression that it would have been much longer right or not? Are there any other project management considerations that can be done on this? Sorry if for some this might be trivial but is my first "indie game developer experience".

    Read the article

  • Applying prerecorded animations to models with the same skeleton

    - by Jeremias Pflaumbaum
    well my question sounds a bit like, how do I apply mo-cap animations to my model, but thats not really it I guess. Animations and model share the same skeleton, but the models vary in size and proportion, but I still want to be able to apply any animation to any model. I think this should be possible since the models got the same skeleton bone structure and the bones are always in the same area only their position varies from model to model. In particular Im trying to apply this to 2D characters that got 2arm, 2legs, a head and a body, but if you got anything related to that topic even if its 3D related or keywords, articles, books whatever Im gratefull for everything cause Im a bit stuck at the moment. cheers Jery

    Read the article

  • Engine for 2D Top-Down Physics-Based Skeletal Animation

    - by RylandAlmanza
    I just watched at the Sui Generis video, and was completely amazed. Specifically, the part where the big troll thing is beating up the player with his flail. This got me really excited, and I would like to try implementing something like this in a 2D Top-Down format. Something like this. That atloria example seems simple enough, but it's not exactly what I'm looking to make. I think atloria is using predefined animations, where as I would like to make something more physics-based like the Sui Generis engine does. So, I'm wondering what physics engines might work for something like this, and if I'd need to implement my own skeletal system, or if I could just use "joints" and such from the engine. The only experience I have in terms of physics engines is Box2D, which I've heard shouldn't be used for top-down settings, and I can think of a few reasons it wouldn't work out well. One of those reasons being gravity. In box 2D, gravity pulls towards a side of the screen (usually the bottom.) I wouldn't want my player's forearms constantly being pulled to one side. :) Also should mention that the programming language doesn't matter all that much to me. I'm currently playing with HTML5 stuff, though. :) Thanks in advance!

    Read the article

  • Blender to 3ds max to cal3d format

    - by Kaliber64
    There are quite a few questions on cal3d but they are old and don't apply anymore. In Blender(must be 2.49a for python script to work!!!): I have a scene with 7 meshes, 1 armature, 10 bones. I tried going to one mesh to simplify it but doesn't change anything. I found a small blend file that was used for cal3d and it exported just fine. So I tried to copy it's setup with no success. EDIT*8/13/2012 In the last week here is what I have found so far. I made the mesh in the newest blender(2.62?) and exported it to import it in the old one(2.49a). Did an animation in the old one because importing new blend files to old blenders, its just said it would lose keyframe data and all was good. And then you get the last problem of it not exporting meshes. BUT I found that meshes made in the old one export regardless. I can't find any that won't export. So if I used the old blender to remake my model I could get it to export :) At this point I found a modified release of cal3d (because the most core model variable would not initiate as I made a really small test subject in old blender instead of remaking my big one which took 4 hours.) which fixes the morph objects and adds what cal3d left off with. Under their license they have to release the modification but it has no documentation so I have to figure it out on my own. Its mostly the same. But with this lib it came with a 3ds max exporter. My question now is how do I transfer armature and mesh information from blender to 3ds max in order to export into cal3d format. Every time I try the models are see through and small and there are no bones. The formats I have tried to import are .3ds .obj(mesh only) and COLLADA. In all of them the mesh is invisible and no bones. It says the default texture is on so I should be able to see it. All the vertices are present I found a vertex highlighter so I can see those. If any of this is confusing let me know so I can clear it up. Its late .<=sleep.

    Read the article

  • Some frames are not showing in Frame Animation

    - by Aju Vidyadharan
    I am doing a frame to frame animation. My problem is I have given around 10 drawable images in my anim xml. But only first two and last two is showing not all the images. I am doing a translation also on this image.After translation only frame animation starts.Translation is happening and frame animation also happening but it is not showing all the frames. Here is my anim xml. only frog_01 and frog_02 is showing. <animation-list xmlns:android="http://schemas.android.com/apk/res/android" android:oneshot="true" > <item android:drawable="@drawable/frog_01" android:duration="70"/> <item android:drawable="@drawable/frog_02" android:duration="70"/> <item android:drawable="@drawable/frog_03" android:duration="70"/> <item android:drawable="@drawable/frog_04" android:duration="70"/> <item android:drawable="@drawable/frog_05" android:duration="70"/> <item android:drawable="@drawable/frog_04" android:duration="70"/> <item android:drawable="@drawable/frog_03" android:duration="70"/> <item android:drawable="@drawable/frog_02" android:duration="70"/> <item android:drawable="@drawable/frog_01" android:duration="70"/> </animation-list> Here is the code which I am using for the translation and Frame animation... public void frogAnim() { frogView.clearAnimation(); final TranslateAnimation fslide2 = new TranslateAnimation(10, 65, 0, 0); fslide2.setDuration(400); fslide2.setFillAfter(true); fslide2.setAnimationListener(fanimationListener1); frogView.startAnimation(fslide2); c = false; } AnimationListener fanimationListener1 = new AnimationListener() { public void onAnimationEnd(Animation arg0) { c = true; frogView.setBackgroundResource(R.drawable.frog_movement); frogFrameAnimation = (AnimationDrawable) frogView.getBackground(); frogFrameAnimation.start(); playAudioFileListener(R.raw.frog, player); CountDownTimer count = new CountDownTimer(200, 700) { @Override public void onTick(long millisUntilFinished) { } @Override public void onFinish() { frogFrameAnimation.stop(); titileAnimMusic(R.drawable.frog_title, R.anim.alpha_fade_in1, R.raw.vo_child_frog, player); } }; count.start(); } public void onAnimationRepeat(Animation animation) { // TODO Auto-generated method stub } public void onAnimationStart(Animation animation) { } };

    Read the article

  • Raphaeljs animation kills my browser

    - by user1688606
    I have this code where I have a made a character using 20 paths and put it into a set. Now when I animate the set, the first transformation runs smoothly, the second animation stutters, the third animation doesn't happen as it should and the 4th animation kills my pc, the browser hangs and in the task manager I can see that it consumes up to 70% of CPU. How can I avoid this and free the resources so all the animations run smoothly. *I have to execute 10 simple y-axis transformation animations on that character. JS Fiddle window.onload = function(){ var paper = Raphael(0,0,400,400); var character = paper.set(); paper.setStart(); var attr = {fill:'red',stroke:'none'}; var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var shape = paper.rect(100,100,10,20).attr(attr); var character = paper.setFinish(); character.transform("t0,200") //1st animation.. var chartrnsfrm = Raphael.animation({ transform:'...t0,-48' },1000,"easeout",function(){ character.animate(chartrnsfrm1.delay(2000)) }); character.animate(chartrnsfrm.delay(2000)); //2nd animation.. var chartrnsfrm1 = Raphael.animation({ transform:'...t0,-48' },1000,"easeout",function(){ character.animate(chartrnsfrm2.delay(2000)) }); //3rd animation.. var chartrnsfrm2 = Raphael.animation({ transform:'...t0,-48' },1000,"easeout",function(){ character.animate(chartrnsfrm3.delay(2000)) }); //4th animation.. var chartrnsfrm3 = Raphael.animation({ transform:'...t0,-48' },1000,"easeout"); }

    Read the article

  • Make a animation path separated by clicks

    - by Tomáš Zato
    I have a long text on powerpoint slide. Instead of separating it on multiple slides, I made an animation that moves it up using animation path, so that text hidden at bottom appears while text on top goes off screen. However, I need more move animations to reaveal more text (the text takes more than 2 screens). This means, I need two (or more) animation paths (of the same length) and I want them to move obejct from position, where the last path has left it. Instead, multiple animations always operate with objects original position. That's useless. You can download test document, where I made an example of what I want: animation test.pptx

    Read the article

  • Android Frame by Frame Animation problem on elements in a CursorAdapter

    - by Pandalover
    I am having trouble applying an animation to a View. I am trying to load the animation from inside the constructor of a CursorAdapter, so I can set it later assign it to certain children in the list. In the constructor I have : shineAnimation = AnimationUtils.loadAnimation(ctx, R.anim.news_list_item_shine); the animation is in my res/anim dir <?xml version="1.0" encoding="utf-8"?> <animation-list xmlns:android="http://schemas.android.com/apk/res/android" android:oneshot="true"> <item android:drawable="@drawable/shine1" android:duration="200" /> <item android:drawable="@drawable/shine2" android:duration="200" /> <item android:drawable="@drawable/shine3" android:duration="200" /> <item android:drawable="@drawable/shine4" android:duration="200" /> <item android:drawable="@drawable/shine5" android:duration="200" /> </animation-list> I'm getting an exception : Unknown animation name: animation-list Help would be much appreciated Thanks S

    Read the article

  • How to programatically retarget animations from one skeleton to another?

    - by Fraser
    I'm trying to write code to transfer animations that were designed for one skeleton to look correct on another skeleton. The source animations consist only of rotations except for translations on the root (they're the mocap animations from the CMU motion capture database). Many 3D applications (eg Maya) have this facility built-in, but I'm trying to write a (very simple) version of it for my game. I've done some work on bone mapping, and because the skeletons are hierarchically similar (bipeds), I can do 1:1 bone mapping for everything but the spine (can work on that later). The problem, however, is that the base skeleton/bind poses are different, and the bones are different scales (shorter/longer), so if I just copy the rotation straight over it looks very strange: I've tried multiplying by the original bone's absolute rotation, then by the inverse of the target, and vice-versa... kind of a shot in the dark, and indeed it didn't work. (Tried relative transformations too)... I'm not sure where to go from here, so if anyone has any resources on stuff like this (papers, source code, etc), that would be really helpful. Thanks!

    Read the article

  • How to Disable the Animations on the Windows 8 Start Screen

    - by Usman
    Who doesn’t love animations? They make everything look so cool. But in some cases, animations are a distraction, and the same is true for Windows 8′s start screen (the “Modern UI”). Fortunately, there’s a very simple way to disable all those animations. Keep reading to find out how it’s done. The animations are especially noticeable when you switch from the good ol’ peaceful desktop to the start screen by pressing the winkey. I don’t know about you, but it feels like I’m getting dizzy by watching all those crazy animations over and over again. People have found out ways to enhance the start screen animations, add delay to various elements and stuff like that. But we’re going the other way, disabling the animations completely. To do so, log in, and when the start screen appears, type “Computer” (it will pop up in the search results before you’ve even finished typing). Our Geek Trivia App for Windows 8 is Now Available Everywhere How To Boot Your Android Phone or Tablet Into Safe Mode HTG Explains: Does Your Android Phone Need an Antivirus?

    Read the article

  • Making a ViewFlipper like the Home Screen using MotionEvent.ACTION_MOVE

    - by DJTripleThreat
    Ok I have a ViewFlipper with three LinearLayouts nested inside it. It defaults to showing the first one. This code: // Assumptions in my Activity class: // oldTouchValue is a float // vf is my view flipper @Override public boolean onTouchEvent(MotionEvent touchEvent) { switch (touchEvent.getAction()) { case MotionEvent.ACTION_DOWN: { oldTouchValue = touchEvent.getX(); break; } case MotionEvent.ACTION_UP: { float currentX = touchEvent.getX(); if (oldTouchValue < currentX) { vf.setInAnimation(AnimationHelper.inFromLeftAnimation()); vf.setOutAnimation(AnimationHelper.outToRightAnimation()); vf.showNext(); } if (oldTouchValue > currentX) { vf.setInAnimation(AnimationHelper.inFromRightAnimation()); vf.setOutAnimation(AnimationHelper.outToLeftAnimation()); vf.showPrevious(); } break; } case MotionEvent.ACTION_MOVE: { // TODO: Some code to make the ViewFlipper // act like the home screen. break; } } return false; } public static class AnimationHelper { public static Animation inFromRightAnimation() { Animation inFromRight = new TranslateAnimation( Animation.RELATIVE_TO_PARENT, +1.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f); inFromRight.setDuration(350); inFromRight.setInterpolator(new AccelerateInterpolator()); return inFromRight; } public static Animation outToLeftAnimation() { Animation outtoLeft = new TranslateAnimation( Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, -1.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f); outtoLeft.setDuration(350); outtoLeft.setInterpolator(new AccelerateInterpolator()); return outtoLeft; } // for the next movement public static Animation inFromLeftAnimation() { Animation inFromLeft = new TranslateAnimation( Animation.RELATIVE_TO_PARENT, -1.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f); inFromLeft.setDuration(350); inFromLeft.setInterpolator(new AccelerateInterpolator()); return inFromLeft; } public static Animation outToRightAnimation() { Animation outtoRight = new TranslateAnimation( Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, +1.0f, Animation.RELATIVE_TO_PARENT, 0.0f, Animation.RELATIVE_TO_PARENT, 0.0f); outtoRight.setDuration(350); outtoRight.setInterpolator(new AccelerateInterpolator()); return outtoRight; } } ... handles the view flipping but the animations are very "on/off". I'm wondering if someone can help me out with the last part. Assuming that I can access the LinearLayouts, is there a way where I can set the position of the layouts based on deltaX and deltaY? Someone gave me this link: https://android.git.kernel.org/?p=platform/frameworks/base.git;a=blob;f=core/java/android/view/animation/TranslateAnimation.java;h=d2ff754ac327dda0fe35e610752abb78904fbb66;hb=HEAD and said I should refer to the applyTransformation method for hints on how to do this but I don't know how to repeat this same behavior.

    Read the article

  • UIView animation cancels previous animation?

    - by user281300
    Hi I have an NSTIMER that counts the time, and on t = 10, it fires an animation but during that time it might happen that another animation is running. This causes the previously running animation to cut off. Any idea? i thought UIVIEW animations were ran in diff threads. I cannot use a willstop selector here since t = 10 might happen while another animation is running and might not have ended yet.

    Read the article

  • Stopping the animation after you let go of a key

    - by Michael Zeuner
    What I have right now is an animation that starts when I press space: if(input.isKeyDown(Input.KEY_SPACE)) player = movingRightSwingingSword; However when I stop clicking space my animation continues. until I move my player, how do I make it so it stops the animation right when you let go of space? A few lines Animation player, movingUp, movingDown, movingLeft, movingRight, movingRightSwingingSword; int[] duration = {200,200}; public void init(GameContainer gc, StateBasedGame sbg) throws SlickException { Image[] attackRight = {new Image("res/buckysRightSword1.png"), new Image("res/buckysRightSword2.png")}; movingRightSwingingSword = new Animation(attackRight, duration, true); } public void update(GameContainer gc, StateBasedGame sbg, int delta) throws SlickException { if(input.isKeyDown(Input.KEY_SPACE)) player = movingRightSwingingSword; } Full Code package javagame; import org.newdawn.slick.*; import org.newdawn.slick.state.*; public class Play extends BasicGameState { Animation player, movingUp, movingDown, movingLeft, movingRight, movingRightSwingingSword; Image worldMap; boolean quit = false; int[] duration = {200,200}; float playerPositionX = 0; float playerPositionY = 0; float shiftX = playerPositionX + 320; float shiftY = playerPositionY + 160; public Play(int state) { } public void init(GameContainer gc, StateBasedGame sbg) throws SlickException { worldMap = new Image("res/world.png"); Image[] walkUp = {new Image("res/buckysBack.png"), new Image("res/buckysBack.png")}; Image[] walkDown = {new Image("res/buckysFront.png"), new Image("res/buckysFront.png")}; Image[] walkLeft = {new Image("res/buckysLeft.png"), new Image("res/buckysLeft.png")}; Image[] walkRight = {new Image("res/buckysRight.png"), new Image("res/buckysRight.png")}; Image[] attackRight = {new Image("res/buckysRightSword1.png"), new Image("res/buckysRightSword2.png")}; movingUp = new Animation(walkUp, duration, false); movingDown = new Animation(walkDown, duration, false); movingLeft = new Animation(walkLeft, duration, false); movingRight = new Animation(walkRight, duration, false); //doesnt work! vvv movingRightSwingingSword = new Animation(attackRight, duration, true); player = movingDown; } public void render(GameContainer gc, StateBasedGame sbg, Graphics g) throws SlickException { worldMap.draw(playerPositionX, playerPositionY); player.draw(shiftX, shiftY); g.drawString("Player X: " + playerPositionX + "\nPlayer Y: " + playerPositionY, 400, 20); if (quit == true) { g.drawString("Resume (R)", 250, 100); g.drawString("MainMenu (M)", 250, 150); g.drawString("Quit Game (Q)", 250, 200); if (quit==false) { g.clear(); } } } public void update(GameContainer gc, StateBasedGame sbg, int delta) throws SlickException { Input input = gc.getInput(); if(input.isKeyDown(Input.KEY_UP)) { player = movingUp; playerPositionY += delta * .1f; if(playerPositionY>162) playerPositionY -= delta * .1f; } if(input.isKeyDown(Input.KEY_DOWN)) { player = movingDown; playerPositionY -= delta * .1f; if(playerPositionY<-600) playerPositionY += delta * .1f; } if(input.isKeyDown(Input.KEY_RIGHT)) { player = movingRight; playerPositionX -= delta * .1f; if(playerPositionX<-840) playerPositionX += delta * .1f; } if(input.isKeyDown(Input.KEY_LEFT)) { player = movingLeft; playerPositionX += delta * .1f; if(playerPositionX>318) playerPositionX -= delta * .1f; } if(input.isKeyDown(Input.KEY_SPACE)) player = movingRightSwingingSword; if(input.isKeyDown(Input.KEY_ESCAPE)) quit = true; if(input.isKeyDown(Input.KEY_R)) if (quit == true) quit = false; if(input.isKeyDown(Input.KEY_M)) if (quit == true) {sbg.enterState(0); quit = false;} if(input.isKeyDown(Input.KEY_Q)) if (quit == true) System.exit(0); } public int getID() { return 1; } }

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >