This content has been marked as final. Show 4 replies
Chris - not sure what the cope is on your code, but here's a little class to run four functions - not necessarily the easiest way, but I think it explains things much better. To do anything useful, you'll probably have to pass a reference to wherever you're caling from.
set up with:
var mySequence:FunctionSequence = new FunctionSequence(6000);
then run the functions with:
Thanks for the reply. Predictably I get the class running but I have no idea how to pass a reference to call my functions.
Is there any advice on this you can give.
Thanks again! :-)
Is everything else happening on the _root timeline, or in movieClips? From your question I'm assuming it is. I only really put the answer in a class as that's a more comfortable scope model, and you mentioned 'external files' - the code below will work from the main timeline or a movieClip, so you can just use the 'this' keyword to get the functions working (see function 1).
If you still want the class, let me know.
Thanks a million,
I got that working very nicely.
When I was talking about external files, I wasn't being very explicit - I meant keeping the code in external .as files, therefore I had four functions, doing slightly different things - (in a way). I was trying to call each one of those functions after a set interval - but I couldn't do it, unless I just triggered them on the _root timeline. But I'm trying to approach everything in a more professional manner these days!
I do need to learn how to use it is a class though. If that makes any sense.