UIView Animation Question

To all,
I have a question about how to handle the asynchronous call when a UIView animation is created. My setup is as follows. I have a method in a view controller that get user input from and then makes external http calls. Since the calls could take a few seconds I wanted to notify the user when the call started and ended. In order to show this message I created a simple animation block in a method which I will list below.
The animation simply slides a box up with a label on it and then slides it back down. A pop up slider if you will.
This is my method which does the http processing simplified down.
My problem is that since the animation call is asynchronous the and takes 4 seconds total to complete. If the HTTP processing takes less then 4 seconds (at times it does) the next displayMessage is called and my animation gets screwed up.
The thoughts I have had were to have a check to see if the animation was running which is set true in the pop up reveal and false in the popup hide. Then I could simply sleep my thread if the boolean was true. But this wasn't working since the animation stop block was never called.
I need to bounce ideas of you guys cause I don't know how to get past this basic problem.
- (void)loadPostViewController:(id)sender
[self displayMessage:@"Parsing address"];
//Actual http processing code here which invokes external service
[self displayMessage:@"Address processed"];
- (void)displayMessage:(NSString *) inMessage
CGFloat PostListViewXOFFSET = 20.0f;
CGFloat PostListViewYOFFSET = 20.0f;
NSInteger messageWidth = 150;
NSInteger messageHeight = 60;
self.transitioning = TRUE;
self.view.userInteractionEnabled = NO;
UIView *localContainerView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
CGRect messageFrame = CGRectMake(0,0,messageWidth, messageHeight);
roundedRectangle *view = [[roundedRectangle alloc] initWithFrame:messageFrame x:0 y:0 Width:messageWidth Height:messageHeight cIndex:0 radius:10.0f positionIndex:0];
CGRect frameOut = CGRectMake((localContainerView.bounds.size.width/2)-(messageWidth/2),localConta inerView.bounds.size.height+messageHe ight, messageWidth, messageHeight);
UILabel *mylabel = [[UILabel alloc] initWithFrame:CGRectMake(PostListViewXOFFSET, PostListViewYOFFSET, messageWidth-40,20)];
mylabel.font = [UIFont fontWithName:@"Helvetica" size:12];
mylabel.textColor = [UIColor blackColor];
mylabel.text = inMessage;
mylabel.backgroundColor = [UIColor clearColor];
self.messageLabel = mylabel;
[view addSubview:mylabel];
[mylabel release];
view.frame = frameOut;
self.messageView = view;
[self.view addSubview:view];
[UIView beginAnimations: nil context: nil]; // Tell UIView we're ready to start animations.
[UIView setAnimationDelegate: self]; // Set the delegate (Only needed if you need to use the animationDid... selectors)
[UIView setAnimationDidStopSelector: @selector(animationDidStop:finished:context:)]; // example of a selector called with context when animation finishes.
[UIView setAnimationCurve: UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration: 2.0f]; // Set the duration to 4/10ths of a second.
CGRect frameIn = view.frame; // Get the current frame.
frameIn.origin.x = (localContainerView.bounds.size.width/2)-(messageWidth/2); // Move the view completely on screen.
frameIn.origin.y = localContainerView.bounds.size.height-(messageHeight+20.0f);
view.frame = frameIn; // set the new frame
[UIView commitAnimations]; // Animate!
[view release];
- (void)animationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context
self.transitioning = FALSE;
[self HideMessage];
- (void)HideMessage
NSInteger messageWidth = 150;
NSInteger messageHeight = 60;
UIView *localContainerView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
CGRect frameOut = CGRectMake((localContainerView.bounds.size.width/2)-(messageWidth/2),localConta inerView.bounds.size.height+messageHe ight, messageWidth, messageHeight);
[UIView beginAnimations: nil context: nil]; // Tell UIView we're ready to start animations.
[UIView setAnimationDelegate: self]; // Set the delegate (Only needed if you need to use the animationDid... selectors)
[UIView setAnimationDidStopSelector: @selector(clearMessageView)]; // example of a selector called with context when animation finishes.
[UIView setAnimationCurve: UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration: 2.0f]; // Set the duration to 4/10ths of a second.
self.messageView.frame = frameOut; // set the new frame
[UIView commitAnimations]; // Animate!
}

To all,
I have a question about how to handle the asynchronous call when a UIView animation is created. My setup is as follows. I have a method in a view controller that get user input from and then makes external http calls. Since the calls could take a few seconds I wanted to notify the user when the call started and ended. In order to show this message I created a simple animation block in a method which I will list below.
The animation simply slides a box up with a label on it and then slides it back down. A pop up slider if you will.
This is my method which does the http processing simplified down.
My problem is that since the animation call is asynchronous the and takes 4 seconds total to complete. If the HTTP processing takes less then 4 seconds (at times it does) the next displayMessage is called and my animation gets screwed up.
The thoughts I have had were to have a check to see if the animation was running which is set true in the pop up reveal and false in the popup hide. Then I could simply sleep my thread if the boolean was true. But this wasn't working since the animation stop block was never called.
I need to bounce ideas of you guys cause I don't know how to get past this basic problem.
- (void)loadPostViewController:(id)sender
[self displayMessage:@"Parsing address"];
//Actual http processing code here which invokes external service
[self displayMessage:@"Address processed"];
- (void)displayMessage:(NSString *) inMessage
CGFloat PostListViewXOFFSET = 20.0f;
CGFloat PostListViewYOFFSET = 20.0f;
NSInteger messageWidth = 150;
NSInteger messageHeight = 60;
self.transitioning = TRUE;
self.view.userInteractionEnabled = NO;
UIView *localContainerView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
CGRect messageFrame = CGRectMake(0,0,messageWidth, messageHeight);
roundedRectangle *view = [[roundedRectangle alloc] initWithFrame:messageFrame x:0 y:0 Width:messageWidth Height:messageHeight cIndex:0 radius:10.0f positionIndex:0];
CGRect frameOut = CGRectMake((localContainerView.bounds.size.width/2)-(messageWidth/2),localConta inerView.bounds.size.height+messageHe ight, messageWidth, messageHeight);
UILabel *mylabel = [[UILabel alloc] initWithFrame:CGRectMake(PostListViewXOFFSET, PostListViewYOFFSET, messageWidth-40,20)];
mylabel.font = [UIFont fontWithName:@"Helvetica" size:12];
mylabel.textColor = [UIColor blackColor];
mylabel.text = inMessage;
mylabel.backgroundColor = [UIColor clearColor];
self.messageLabel = mylabel;
[view addSubview:mylabel];
[mylabel release];
view.frame = frameOut;
self.messageView = view;
[self.view addSubview:view];
[UIView beginAnimations: nil context: nil]; // Tell UIView we're ready to start animations.
[UIView setAnimationDelegate: self]; // Set the delegate (Only needed if you need to use the animationDid... selectors)
[UIView setAnimationDidStopSelector: @selector(animationDidStop:finished:context:)]; // example of a selector called with context when animation finishes.
[UIView setAnimationCurve: UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration: 2.0f]; // Set the duration to 4/10ths of a second.
CGRect frameIn = view.frame; // Get the current frame.
frameIn.origin.x = (localContainerView.bounds.size.width/2)-(messageWidth/2); // Move the view completely on screen.
frameIn.origin.y = localContainerView.bounds.size.height-(messageHeight+20.0f);
view.frame = frameIn; // set the new frame
[UIView commitAnimations]; // Animate!
[view release];
- (void)animationDidStop:(NSString *)animationID finished:(NSNumber *)finished context:(void *)context
self.transitioning = FALSE;
[self HideMessage];
- (void)HideMessage
NSInteger messageWidth = 150;
NSInteger messageHeight = 60;
UIView *localContainerView = [[UIView alloc] initWithFrame:[[UIScreen mainScreen] applicationFrame]];
CGRect frameOut = CGRectMake((localContainerView.bounds.size.width/2)-(messageWidth/2),localConta inerView.bounds.size.height+messageHe ight, messageWidth, messageHeight);
[UIView beginAnimations: nil context: nil]; // Tell UIView we're ready to start animations.
[UIView setAnimationDelegate: self]; // Set the delegate (Only needed if you need to use the animationDid... selectors)
[UIView setAnimationDidStopSelector: @selector(clearMessageView)]; // example of a selector called with context when animation finishes.
[UIView setAnimationCurve: UIViewAnimationCurveEaseInOut];
[UIView setAnimationDuration: 2.0f]; // Set the duration to 4/10ths of a second.
self.messageView.frame = frameOut; // set the new frame
[UIView commitAnimations]; // Animate!
}

Similar Messages

  • UIView Animation Problem with different Controllers

    Hello!
    I have a problem regarding the UIView animation and therefore, I have three questions:
    1. is it possible to flip from view old to view new whereby each of the views have their own controller?
    2. Can I only flip views sharing the same controller?
    3. Maybe someone could help me with the following issue: I have two views, and each of the views have their own controller.. the code snippet illustrates my approach.. When i start my code, the new view is added on top of the old view, and the flipping animation is animating the old view only behind the new view.. Sure, this is not what i want to have.
    MapPrototypeAppDelegate *app = (MapPrototypeAppDelegate *)[[UIApplication sharedApplication] delegate];
    ReadGroupsViewController *aReadGroupsViewController = app.readGroupsTableViewController;
    UIWindow *window = app.window;
    [UIView beginAnimations:nil context:nil];
    [UIView setAnimationTransition: UIViewAnimationTransitionFlipFromRight forView:[self.mapView superview] cache:YES];
    [UIView setAnimationDuration:1.3];
    [UIView setAnimationDelegate:self];
    [window addSubview:[aReadGroupsViewController view]];
    [UIView commitAnimations];
    thanks..

    sommeralex wrote:
    1. is it possible to flip from view old to view new whereby each of the views have their own controller?
    Yes.
    2. Can I only flip views sharing the same controller?
    The flip animation may be used to transition between any "old" and "new" view without regard to whether those views have different controller's, the same controller, or no controller at all.
    3. Maybe someone could help me with the following issue: I have two views, and each of the views have their own controller.. the code snippet illustrates my approach.. When i start my code, the new view is added on top of the old view, and the flipping animation is animating the old view only behind the new view.. Sure, this is not what i want to have.
    MapPrototypeAppDelegate *app = (MapPrototypeAppDelegate *)[[UIApplication sharedApplication] delegate];
    ReadGroupsViewController *aReadGroupsViewController = app.readGroupsTableViewController;
    UIWindow *window = app.window;
    [UIView beginAnimations:nil context:nil];
    // the next line is puzzling. what is 'self.mapView', and what do you expect its superview to be? If 'self' is a
    // view controller, what is the relationship between its 'view' property and its 'mapView' property? Does 'view'
    // also have a superview? Is 'view' above or below 'mapView'? Is there a view between 'mapView' and the window?
    [UIView setAnimationTransition: UIViewAnimationTransitionFlipFromRight forView:[self.mapView superview] cache:YES];
    [UIView setAnimationDuration:1.3];
    [UIView setAnimationDelegate:self];
    // apropos the question above, what view is being covered in the next statement?
    [window addSubview:[aReadGroupsViewController view]];
    [UIView commitAnimations];
    I think I need a better understanding of the view hierarchy we have before aReadGroupsVC.view is added. The problem you're having is probably caused by passing the wrong view as arg here: [self.mapView superview]. But I can't say for sure since I don't know how mapView is related to the view hierarchy, and I don't know what it's superview is. It might be easier to just explain your "old" view structure and tell us how you want it to change after the flip transition.
    - Ray

  • Multiple UIVIew animations... delays

    I'm finding that when I'm running a UIView animation... an imageview which I'm moving from left to right...
    and I start a second UIView animation of the same type... there's a slight delay in the previous animation... so instead of a smooth motion there's a bit of a jerk.
    also, when one UIView animation ends, I find that there's the same type of delay in the remaining UIVIew animations...
    is there any way to stop such delays...

    And this problem only occurs on the iphone itself... not the simulator.. so maybe it is a question of memory?

  • How to cancel an UIView animation?

    If I have started an UIView animation using the UIView animation methods, how to cancel the animation while it is being executed?

    This issue seems to be somewhat complicated.
    There doesn't seem to be any direct way of telling a view to stop animating immediately (either by leaving the view to its current state or moving it immediately to its final state). It also tends to sometimes behave erratically when you try to interrupt an ongoing animation by starting a new one on the same view.
    What would be great is if there was some way of telling a view to stop animating immediately and to remove itself from the animation engine (or whatever it is), similarly to how you can eg. tell an NSTimer to invalidate itself immediately. This would make it easy to then eg. restart the animation or do something else with the view without having to worry about the view still changing after you tried to do something else with it, or about extraneous animationDidStop selector calls (which could mess up things). However, as far as I can see, there's no such feature in UIView.
    What you can try is to start a very short animation and set the animationDidStop selector to call whatever you wanted to do with the view at that point (eg. restart the animation). However, there doesn't seem to be any completely foolproof way of making this work for sure.
    Firstly, you have to make sure that the view actually changes from its current state, else UIView will just skip animating it and never call your new animationDidStop selector, which is a huge nuisance. This also seems to be somehow buggy; in some situations only changing eg. the location of the view or only changing its alpha doesn't properly trigger the animation, while sometimes it does.
    Secondly, it seems to be somewhat erratic whether UIView will call the original animationDidStop selector besides the newly defined one or not. What is worse the original selector might be called after the new one, as if the original animation never actually stopped. Thus you end up with one single animated view calling two different selectors at different points in time, which can mess things up pretty efficiently. And annoyingly, this only happens sometimes, not always.

  • Polygon drawn with CG gets distorted after a UIView animation.

    Hi all,
    I've managed to draw a polygon on an UIView with a helper function that gives me an array of CGPoints which I loop through going CGContextAddLineToPoint.
    I can rotate the polygon by applying a CAAffineTransformMakeRotation object, I have a UIButton associated with a rotate function and it works fine.
    Problem is if I move the UIView down (as with a UIView beginAnimations) and the polygon is rotated in any manner, I can see an animation of it being distorted and disappearing!
    Any clues???

    G'day mate! My favorite San Fran radio station is currently running a 60 sec. travel commercial featuring an authentic Aus announcer (or crocodile hunter) along with an American translator. The idea is to teach us to speak Australian before we get there. I'm a slow learner, but maybe by the time I learn Obj-C I'll know how to ask for directions to Queensland.
    No, I've never been a student at Stanford. CS 193P, last autumn, was given through the Stanford Center for Professional Development, so you didn't need to be a regular Stanford student; an application to the graduate school was required, but all the lectures were on video and I don't think you ever needed to be on campus to complete the course. I think the full tuition was over $3000. I would have gone for that if it had been a live class with the opportunity to ask questions. But I was told questions could only be asked by e-mail and those might or might not be answered in the recorded lectures. I didn't even ask my employer to pay for the class since my job was to develop Win32 apps. At the time I wasn't willing to confide a secret desire to become an iPhone programmer.
    Anyway.. (I can't wait to see the comments about people who litter this forum with their life story) I haven't yet built a test bed to try out your code, but you are indeed moving your subview by resetting the frame. Note the warning in the doc: "If the transform property is not the identity transform, the value of this property is undefined" [https://developer.apple.com/iphone/library/documentation/UIKit/Reference/UIVie wClass/UIView/UIView.html#//appleref/doc/uid/TP40006816-CH3-SW5].
    Try adding a translation to the current transform like this:
    CGAffineTransform t1 = myPolyView.transform;
    CGAffineTransform t2 = CGAffineTransformMakeTranslation(x, y);
    myPolyView.transform = CGAffineTransformConcat(t1, t2);

  • How do i reduce the number of frames in a UIView animation

    When animating a Uiview... for example the center of a UIImageView.... is there a way to reduce the number of frames that occur during the animation?
    The framerate is too high and making my app slow down significantly... thanks.

    If you do not have an image editor that allows to do that then use one of the online sites to resize images.
    * http://www.shrinkpictures.com/
    * http://www.picresize.com/

  • UIView animations problem

    Hi,
    I need some help with a small application I created to learn how animations work. My application consists of one UIView, one UIImageView, 2 buttons for scaling UIImageView up and down.
    @class AnimationsViewController;
    @interface AnimationsAppDelegate : NSObject <UIApplicationDelegate> {
    IBOutlet UIWindow *window;
    UIView* theView;
    UIImageView* theImageView;
    UIButton* scaleUpButton;
    UIButton* scaleDownButton;
    BOOL scalingUp;
    BOOL scalingDown;
    @property (nonatomic, retain) UIWindow *window;
    - (void)scaleUpButtonTouchDown;
    - (void)scaleUpButtonTouchUp;
    - (void)scaleDownButtonTouchDown;
    - (void)scaleDownButtonTouchUp;
    - (void)continueScalingUp;
    - (void)continueScalingDown;
    @end
    - (void)scaleUpButtonTouchDown {
    NSLog(@"scale up button touch down");
    NSLog(@"ustawiam scalingUp na 1");
    scalingUp = YES;
    [NSThread detachNewThreadSelector:@selector(continueScalingUp) toTarget:self withObject:nil];
    - (void)continueScalingUp {
    NSAutoreleasePool * thePool = [[NSAutoreleasePool alloc] init];
    NSLog(@"continue scaling up");
    while(scalingUp) {
    [UIView beginAnimations:nil context:nil];
    if(scale<5.03) {
    scale+=.01;
    NSLog(@"scale up multiplier = %f",scale);
    [UIView setAnimationDuration:.15];
    CGAffineTransform transform = CGAffineTransformMakeScale(scale,scale);
    theImageView.transform = transform;
    [UIView commitAnimations];
    [thePool release];
    - (void)scaleUpButtonTouchUp {
    NSLog(@"scale up button touch up inside");
    NSLog(@"ustawiam scalingUp na 0");
    scalingUp = NO;
    - (void)scaleDownButtonTouchDown {
    NSLog(@"scale down button touch down");
    scalingDown = YES;
    [NSThread detachNewThreadSelector:@selector(continueScalingDown) toTarget:self withObject:nil];
    - (void)continueScalingDown {
    NSAutoreleasePool * thePool = [[NSAutoreleasePool alloc] init];
    NSLog(@"continue scaling down");
    while(scalingDown) {
    [UIView beginAnimations:nil context:nil];
    if(scale>.02) {
    scale-=.01;
    NSLog(@"scale down multiplier = %f",scale);
    [UIView setAnimationDuration:.15];
    CGAffineTransform transform = CGAffineTransformMakeScale(scale,scale);
    theImageView.transform = transform;
    [UIView commitAnimations];
    [thePool release];
    - (void)scaleDownButtonTouchUp {
    NSLog(@"scale down button touch up inside");
    scalingDown = NO;
    So the main view looks like this:
    So when I touch the scale up button and hold it, the image should be scaled. And it is, but I cannot see any transition When I touch and hold the button it looks like nothing is happening, but when I release the button, the image is instantly scaled up. It would be really cool if I could see the image getting bigger and bigger while holding the button, so can anyone tell me what am I missing or what am I doing wrong?

    I have already tried both:
    1. [view setNeedsDisplay]; -> no effect
    2. setAnimationBeginsFromCurrentState to YES -> no effect
    Thanks for being interested though. I will try to play a bit with delegate methods, just as Pumbaa suggests. But I need some more free time to do this, will post when done.
    Message was edited by: lawicko

  • Animation question: when adding new layers...

    Using CS5. Let's say I have 9 layers in my Photoshop document, and I've successfully created an animation by making some layers visible in some frames and not others. (When making the animation, I'm using the frame view, not the timeline view.) Now let's say that for some reason, I need to add a new layer, perhaps to make the animation look better or to add some missing text. When I add the new layer (call it layer #10), this new layer becomes visible on every single one of the animation frames, and I have to go back to every single frame and remove the new layer #10 from showing. Question: is there a way to avoid this? My goal is to be able to add a new layer without it showing up on every single animation frame I've already finished.

    In the animation flyout menu, uncheck New Layers Visible in All Frames.
    more info:
    http://help.adobe.com/en_US/photoshop/cs/using/WSB8C58284-9DEB-44f2-9D8F-7F77594A8CC2a.htm l
    MTSTUNER

  • PLEASE HELP!  Text animation question.

    Hi,
    This might be a dumb question, but it's really stumping me.  I want to animate a title using some of the text animation presets, but I can't seem to apply an animation that makes the text appear AND an animation that makes the text disappear.  I can do one or the other, but not both.
    For example, I want my title's text to appear with "FocusIn", and I want it to disappear with "DropOutByCharacter."  How do I do this?!  I've searched everywhere and wasted an entire day trying to figure this out!
    Thanks.
    - epompa03

    Along with Steve's tip on doing two Titles (probably the easiest way to handle this), would be to use Keyframed Effects to create your animation. Since Drop Out By Character, is the harder one to do by hand, I'd just add a Blur to the Title, and Keyframe it to start out heavily Blurred (maybe even with a lowered Opacity, also Keyframed) and then Keyframe the Blur out, where you wish to have the Title sharp. Then, add the Drop Out By Character.
    The beauty of Keyframing the various Effects is that you can control many at one time on a single Clip. However, the concept is not the easiest to initially grasp. Once you do, you'll likely use Keyframes in lieu of most packaged animation Effects.
    Steve has a good series of articles on Keyframing on the Muvipix site. Do not recall if they are in the "free" section, or not. Since there is a ton of great material, articles, tutorials and also Assets, like Motion Footage and Menus there, a subscription often pays for itself in one day of downloading.
    Good luck,
    Hunt

  • Include webshop into app magazine / animation question

    Hello,
    I have a few question as regards:
    1) Webshop:
    is it possible to include webshops into an app magazine via the Adobe DPS Single Edition (or only Professional Edition)? This is the webshop I'm talking about that should be included in the app magazine: http://www.blooms.de/ShopRubriken/128143.html?UID=7F46330ACD307CB6A9DA366D9D969CEC3CCEC71A 3FC29CAC10E3AA
    I researched on the internet and saw how Lakeland did it (Adobe Digital Publishing Suite – Marketing-Materialien). They linked to the webshop on the internet what looks like the easiest (also best?) solution. But is there a good way to include the webshop directly into the app magazine rather than linking to it?
    In my research I've also come across this video: Adobe Digital Publishing Suite delivers a rich immersive commercial experience for Shop Direct | Digital Publishing Suit… It looks like a webshop too but integrated into the app. How does this solution work?
    And: How do I get analytics for the shop if it's embedded in the app magazine?
    2) Animations:
    I would like to animate text/textboxes into a full screen background picture. I've read that animations with PDF format (for crisp text on the app!) are not supported. How do I solve this problem?
    Many thanks in advance,
    Helene

    1) You can integrate it via a web overlay, but honestly it is far less complicated and much more likely to work if you just include hyperlinks to your existing web shop and have the reader do the purchasing in the in-app pop-up browser.
    2) This is pretty much impossible to do without doing a bunch of work in Edge Animate. To be honest, I don't really think it's ever worth the time spent. I'd look at doing a different design instead that doesn't rely on that style of animation.
    Neil

  • CS5 (and/or 5.5) - animation question

    Hi everyone! I have a problem that I just can't seem to work out and hoping some clever person out there will know an answer
    I have put together an example of what I am trying to do:
    I have 5 objects (the blue rectangles) that I wish to appear in sequence. To do this I selected each object and applied the standard "appear" animation option to each object. (see SCREEN_1 below).
    Then I created a button (the pink circle) and added the animations to the button and set them to play (SCREEN_2).
    After all the rectangles have appeared, I want them all to disappear so I grouped the rectangles and then chose 'disappear" from the animation options and applied it to the group (SCREEN_3)
    And then added this new group animation to the button so it would play after the earlier animations that made the rectangles appear. (SCREEN_4)
    Then I previewed my animation - the pink start button starts the animation and it previews (and exports to swf) fine and looks as I want
    BUT ONLY ON THE FIRST VIEWING!
    If I push the pink start button again, it doesn't play correctly (there is a delay and then the group just appears all at once) . And I CANNOT work out why! And have tried for so long to work this out but am COMPLETELY stumped.
    I basically want the animation (rectangles to appear and then disappear after) to repeat everytime the pink start button.
    Can anyone out there help?!
    Thanking you very much in advance!
    Lisa

    hi again!
    this is weird!
    I had the same problem, but I figured it out, here's how:
    1. do not group the rectangles
    2. select all the rectangles and give them the animation you want (pic1)
    3. make sure "Hide Until Animated" is checked
    4. make a button from your circle and animate each rectangle like pic2
    5. after doing that, do it aigain! make 5 more actions (animate) in your button panel but choose "REVERSE" at "options" (pic3)
    6. at the timing panel, link the last 5 animations (the ones you choose to reverse)
    7. that did the trick for me: http://www.jocstone.be/test/testje.html
    8. let me know if it works?
    9. sorry if my english is not always correct

  • Transfer Case Animation Question Regarding if Logic.

    I am using the following code in a transfer case animation and for the life of me, I can't figure out what I'm doing wrong.  The "if (neutralSequence ==0)" part works great, but the "}else if (neutralSequence == 14){" part doesn't. I am using traces in each step and the value is equal to 14 when entering the function.  I've attached the file and description of how to follow the sequence and it works until I get to this step.
    this.neutral_mc.onPress = neutral_mc.onPress = function(){
    trace ("Are you there?");
    trace (_root.neutralSequence);
    this.neutral_mc.onRelease = neutral_mc.onRelease = function(){
    trace ("Here");
    if (_root.neutralSequence == 0) {
      if (needle_mc._x > 368) {
       trace ("The vehicle must be completely stopped before shifting into neutral.");
       _root.neutral_mc.gotoAndPlay ("flash");
      } else if (_root.engineOff == "N") {
       trace ("The engine must be turned off before shifting the transfer case into neutral.");
       _root.neutral_mc.gotoAndPlay ("flash");
      } else if ((_root.ignitionSwitchPosition == "F") || (_root.ignitionSwitchPosition == "A")){
       trace ("The igntion switch must be in the ON position before shifting the transfer case into neutral.");
       _root.neutral_mc.gotoAndPlay ("flash");
      } else if (_root.held == "N") {
       trace ("Please press the Brake Hold button before shifting the transfer case into neutral.");
       _root.neutral_mc.gotoAndPlay ("flash");
      } else if (shiftPosition != "N") {
       trace ("The transmission must be in Neutral (N) before shifting the transfer case into neutral.");
       _root.neutral_mc.gotoAndPlay ("flash");
      } else {
       if (_root.PreviousMode != "4Low") {
        _root.gotoAndPlay ("NeutralFromTwo");
        _root.neutralSequence = 1;
        trace (_root.neutralSequence);
       } else {
        root.gotoAndPlay ("NeutralFromFour");
        _root.neutralSequence = 1;
        trace (_root.neutralSequence);
    } else if (_root.neutralSequence == 14) {
      _root.neutralSequence = 15;
      trace (_root.neutralSequence);
      _root.gotoAndPlay("Z2");
      _root.neutral_mc.gotoAndPlay ("NProcComp");
    Any and all help is greatly appreciated!!!

    kglad,
    Thanks for the suggestions, but I think the problem is in Flash.  It seems that when an onRelease command occurs within the movie the code is attached to, it creates problems for the run-time engine (if that's the correct term).
    I was just about to pull my hair out and thought of one other possible woraround.  I created a 0 alpha movie clip above the original movie clip, then copied and pasted the EXACT code to the new movie and it worked fine.
    I'm pretty new to coding and would have done a lot of things differently (more function based) if I had to do it over again but I didn't want to spend 100 hours reworking an animation that is 95% done.
    I've got a lot to learn but it seems the folks at Adobe do as well.  I'm sure they are aware of these limits but I doubt they're published anywhere the gen pub can see them.  Perhaps they're trying to get me to purchase Suite 4?   LOL
    Anyway, I really appreciate your taking the time to try to help!
    Sincerely,

  • Animation question regarding darkening...

    Hi Folks,
    I have created an animation in Photoshop CS5 and when I am done I render to video.  When the rendering is done, if the file is sizeable I don't have a problem.  However when I reduce the file I get a darkening between the end of the first layer cell and the beginning of the next layer cell (I used 5 base images and used 5 tween images between each).  I am trying to keep these small because I want to insert them into a PowerPoint presentation.  What am I doing to get that darkening effect?  And....how do I get rid of it?
    I am new at this area of Photoshop, so please keep it simple!
    Thanks a lot,
    Mary

    kglad,
    Thanks for the suggestions, but I think the problem is in Flash.  It seems that when an onRelease command occurs within the movie the code is attached to, it creates problems for the run-time engine (if that's the correct term).
    I was just about to pull my hair out and thought of one other possible woraround.  I created a 0 alpha movie clip above the original movie clip, then copied and pasted the EXACT code to the new movie and it worked fine.
    I'm pretty new to coding and would have done a lot of things differently (more function based) if I had to do it over again but I didn't want to spend 100 hours reworking an animation that is 95% done.
    I've got a lot to learn but it seems the folks at Adobe do as well.  I'm sure they are aware of these limits but I doubt they're published anywhere the gen pub can see them.  Perhaps they're trying to get me to purchase Suite 4?   LOL
    Anyway, I really appreciate your taking the time to try to help!
    Sincerely,

  • Character animation question

    Hi all,
    i need some help to try to understand which technique was used to do this video "puppet",
    http://www.youtube.com/watch?v=WRNd6K8kS4M
    i mean witch techniques i can use to reach this result?
    Someone tell me that adobe guys done this kind of characteer animation at nab some time ago...
    thanks to anyone want to help me.

    THe filmmaker comments might have some suggestions but they are mostly political.
    You might be able to contact the filmmaker directly.
    That pieces uses a digitally updated version of classic cel-based animation. Any good book on animation will include all you need to know. Some of the scenes are entirely synthesized but most are made of carefully designed individual drawings. The jiggle can be synthesized or created manually. Some effects are obviously done in AE or another compositor. Other effects were simply edited in a timeline like Final cut or Premiere.
    The most critical factors: Preproduction planning and storyboarding. Every frame of that piece was carefully designed by people who understood their tools. And they worked for a director who understood the pipeline.
    bogiesan

  • Animation Question: Changing all keyframe instances in a single layer all at once?

    I am working on an animated piece in Adobe Flash. I have a
    single 'head comp' layer that contains head, eyes, mouth, etc.
    layers within. I have created several keyframes in this layer to
    animate the entire head comp. Furthermore, I have several keyframes
    within that comp for lip sync, eye movements, etc.
    My problem is, I have to manually change every single
    keyframe in the head comp layer to sync up with the animation
    contained within. For example, if I have a keyframe on the main
    head comp layer-- on frame 5-- I have to manually select frame 5,
    go to Properties panel, change to "Play Once," and then type in the
    frame number in the "First" field. I then have to repeat this
    process several hundred times across the entire layer. There must
    be a faster to to sync up the whole layer. Please help!!!

    Thanks again for your help.
    I think my problem here is, I'm not trying to move any frames
    or anything. I just want to change the properties panel of each
    keyframe in the layer to "Play Once" and have the number in the
    "First" field match it's frame number (example: I want to change
    the "First" field to "10" if the keyframe starts on frame 10. That
    way it will match up with my lip sync animation on frame 10 of the
    nested layer within.) Does that make sense? I have been having to
    change each keyframe number in the layer manually. It takes
    forever.
    The "Play Once/Loop/Single Frame" option isnt available if I
    dont create a motion tween. Again, I'm not trying to move my
    animation-- just change all of the Properties at once.
    Also- if this helps- I am working in CS3.

Maybe you are looking for