Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 06-17-2012, 04:39 PM   #1
Registered User
Join Date: Jun 2012
Posts: 1
Question CS3 Movie Clip-per-keyframe help

Hello all,

I'm pretty much an AS3 newbie (and I rarely ever develop in Flash, since my specialty leans more towards Photoshop & Illustrator, and I'm learning HTML5/CSS3 anyway), but I need to create a Flash version of a slideshow to go on my portfolio site's home page.

Just when I think I have a good grasp on the AS3 I need to do what I want, I'm stuck. Okay, so here's what I'm trying to do:

I have all 6 of my movieclips set to go (the first is an animated intro, the other 5 are fade-in/fade-out images). I want to make it so that there are only 6 frames on the main timeline, with each keyframe containing one of the movieclips, in the order I want it (yes, I do have a layer called "actions" on top in my main timeline).

What I want to make it do is stop on the first frame, play its movieclip once, then once the clip has played all the way through, go to the next frame and play ITS movieclip; repeat.

Something in my head keeps telling me this should be easy, but I am getting more and more stuck as I try. So here I am, humbly begging for your assistance. Much appreciated! Thank you for your time.
toddomassey is offline   Reply With Quote
Old 06-17-2012, 06:55 PM   #2
Senior Member
[afz]snickelfitz's Avatar
Join Date: Dec 2011
Location: Tucson, AZ
Posts: 2,406

What you're trying to do is much simpler with code.
For example, you can use TimelineMax to create easy to edit sequences like the one you described.

Stack/position the named instances on the stage on frame1.
Since the intro might contain a complex animation, the script will move the playhead over a prescribed duration, which is calculated and stored in a variable.

The picture tweens in this example affect the scale, rotation, alpha and visibility of the pictures.
And Since I am using the "from" method of TweenMax, the pictures are tweened from the specified property values, to the current values on the stage.
It's a very useful method that saves a lot of set up and code.
The tweens also use repeat / yoyo, which fades in, then fades out.

With a little practice and research, you can build very sophisticated animation sequences with TimelineMax.
Download the class packages and place the included com directory in the same folder as your FLA: http://www.greensock.com/v12/
ActionScript Code:
import com.greensock.*; var frameDur:Number = intro.totalFrames/stage.frameRate; var dur:Number = 3; var overlap:Number = dur/2; var tl:TimelineMax = new TimelineMax({onComplete:trace, onCompleteParams:["hello world"]}); tl.append(TweenMax.to(intro, frameDur, {frame:intro.totalFrames})); tl.append(TweenMax.from(pic1, dur, {autoAlpha:0, scaleX:0, scaleY:0, rotation:360, repeat:1, yoyo:true}), -overlap); tl.append(TweenMax.from(pic2, dur, {autoAlpha:0, scaleX:0, scaleY:0, rotation:360, repeat:1, yoyo:true}), -overlap); tl.append(TweenMax.from(pic3, dur, {autoAlpha:0, scaleX:0, scaleY:0, rotation:360, repeat:1, yoyo:true}), -overlap); tl.append(TweenMax.from(pic4, dur, {autoAlpha:0, scaleX:0, scaleY:0, rotation:360, repeat:1, yoyo:true}), -overlap); tl.append(TweenMax.from(pic5, dur, {autoAlpha:0, scaleX:0, scaleY:0, rotation:360, repeat:1, yoyo:true}), -overlap); tl.append(TweenMax.to(intro, dur, {autoAlpha:0}), -overlap);
[afz]snickelfitz is offline   Reply With Quote
Old 06-26-2012, 11:44 AM   #3
Registered User
Join Date: Jun 2012
Posts: 1

I am in a fix for making movie clips,with effects and animation.Can anyone suggest me the prior method for it?
AliceBoarts is offline   Reply With Quote

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 11:16 PM.

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.