FORUMS: list search recent posts

AS2.0- broadcasters and listeners

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Chris Kean
AS2.0- broadcasters and listeners
on May 13, 2008 at 5:40:25 pm

Im trying to set up a very simple senario.
Here's what i want to do:

read in xml file with a list of names to display. i have a loop set up to traverse the xml, determine the number of titles, then loop through and hold the current title in a var.
then, attachmovie 'xyz' which is 10 seconds long and display the current title.
at the end of the movie i want to send a message back to my script to say "hey, im done... you can continue."

I think i want to use a broadcaster/listener senario... but im not sure. i have all the xml stuff working. I was able to use my php/xpath experience to pick that part up pretty easily. But, im kind of lost at this point. I have been reading every tutorial/chapter in my books on eventListeners and Broadcasters, but fail to grasp how the technique can apply to my senario.
At the end of my 10 second movie clip, how can i get a message back to my script and continue in my loop?
Many thanks for any input and direction.

Return to posts index

Chris Kean
Re: AS2.0- broadcasters and listeners
on May 14, 2008 at 1:25:02 pm

I have simplified my code removing the xml loop and such. All that works. So far my code looks like this-

function loadMovie1(movName, movieVar){
var mov = _root.attachMovie(movName,movName, 1);
return movieComplete;
//Begin xml loop
xml_name = "Joe Smith";
xml_title = "Manager";

//load and play movie
loadMovie1("mc_10sec_holder", 100);

//Wait for movie to finish

trace ("Movie Variable: " +movieComplete);
//continue with loop

In my movie (mc_10sec_holder), on the last frame I set the var movieComplete to 1. Can anyone suggest a way to pause my ascript and wait for my movieComplete variable to change, then continue with the root script?

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved