This content has been marked as final. Show 19 replies
1. Use trace() calls to indicate which scene you are in when you enter one, that may help to narrow down where your problem arises. Once you identify the scene, add more traces to try to naroow down where it doesn't get past.
2. Stop using scenes! Use one timeline and populate it with movieclips. Scenes are accidents waiting to happen (in my experience)
Getting rid of the scenes is an interesting approach, but I have a newbie question about that.
Movie clips endlessly loop. How do you string a bunch of them together without having them each loop?
(And can you recommend the easiest way to convert an existing scene into a movie clip?)
You put stop(); 's to make movieclips not loop
There were a couple of postings over the weekend, possibly yesterday, that discussed the process of changing scenes into movieclips. Check in the AS3 forum, or here, or the AS2 forum. I'll see if I can find one of them, but you know who helps those who help themselves.
Thanks. I'm creating the movie clips okay. Almost there.
But again, newbie here. Where does the stop() go exactly? Given that I have a series of clips, each acting like a scene so it should just run and stop with the next one starting right up. So lets say my main timeline looks like this:
with each keyframe holding a "scene" movieclip. I tried putting stop(); in the first keyframe, but the "scene" kept repeating.
I have also tried putting a stop() in the last frame of the first movie clip. It plays once and then stops, but then the next "scene" movie clip does not start up.
The last approach you mentioned is the way to go, except if your intention is to play one after another, then instead of a stop() in the last frame, you'd put a command to tell the main timeline (the parent of the movieclips) to advance to the next frame. What version of actionscript are you using?
For this project I am trying to write as little action script as possible. (I'll go big on the next one!)
I can do either 2 or 3, whichever is easier. Thanks!
What is your file currently set up to use (check your Publish Settings)?
I have it set up for 2.0. But, can change it to 3.0 if necessary.
Instead of stop(); in the last frame inside the movieclips, try:
In AS3 it would be...
And in the main timeline you will need to have a stop() for each movieclip's frame (use a separate "actions" layer for code) so that it stops for each new clip that gets visited.
No luck, and I tried it a few ways (for both AS2 and 3).
I'll stick to 3.0 at this point to keep things simple.
I put this inside and at the end of my first movieclip, in a separate control layer at the top and in the last keyframe.
Closed the edit and went back to the main timeline.
Then I hit Test Scene and the first movie clip just keeps repeating - so no advancing to the next frame up top.
So I added an extra control layer above the main timeline and put a "stop();" action in keyframe 1.
Same behavior. Moved it to keyframe 2. No difference. Ideas?
Make sure your Publish Settings are set to AS3 now. If it still fails to move on, try putting a stop(); one line before the nextFrame line.
Yes, I did switch the publish settings to AS3 before trying the AS3 action script.
I now have:
And now the first movie clip stops after playing once, but the next frame in the main timeline does not start.
How big is your file? Can you make it available online? I'd like to offer more ideas but at the moment I'm drawing a blank. But if I can see the file I can see what's not doing what.
Maybe you can just create one that has just a couple of clips in it and make that available instead. Save it as a CS3 file (I don't/won't have CS4)
Soup's on, so I gotta head away for awhile.
Will do. I will prepare the file and post the URL when it is ready. I really appreciate the help!
SUCCESS! Thank you! (I discovered the problem as I was preparing a file for you to review). As I added each new keyframe to my main timeline I wasn't DELETING the previous movie clip. And since the initial image in each movie clip was similar, I didn't notice! So what appeared to be repetition of the same clip, was, in fact, its duplicate in the neighboring keyframe. Arrrrghh!
Anyway, your simple example confirmed the correct pattern and now it works. That's about 6 hours sucked out of my life googling, reading, and banging my head against the desk. Thanks again - I knew it had to be simple.
By the way, it seems to me that the ideal solution is probably to scrap the main timeline altogether and just script it with AS3. I will have to learn how to do that the next time around. Also, I have read up a bit on how Scenes are processed during publishing and I can see why you avoid them!
Cool! You're welcome.
My against-ness for scenes is more of something I inherited from these forums. Folks dis-recommend them, so I follow their lead and promote what I hope is the better way.
I have my own reasons for not using them, and I actually never have, and didn't even know they existed until a client of mine sent me a file that had them. They were usually troublesome to get working correctly, but the part that I hated the most about them was that it was just another inobvious place for things to be hiding. It's easier to follow and find things when they all share the same timeline.
As far as getting rid of the main timeline goes, you won't be able to do that, but it is possible to limit your design to just one column of frames, and even just one actionscript frame (even an entire design created with code only).
If you're just learning actionscript, you'll be making a good choice to just head right into AS3 and don't bother with AS2. AS3 is a bit harder to deal with at times, but once you get the hang of it, it becomes fairly simple to know what you're dealing with. Alot of folks who know AS2 won't take the plunge... afraid of the unknown... but with a fresh mind like you'll have, you won't face that barrier.