PDA

View Full Version : repeating using movieclips


figidigi
12-02-2003, 02:46 PM
Hi There,
________________________________________________
INFO: I'm a newbe with flash. Made movies but just simple ones, using only the basics in flash 5.

I have made a movie that I want to repeat using movieclip.

QUESTION:
My question:

- what steps do I take [ chronolocally ] to save, for instance 20 frames , into a movieclip?

- how do I load this clip into, lets say frame 25?

thanx for helping me out - dull question 4 all u wizards, but hey, I gotta start somewhere right? :-)

bye,
________________________________________________
F:I:G:I D:I:G:I:

webguy
12-02-2003, 04:36 PM
Originally posted by figidigi
I gotta start somewhere right? :-)

Everyone does, the best place to start learning is the tutorials here (http://www.actionscript.org/tutorials.shtml) and the tutorials that come with Flash under the help section. Reading through this forum is also a very good way to learn. Just type in what you are looking for in the search and read everyone's experiences.

Save 20 frames into a movieclip? How do you mean this? If you created a simple clip in Flash 5 it is the same way, but if you are talking about using actionscript to literally 'take' 20 frames from one movieClip and put it in itself, that is not possible, persay. You can however duplicate, load, or attach a movie into the scope of a clip and then play it till frame 20.

The usefulness of actionscript is only bounded by your imagination.

Ken

figidigi
12-03-2003, 08:18 AM
Hi there,
__________________________________________________ _
tHank u 4 replying.
Well I tried some of the tutorials that said something about clips but, that's too complex for me at this stage. [they were handy in other territories though...]

I'll try to refrase my question...

Say I got 3 textlines [on 3 layers] that, with different alpha's, go from left to right. One line is quicker then the other.
Now I wanna make an infinite loop, but with each one [loop] starting at another frame position. That must be possible, right?

So I thought u do that with movieclips, but that's more of a guess then common knowledge :-)
ahhhh - so maybe you use the action scripts here instead of clips???

bye 4 now.
__________________________________________________ _
FIGIDIGI

- loved the ferris day's off movie by the way! - There later made a television show about it with another actor, was it Slater??? -

webguy
12-03-2003, 10:48 AM
you can do anything you want, but you have to learn actionscript. The complex motions that you usually see on websites are atleast 50% actionscript.

What you are trying to do is control the looping of a movieClip, and make it start at a new frame position each time. Correct?

What you are going to need to learn about are onEnterFrame event, variables and gotoAndPlay. I'm going to show you some example code and explain it. You can try to use it for your project and drop some questions here if you have any.


// assuming that our clip has an instance name of clip1
// and that this clip is on _root and this code is on the first frame
// that this clip is available.

// be aware that I am using MX style code rather than legacy code

// first I am going to set up a variable that will tell our
// clip where to go to and play with each passing loop.

var frameNum = 1;

clip1.onEnterFrame = function () {
// first I want to see if we are on the last frame
// by checking our currentframe against the totalframes in this clip

if(this._currentframe == this._totalframes) {
// if they are equal
// then we are on the last frame
// so lets start the clip from the frameNum variable position
// if frameNum = 1; then we start at frame 1
this.gotoAndPlay(frameNum);

// now lets add 1 to frameNum variable so it will
// start at the next higher interger position with the next loop.
frameNum++;
}
}

// and we are done
// just change the 'clip1' name to the instance name of your clip and it should work out fine.



webG

figidigi
12-03-2003, 02:59 PM
Hi Figidigi,
You know, you should use the help function of flash, cos with a littlebit of searching you will find the things you need. As I read your post correctly you wanna learn how to make a movieclip and that is pretty easy:

1. select all the frames you wanna use or repeat later
2. use the rightmouse and select copy frames
3. deselect the frames again.
4 make a new layer > choose insert > new symbol
name it and use the movieclip option.
5. Flash opens a new symbol for editing in symbol-editing mode.
On that Timeline, click Frame 1 choose Edit > Paste Frames.
that's your clip! Check it with the play button of the librarytoolbox.
You can now delete this copied line from your scene1; your earlier stage.
Goodluck! Jerome.

figidigi
12-04-2003, 05:19 AM
:-| That's weird
__________________________________________________ _
there is somebody posting probably from the same computer in this building??? Or is it somebody with the same name???

Anyway,

Thank u Jerome. :-)
U'r tips work perfectly!

And u can drag the clip into the stage-area if u wanna use it.
Great! I can now quickly do this looping thingy, I wrote about earlier, without using action scripts.

Also thanx - - - WeBguy.
I tried your tips but it didn't work, well gotoandplay worked, so now I know how to loop for instance an ending. I got the simple actions covered [stop movie, link on object etc.]
Flash is great but not easy!

bye 4 now,
__________________________________________________ _

F:I:G:I D:I:G:I: