animation

Animate show/hide elements on iPhone

I try to fade the datepicker in and out smootly based on the switch setting on a view like below. I have tried the following in my view controller, but that just turns it on/off without animating. -(IBAction)swithChanged:(id)sender{ BOOL setting = dateSwitch.isOn; [UIView beginAnimations:nil context:NULL]; [UIView setAnimati...

WPF InvalidateMeasure not called during or after animation

I have a custom ListBox whith the following ListBoxItem style. It contains a few animations to scale the ListBoxItem when the mouse hovers over it. <Style x:Key="notesListBoxStyle" TargetType="{x:Type ListBoxItem}"> <Setter Property="Template"> <Setter.Value> <ControlTemplate TargetType="{x:Type ListBoxItem}"> ...

How do I morph a class with Scripty 2?

In Scriptaculous 1, you could animate styles: new Effect.Morph('id', { style: { background: tomato }, duration: '4' }); But a better way was to keep the CSS and JS separate and merely reference a class: new Effect.Morph('id', { style: 'important', duration: '4' }); Marvellous. But this doesn't seem to work with the new Scripty 2. W...

WPF: Prevent "Completed" event from firing after removing animation

How can I remove a running animation from a WPF element in such a way that its Completed event does not fire? The solutions presented here and here remove the animation's visible effects, but the Completed event still fires at the time that the animation would have completed. Here's some code that demonstrates my problem (it's in the ...

Billboard orientation toward camera (point) without normals

So I have a circle of planes which get constructed as: plane.x = Math.cos(angle) * radius; plane.z = Math.sin(angle) * radius; plane.rotationY = (-360 / numItems) * i - 90; which calculates how many angular slices there are for total number of planes (rotationY) and places each plane into it's place on a circle of radius. then to upd...

How do I animate a view in this weird way?

I'm programming for the iPhone and I have an idea for an animation that I want to implement. I want a user tapping on a UITableView cell and it turning 90 degrees and filling up the whole screen with another view that I've made. I'm wondering how I would do this as well as what knowledge I would need to do this. Thanks. Update - I mea...

Does a WPF storyboard animation continue to run when the affected control is hidden?

I am implementing a "marching ants" style animation by applying a StrokeDashOffset animation to a Rectangle control. I would like the animation to play when the rectangle is visible but not take up extra CPU cycles when it's hidden. Is WPF smart enough to automatically pause the animation when the affected control is hidden? ...

Iphone page curl animation issue.

Hi, I am trying to do a page curl animation which works fine. My issue comes with the fact that I am only animating the subview which is an imageview and the imageview contains an image with a transparent background. When i run the animation, I can see the transparent background of the image being highlighed to black and that creates an ...

addSubview animation

I have main UIView where I display different data. Then I put a button, which displays subview like this: - (IBAction) buttonClicked: (id) sender { UIView *newView = [[UIView alloc] initWithFrame:CGRectMake(25,25,50,20)]; UILabel *newLabel = [[UILabel alloc] initWithFrame:CGRectMake(25,25, 50,25)]; newLabel.text = @"some text"; ...

What is the standard way of transitioning between views?

Hi, I was wondering if there is a standard way (or best-practices way) of transitioning between two views in WPF? For example, if you are looking at one particular view, and you click a button (e.g. a "Next" button) and you want to transition into the next view, what is the best-practices way of doing that? I have seen a few examples o...

Why don't these animations work when I'm using a storyboard?

I've created a simple subclass of StackPanel that I can move around on the screen using an animated TranslateTransform. It looks like this: public class MovingStackPanel : StackPanel { public void BeginMove(Point translatePosition) { RenderTransform = new TranslateTransform(); Duration d = new Duration(new TimeS...

Flash a container's background orange (like SO does when you navigate directly to an answer)

I want #container's background to flash orange and then return to its normal color. Is there any better way to accomplish this than: var old_bg_color = $('#container').css('background-color'); $('#container').css('background-color', 'orange') .animate({backgroundColor: old_bg_color}, 3000); ...

Problem in animation of progressbar in QT

Hi.. i did progress bar in QT, i used both in emulator and mobile.. the infinite progress bar in appearing but its not getting animated.. (infinite progress is not coming) here is the code which i hv written QApplication a(argc, argv); QProgressDialog *dialog = new QProgressDialog(); dialog->setMinimum(0); dialog->setMaximum(0); di...

Label background animation at runtime with WPF

Hello, I would like to create programmatically an animation for the background color of a label but I have some problems. I have implemented the following code: Public Sub DoBackgroundAnimation(ByVal obj As Label) If obj Is Nothing Then Return Dim animatedBrush As New SolidColorBrush() animatedBrush.Color = ...

How can I use with JS/CSS/HTML5 animation to get flash like animations? eg a PagePeel

Specifically, I am talking about a decent "realistic" looking page peel from one images to the next in a set. This sort of technology will be vital to the success of Apple's new anti-flash, pro HTML5 push. Flash excels at complex and robust animations. Is it possible to create the same effects using only HTML5/JS/CSS today? I found this...

How can I execute multiple, simultaneous jquery effects?

I am animating some error/validation elements on a page. I want them to bounce and be highlighted, but at the same time if possible. Here's what I'm currently doing: var els = $(".errorMsg"); els.effect("bounce", {times: 5}, 100); els.effect("highlight", {color: "#ffb0aa"}, 300); This causes the elements to first bounce, and THEN be...

Using an animated UIImageView as an iPhone camera overlay

Like the title says, in the iPhone SDK, I want to create an animated UIImageView and use it as a camera overlay. However, nothing appears. I've been using the same setup to display a static image as an overlay, but when trying to use the following code, no overlay appears: imageView.animationImages = [NSArray arrayWithObjects: ...

How do I use Flip Transition to go from a UIView to a TableViewController with a NavigationController?

I have two views: one has just a button (view 1) and the other contains a tableview with a search bar (screen2). When the user clicks that button in view 1, I want view 1 to flip and display screen 2. View 2 resides inside of the navigational controller with a navigation bar on top. Below is what I have for now. The transition animati...

Animating with Ruby

This relates to both physical programming as well as Ruby running on a web server. I have an array of RGB leds, which is 5x5 so a total of 25 leds. They are numbered and individually addressable as such: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 Here is a photo: As for the hardwa...

How to optimize this js (now CPU is over 40% when the page is opened)

I have this piece of JavaScript on my page and it loads the CPU considerably. Is there any way to optimize the code? ( I'm using jQuery, so jQuery solutions will be fine ) function Particle() { this.particleContainerWidth = $('#particle-container').width() - 100; this.particleContainerHeight = $('#particle-conta...