PDA

View Full Version : Problem with movieclip's finish


trighap
08-10-2008, 01:22 AM
Hello;

I am a beginner Flash person trying to force my way into Intermediate level, and I am currently having a problem with my website that I can't resolve. The introduction movie I created works exactly how I want it to, but at the very end of it, there is a very fast flip through the four other movies that exist on my site, and then it correctly goes to the static movie I mean for it to go to. So the start and ending is fine, but this flip through the other pages is not intended and is very crude. I am baffled as to why it happens, as I have an actionstrip command stop() added to the end of the intro movie... Please help if you can.

I am using Flash CS3 Professional, and the website's address for you to view the problem is http://www.dimensionalpublishing.com/index if you wish to see the problem in action.

I've used this forum once before and was very pleased with the assistance. I appreciate any help that may come this time. Thank you.

Trighap

atomic
08-10-2008, 04:15 AM
Not sure I would want to use a 4MBs movie, especially without a preloader...
And I'd certainly add a skip intro button...

That said, to correct your problem...

First, you don't need the main timeline playing on this, so you can add a stop(); action on the first frame of the main timeline...

Inside your intro mc, correct your script on the last frame to the following...

stop ();
_parent.gotoAndStop(286);

Last, since you're not actually playing the timeline on your 4 buttons' scripts, just use gotoAndStop(X); - X being the frame number - rather than your present gotoAndPlay(X);

trighap
08-10-2008, 06:09 AM
Atomic;

First of all, thank you for taking the time to assist me. I am delighted to say that following your tips, I have eliminated the problem that was plaguing me. I am puzzled as to why adding the _parent.gotoandstop (283) was needed; logically stop() should have stopped the movie. Oh well.

I also followed your suggestion to change my button's AS from gotoandplay to gotoandstop. As it works just fine, I will keep it like that, but I am curious as to why the stop is preferred to the play?

And last, what is the problem with a 4MB movie? It's fast to me, and I have a lousy internet connection. Am I missing something? However, I already plan to do a skip button, so I will be implimenting that suggestion soon. Thanks.

Once again, thank you for your kindness in assisting me. Pat yourself on the back for me. Grin.

atomic
08-10-2008, 06:53 AM
The main problem was the main timeline that was playing... The intro movie most likely did stop with your stop(); action, but it was the main timeline that kept on going and went through your pages on the main timeline before it finally stopped on frame you say 283, but I saw 286 in your decompiled .swf...

Since I told you to stop the main timeline from playing on frame 1, the main timeline is stopped while the intro mc plays through. When it ends it stops, but you now have to send the main timeline to the frame you expected it to play to, thus need to tell the main timeline (the parent of the intro mc), to _parent.gotoAndStop(286);

As for gotoAndPlay or gotoAndStop, if you have a stop action on the targeted frame, why use gotoAndPlay then? You're telling the timeline to play but it encounters a stop(); action, so it just stops dead in it's tracks... Might as well use gotoAndStop, since it's in fact what you want it to do.

If every page was fading in with a main timeline tween, then it might be different and you should use gotoAndPlay, because you'd then be sending the timeline to the first keyframe of the fade in tween, and you would want it to stop at the end of tween... Thus your stop(); action would be on the last keyframe of the fade in tween...

In any case, it's also always better pratice to use frame labels and target those labels in your gotoAndPlay's and/or gotoAndStop's... Other than being clearer, a begin , portfolio or contact frame label is certainly more descriptive than frame 283, 295, or 325, and if you ever edit your timeline, for examples in this case, removed all the unneeded frames between frame 1 and frame 286 or whatever frame, then you'd have to correct all of your targeted frames numbers on all scripts, since frame 286, would now be frame 2, 3, 4 or whatever...

This doesn't happen with frames labels. The label, unless you remove or delete it, will remain attached to some particular frame, and thus if you edit the timeline, remove or add frames, then the targeted labeled frames remain valid ones, and there's no need to edit the scripts...

As for the preloader, since your movie is attempting to stream in - it has no preloader - then most likely, users on dialups at least, will not experience a smooth playing, and the movie will stop or jerk on the initial download, until it's cached...