|
-
To make it go slower, change the amount of time it takes to do the tween. Change 1 to 7, for instance. I must have somehow mis-calculated the final coordinate somehow. Try just adding fudge factors to stage.stageHeight until you fine-tune it.
To get Jesus to be in front of the starfield, either add him to the display after the starfield (you can re-add him even if he's already on), or add the starfield to a container which is behind him to begin with.
-
The starfield is an externally read .as file.
-
Doesn't matter. You're adding it to the displayList with the line
Simply re-add jesus after that so he's on top:
Code:
addChild(field);
addChild(jesus);
Or add the field to a container placed on the display in the IDE, which is behind him
Code:
fieldHolder.addChild(field);
-
Code:
addChild(field);
addChild(jesus);
import com.greensock.*;
import com.greensock.easing.*;
TweenLite.to(earth, 7, {x:stage.stageWidth/2, y:stage.stageHeight+(earth.height), overwrite:0});
TweenLite.to(earth, 10, {scaleX:2, scaleY:2, overwrite:0});
TweenLite.to(bg, 1, {x:stage.stageWidth/2, y:stage.stageHeight/2, overwrite:0});
TweenLite.to(bg, 10, {scaleX:2, scaleY:2, overwrite:0});
Works perfect to keep Jesus above the stars.
But I still can't figure out your explaination of moving the earth further below stage.
-
Just add more offset to the y coordinate of the tween.
Code:
TweenLite.to(earth, 7, {x:stage.stageWidth/2, y:stage.stageHeight+100, overwrite:0});
And if that isn't far enough:
Code:
TweenLite.to(earth, 7, {x:stage.stageWidth/2, y:stage.stageHeight+200, overwrite:0});
etc.
-
Thank YOU!
Everything is perfect, now I just need to make Jesus and the logo fade in after the earth and background tweens have finished.
Going to give it a shot on my own, will post broken code if any.
-
Okay, I have no Idea how to have the logo and the picture of Jesus fade in when the earth and background tweens stop..
-
Read up on the TweenLite documentation. You can pass a function to be called when the tween completes.
So, set Jesus and the Logo (pretty good band name) to alpha=0 originally, then write a function to apply a tween to them to fade them in. Call that function as the onComplete from your scaling tween.
Code:
//...
jesus.alpha = 0;
logo.alpha = 0;
addChild(jesus);
TweenLite.to(earth, 10, {scaleX:2, scaleY:2, overwrite:0, onComplete:fadeInJesus});
function fadeInJesus():void{ //I don't know if this should take parameters or not.
TweenLite.to(jesus, 5, {alpha:1});
TweenLite.to(logo, 5, {alpha:1});
}
-
That just does not seem to work..
I think I am happy with the results:
http://ssdev.hlrse.net/orion/
But maybe perhaps when you download the files, CS3 (CS4 runs like crap on my awesome PC), you could take a look at why that code won't work.
Thanks bro, you're a great teacher.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|