Forum Topic: My MC is not working right.

(194 views • 8 replies)

This topic is 1 page long.

<< < > >>
Happy

Dark34

Reply To Post Reply & Quote

Posted at: 7/7/06 04:03 PM

Dark34 EVIL LEVEL 13

Sign-Up: 01/24/05

Posts: 435

I need to know how to start a MC in a specific frame, but when the movie starts, the MCstarts there and keeps looping through out it. I NEED YOUR HELP!

Atlantis Burning Crusade Private Server 2.1.0 - 2.1.3 - My most favourite WoW BC private server.

BBS Signature

None

Dark34

Reply To Post Reply & Quote

Posted at: 7/7/06 04:21 PM

Dark34 EVIL LEVEL 13

Sign-Up: 01/24/05

Posts: 435

Please help, I've tried everything, but it still won't work!

Atlantis Burning Crusade Private Server 2.1.0 - 2.1.3 - My most favourite WoW BC private server.

BBS Signature

None

GameSQUID

Reply To Post Reply & Quote

Posted at: 7/7/06 04:22 PM

GameSQUID NEUTRAL LEVEL 02

Sign-Up: 07/13/05

Posts: 95

Quick and dirty method : just add a this.gotoAndStop(frameNumber); to the first frame, where you replace frameNumber by the number of the frame, or by it's label in a string.


None

Dark34

Reply To Post Reply & Quote

Posted at: 7/7/06 04:27 PM

Dark34 EVIL LEVEL 13

Sign-Up: 01/24/05

Posts: 435

At 7/7/06 04:22 PM, GameSQUID wrote: Quick and dirty method : just add a this.gotoAndStop(frameNumber); to the first frame, where you replace frameNumber by the number of the frame, or by it's label in a string.

It said this:

**Error** Scene=Game, layer=Layer 6, frame=6:Line 2: Statement must appear within on/onClipEvent handler
this.gotoAndPlay(6)

Atlantis Burning Crusade Private Server 2.1.0 - 2.1.3 - My most favourite WoW BC private server.

BBS Signature

Thinking

WillAlvein

Reply To Post Reply & Quote

Posted at: 7/7/06 04:38 PM

WillAlvein NEUTRAL LEVEL 18

Sign-Up: 04/30/06

Posts: 67

I'm not the best on actionscript, but i think i know the answer to your question..let's see...

First of all create a layer named "actions" on your main time line AND in your Movie Clip, so you can add your actions ON THOSE LAYER. Then give your mc an instance name, something like "Myclip", or anything you want.

on the FIRST FRAME OF YOUR MOVIE CLIP add this action: "stop ();"
on the LAST FRAME OF YOUR MOVIE CLIP, if you want it to keep looping, add this action: "gotoAndPlay (2);", if you want it to stop and don't loop, just add "stop ();" to the last frame of your MC.

Now, on the frame of your main timeline where you want the movie clip to start playing, add a keyframe to that frame on your actions layer first, and add this action: "_root.Myclip.gotoAndPlay (2);".

If i'm not wrong, that should solve your problem. I might be wrong due to the fact that i barely know some newbie actionscripting, but i did my best to help you, try it and tell me if worked. ;D <hopes>


None

misterdog

Reply To Post Reply & Quote

Posted at: 7/7/06 04:55 PM

misterdog NEUTRAL LEVEL 07

Sign-Up: 07/02/06

Posts: 1,638

At 7/7/06 04:38 PM, Will_Alvein wrote: Stuff

Oooooor if I'm not mistaken he wants an mc to start at a certain time of the MOVIE.
I'm going to guess but make a key frame where you want the mc to start and any keyframes before that keyframe, push delete.

Who knows, I have no common sense but I'm just going to guess on an answer
anyway

None

GuyWithHisComp

Reply To Post Reply & Quote

Posted at: 7/7/06 05:05 PM

GuyWithHisComp LIGHT LEVEL 24

Sign-Up: 11/10/05

Posts: 4,027

onClipEvent(enterFrame){
if(_root._currentframe >= FRAMENUMBER){
this.play();
}
else {
this.stop();
}
}

BBS Signature

None

Dark34

Reply To Post Reply & Quote

Posted at: 7/7/06 05:27 PM

Dark34 EVIL LEVEL 13

Sign-Up: 01/24/05

Posts: 435

At 7/7/06 04:38 PM, Will_Alvein wrote: If i'm not wrong, that should solve your problem. I might be wrong due to the fact that i barely know some newbie actionscripting, but i did my best to help you, try it and tell me if worked. ;D <hopes>

Um, actually it didn't

sorry

But I took all the frames out of the MC and placed it on the main timeline. But thanks for helping.

Atlantis Burning Crusade Private Server 2.1.0 - 2.1.3 - My most favourite WoW BC private server.

BBS Signature

None

GameSQUID

Reply To Post Reply & Quote

Posted at: 7/7/06 05:29 PM

GameSQUID NEUTRAL LEVEL 02

Sign-Up: 07/13/05

Posts: 95

At 7/7/06 04:27 PM, JerRyKirkhAm wrote:
At 7/7/06 04:22 PM, GameSQUID wrote: Quick and dirty method : just add a this.gotoAndStop(frameNumber); to the first frame, where you replace frameNumber by the number of the frame, or by it's label in a string.
It said this:

**Error** Scene=Game, layer=Layer 6, frame=6:Line 2: Statement must appear within on/onClipEvent handler
this.gotoAndPlay(6)

Yeah that's cause you put the actionscript on a movieclip instance, not on it's first frame.

Double-click the movieclip you want this for, make sure you have nothing selected, and that the playhead is at the first frame. Then that code should work.


All times are Eastern Standard Time (GMT -5) | Current Time: 08:20 AM

<< Back

This topic is 1 page long.

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!