Hi all,
I have been trying to make a set of cutscenes appear in order one after the other. I do this with delays and by turning the three images tweening alpha properties on and off. However when I compile, the last cutscene is the only one that shows up on the screen. Can anyone see any errors?
SPImage *cutScene1 = [SPImage imageWithContentsOfFile:@"cutscene1.png"]; cutScene1.y = 0; cutScene1.x = 0; cutScene1.alpha = 0.0f; [self addChild:cutScene1]; SPTween *tween1 = [SPTween tweenWithTarget:cutScene1 time:1.0f]; [tween1 animateProperty:@"alpha" targetValue:1.0f]; [tween1 setDelay:4.0f]; [tween1 animateProperty:@"alpha" targetValue:0.0f]; SPImage *cutScene2 = [SPImage imageWithContentsOfFile:@"cutscene2.png"]; cutScene2.y = 0; cutScene2.x = 0; cutScene2.alpha = 0.0f; [self addChild:cutScene2]; SPTween *tween2 = [SPTween tweenWithTarget:cutScene2 time:5.0f]; [tween2 animateProperty:@"alpha" targetValue:1.0f]; [tween2 setDelay:3.0f]; [tween2 animateProperty:@"alpha" targetValue:0.0f]; SPImage *cutScene3 = [SPImage imageWithContentsOfFile:@"cutscene3.png"]; cutScene3.y = 0; cutScene3.x = 0; cutScene3.alpha = 0.0f; [self addChild:cutScene3]; SPTween *tween3 = [SPTween tweenWithTarget:cutScene3 time:8.0f]; [tween3 setDelay:3.0f]; [tween3 animateProperty:@"alpha" targetValue:1.0f]; [[SPStage mainStage].stage.juggler addObject:tween1]; [[SPStage mainStage].stage.juggler addObject:tween2]; [[SPStage mainStage].stage.juggler addObject:tween3];
Thankyou for your help.
Willsavin