Re: Assigning Actions Withing a MovieClip
Those are excellent points Egg!
Many times when I first started coding AS I would look back at a previous project, scratch my head, and wonder what I was thinking. :) Either I couldn't remember, or I thought that was just a really complicated way to code and didn't know why I chose that method. I've learned the hard way to comment everything, and then keep it as simple as possible. Which leads to a good point, Availor, once you get your code working, comment it well. That way in the future, as Egg mentions, you'll be able to understand what you were pulling together and why. :)
I like your analogy of knitting spaggetti! I often go through that when a client wants me to modify someone elses coding, particularly when the original developer didn't comment.
Re: Assigning Actions Withing a MovieClip
Hey guys thanks alot for your help. I've read some books and the _parent thing is supposed to work, though I don't understand why it doesnt work for me :-)
Anyway. My point was to create an animation which will begin another animation as it ends. Since I intend making a rather large file I want it to contain a frame for each movie, that will go play the next frame on the scene after the first movie ends.
I need to find a cheap domain and my site will be up shortly!
Re: Assigning Actions Withing a MovieClip
Quote:
Originally Posted by Availor
Hey guys thanks alot for your help. I've read some books and the _parent thing is supposed to work, though I don't understand why it doesnt work for me :-)
My original suggestion was to use "_parent.nextframe (); ", Egg spotted my capitalisation error, since it should really be "_parent.nextFrame(); ".
The capital F really counts, so perhaps that's the problem?
Paul
Re: Assigning Actions Withing a MovieClip
Availor,
If you let me know what version of Flash your using I'll upload a zipped fla file.
Re: Assigning Actions Withing a MovieClip
Until recently I had flash MX, now I've got Studio 8.
Re: Assigning Actions Withing a MovieClip
HEEEY It works!!!! Thanks all!!! Silly me, I forgot to assign stop(); to the first parent frame :D:D:D:D
nooby mistake but I guess we all started from somewhere....
So now it works just perfect!
Can I use gotoAndStop (_parent , 1); synthax somehow?
Re: Assigning Actions Withing a MovieClip
Quote:
Originally Posted by Availor
Can I use gotoAndStop (_parent , 1); synthax somehow?
Well, if you use that in a nested MovieClip, all that will happen is that you'll keep returning to frame 1 of the _root (ie the main movie) timeline and get nowhere.
Glad it now works - go with what you've got to work.
Paul
Re: Assigning Actions Withing a MovieClip
I gave frame 1 as an example, it can be 2 or 3 or "instancename".
I purchased several courses from CartoonSmart.com and several books regarding actionscript and flash issue. They all tend to create too many frames.
I wanted to work this way becuase it's easier to change content.
Re: Assigning Actions Withing a MovieClip
I figured it out!
The easiest synthax would be:
on (release) {
with (_root) {
gotoAndStop ("Instance");
}
}
Hope that it will help some of you as well :-)
Re: Assigning Actions Withing a MovieClip
The syntax you've shown would be attached to a button, so to move to another frame, you'd have to click the button. this isn't quite the same thing that you've talked about until now.
It would be better to have the button on the main movie, and have it just do this:
on (release) {
nextFrame();
}
with a stop() on each frame on the main timeline().
Paul