import Queue; import Home; var h:Home = new Home(); h.init(_mc.home_mc); var q1:Queue = Queue.registerQueue("queue1"); q1.addEvent(h, h.fadeMovie, [Home._mc.movie_mc, 0]); q1.addEvent(h, h.loadSection, [Home_mc.movie_mc,"section.swf"]); q1.addEvent(h, h.fadeMovie, [Home._mc.movie_mc, 100]); // h.fadeMovie will throwback "complete" via the EventManager broadcaster. // "complete" is the *default* return event that queue will look for before continuing // so i dont specify it here var q2:Queue = Queue.registerQueue("queue2"); q2.addEvent(h, h.fadeMovie, [Home._mc.square_mc, 0]); q2.addEvent(h, h.fadeMovie, [Home._mc.square_mc, 100]); q1.addImmediateEvent(q2, q2.start,[]); // this will just run q2 in parallel and continue with q1 processing //addImmediateEvent just tells it that when the event processes to then go and get the next one rather than wait for "complete" event var q3:Queue = Queue.registerQueue("queue3"); q2.addEvent(h, h.rotateMovie, [Home._mc.square_mc, 0]); q2.addEvent(h, h.rotateMovie, [Home._mc.square_mc, 100]); q1.addEvent(q3, q3.start,[],"queue_complete"); // q1 waits for "queue_complete" event from q3 before continuing // this will continue when q3 has completed q1.addEvent(h, h.fadeMovie, [Home._mc.circle_mc, 0]); q1.addEvent(h, h.fadeMovie, [Home._mc.circle_mc, 100]); q1.addEvent(h, h.fadeMovie, [Home._mc.circle_mc, 0]); q1.start();