This ought to be easy - Frame help

Okay on any given timeline, you have your starting point (Frame 1) and an ending point (lets say Frame 550).

If I want to end my movie prior to my orginal ending point - how do I change it??

I have tried clicking on the ending frame and dragging it back to a earlier ending point - but all it did was add a keyframe to that point.

I have tried selecting the desired ending point and then holding shift down and going to the existing ending point then right clicking on the selected timelien - but other then the delete key I don’t see any option for deleting the selection.

Can someone please help me,
Vixie

Hey Vixenlady,
To stop a movie early, create a new layer and insert a “blank keyframe” in the spot where you want the movie to end. Right click on that Blank Keyframe and select Actions. Select the Stop action by following a few menus.

To remove a keyframe, right click on the keyframe and select “Remove Keyframe”. That should remove the keyframe without shifting it a frame ahead. That should help answer your question =)

Cheers!
Kirupa :ninja:

Perfect solution!!

Okay just to add onto that, let me ask you this:

If at the end of frame 50 I put a stop action, is there a way to also unLoad the movie … I used the tutorial to figure out how to load and external .swf file, but then how do I make it disolve after it is done playing?

Thanks so much for your help,
Vixen

You have a couple of choices:

For example:

on (press) {
unloadMovie ("_root.yourMovieClip");
}

Or, if you’ve loaded the file into another mc, and it’s not that large, you could just make it invisible:

_root.yourMovieClip._visible=0;

Well I don’t want it to be relying on any action from the user, I just want it to close when it hits the stop action.

Does that make sense?

Vixen

Sure, you can use:

unloadMovie ("_root.yourMovieClip");

…in lots of ways. Add it to a frame, or make it part of an If statement, e.g.

if (myVariable==1) {
unloadMovie ("_root.yourMovieClip")
}

In my main movie I added this code:

bathbut.onPress = function () {
_root.createEmptyMovieClip(“container”, 1);
loadMovie(“BathroomMovie.swf”, “container”);
container._x = 10 ;
container._y = 10 ;
}

Then I went to my BathroomMovie.swf and loaded this code:

stop();
unloadMovie("_root.BathroomMovie.swf");

Where did I jack it up??

I just want the main movie to load the BathroomMovie on click (which it does), have the BathroomMovie play through, and then at the stop action, return to the main movie, frame 50.

How do I make this possible?

Thanks,
Vixie

oh and ps.,
This site is for cabinetry design, just incase you were wondering about the file titles … lol

You loaded the swf into the movieclip called container on your _root stage; therefore, you need to unload the mc called container - not the swf. Like so:

on(press) {
unloadMovie(_root.container)
}

I’m not clear on the instance name of your main mc. However, to return to frame 50:

_root.youMcInstanceName.gotoAndPlay(50)

Also, you may want to consider labeling frame 50 and change the 50 (above) to the name of the label. This way if you change number of frames or position in the mc, your code will still be correct.

*Originally posted by kennyb *
**You loaded the swf into the movieclip called container on your _root stage; therefore, you need to unload the mc called container - not the swf. Like so:

on(press) {
unloadMovie(_root.container)
}

I’m not clear on the instance name of your main mc. However, to return to frame 50:

_root.youMcInstanceName.gotoAndPlay(50)

Also, you may want to consider labeling frame 50 and change the 50 (above) to the name of the label. This way if you change number of frames or position in the mc, your code will still be correct. **

Okay this McInstance part is confusing me. Have no idea what that means.

But here is what I did. I added a layer to my main movie. Called it Frame Marker, and added an empty keyframe, added a label name “menu”. Now there is a little red flag over the keyframe.

So now what?

I think I misunderstod. When you said “main movie” you meant the timeline of the _root stage - I think.

But, while we’re clarifying - Let me define what I mean by “instance name”, as it is very, very important in Flash.

When you have a movieclip in your library and you drag it out onto stage, down in the lower left corner of the properties box is a window to give that instance of the movieclip a unique name. This allows you to drag as many instances of that particular mc onto stage and address them all uniquely - by their instance name.

Back to your current issue:

On the frame that contains your stop():

_root.gotoAndPlay(menu);
stop()

Okay I just realized MC = MovieClip

Yea I am a dork!

So let me ask you this:

After my last layer plays through (on loaded movie) is there anyway just to fade it to invisable? Kinda like you can alpha fade an item, can you alpha fade and entire MC?

Thanks,
Vixie … who sometimes is SO blonde

*Originally posted by kennyb *
**I think I misunderstod. When you said “main movie” you meant the timeline of the _root stage - I think.

**

Yes I have a main movie that is the menu for loading external .swf files. Yes this would be the _root stage, and I am loading the external files onto “container” which is level 1.

**But, while we’re clarifying - Let me define what I mean by “instance name”, as it is very, very important in Flash.

When you have a movieclip in your library and you drag it out onto stage, down in the lower left corner of the properties box is a window to give that instance of the movieclip a unique name. This allows you to drag as many instances of that particular mc onto stage and address them all uniquely - by their instance name.

**

Yes this is what I did to each of the buttons, I gave them each an “instance name”, so that when pressed it could load an external .swf file. I did that right?

**On the frame that contains your stop():

_root.gotoAndPlay(menu);
stop() **

Okay this would work if I were in only the _root stage. Like if I had a movie that played to frame 400 and at the end wanted to return back to frame 200, right?

But what I have is an external .swf file that is loaded onto what would be level 1, and when it is complete I want it to return to the _root level at frame 200 (labeled “menu”).

Would it be easier to just tell the external .swf to loadMovie Main at frame 200?

Kinda loop one into the other, and then at the end loop it back into the main movie?

Sorry if I am confusing you, I am very lost myself.

Thanks SO much for all your help,
Vixie

Vixie,

I think you’re on to a workable solution.

loadMovie(“main.swf”, _root)

*Originally posted by kennyb *
**Vixie,

I think you’re on to a workable solution.

loadMovie(“main.swf”, _root) **

Yep! That is what I needed. Okay one final question (I hope). How do you tell it to go to a certain frame within main.swf?

I tried:

loadMovie(“main.swf”, _root.gotoAndPlay(200))

Didn’t work :frowning:

Were did I go wrong?

Thanks again!!!

Vixie

Okay, I’m certainly going to reveal that I’m no expert on that question. I know how to make it work, but something tells me there are better ways.

Here’s how you can do it.

At the last frame of the movie that is on its way out, declare a _global variable. Say, for example:

_global.mySink=1;

Then, in the first frame of the movie you’re loading:

if (mySink==1) {
_root.gotoAndPlay(200);
}

It worked!

Thanks,
Vixie