-
Tip: Dont drag out your timeline if there is no animation
I use to hate doing motion tweens etc. If possible and given how much time it would take, I write a lot of motion with actionscript. I use to get annoyed with tweening because if I needed to pause an animation so something like text that came up on screen could be read, I would drag the timeline out to create that delay so the text could be read. As well, if you are doing a project for a company, they will typically say things like, "that is a second too long... can we have it show for 2 seconds more..." etc. Well I usually run flash at 30 to 40 frames per second, so i could drag the timeline to estimate how much time I took off, things would get messed up, keyframes out of whack and a lot of time eaten. Wouldn't it be simpler if I was working with real seconds and didn't take up any timeline space when there was no animation..... YES it would be.
It is real simple. Create a blank keyframe where your animation would stop so someone could read or whatever the case may be. Instead of dragging out keyframes with no motion to create a delay in animation, do the following in the blank keyframe you created.
//================
function go(){
clearKeyfram("it");
play();
}
var it = setInterval(go,5000);
stop();
//===================
setInterval creates a timed process in miliseconds. It is not based on frames, the time runs independent of your frames. so the 5000 is 5 seconds. Once it hits that 5 seconds, it runst the go function which clears the interval to make sure it doesnt run the function again after another 5 seconds. It then tells the timeline to play. You could target a movieclip outside of the timeline like _parent.ball.gotoAndPlay("bounce"); or whatever you want to happen after five seconds.
I created a component, a very simple one where i just tell it how long to delay the timeline for and then drop it on the stage. I of course made sure to add a this._visible = false; so that it would not be seen during playback.
Now all the timeline will only need to be spanned out to create transition effects with your movies.
Justin Blough
MindWireMedia
(719) 659-8062
justin.blough@mindwiremedia.net
http://www.mindwiremedia.net
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
|