FORUMS: list search recent posts

sequencing swf files

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Jerry Prince
sequencing swf files
on Mar 28, 2006 at 3:35:07 pm

I have a need to sequence three swf files to play in a loop. I am still very new to actionscript, so I am not sure the best way to approach the task. The swf files are presentations with graphics and music to run on an HD monitor and are not interactive. Is it best to add a play next command at the end of each timeline or can I create a separate file to load and play the files one after the other?

Thanks for any help!




Return to posts index

lajoiet
Re: sequencing swf files
on Mar 28, 2006 at 7:23:35 pm

You can do it either way, and in my experience, there is really no difference. One way is to just run your first animation (say, "movie1.swf") and on the last frame just include the code:

loadMovie("movie2.swf", 0);

then at the end of movie2.swf, do the same code to call movie3.swf, and at the end of movie3.swf, call movie1.swf. It will then loop forever. but I would not expect it to run for days without possibly running into some memory issues. I've done this sucessfully with large full screen high framerate shows for several hours without problems tho.

>Todd
_____________________________________

I'm filling a need. Without me there would be no bad examples.
_____________________________________


Return to posts index

Jerry Prince
Re: sequencing swf files
on Mar 28, 2006 at 10:53:31 pm

Thanks, I thought it would be something that simple. It is working great.

Is it complicated to make a playlist in a separate file. I could see them wanting to juggle the order or make one play more frequently. I would rather be able to make simple changes in a relatively small file than to have to duplicate the larger shows and taking a chance on accidentally changing something else.



Return to posts index


lajoiet
Re: sequencing swf files
on Mar 29, 2006 at 1:39:36 am

Well, you could set up an XML Playlist and script out however many you need to get them to play in the proportions or order they want. To do that tho, I'd suggest going with a single file that dynamically loaded the external SWF files. For simplicity, I'd make a simple Flash file, 3 frames long, Frame 1 would have a have the code to load the XML data and push it into arrays, Frame 2 would have stop(); and the code to dynamically load the SWF based on the index of the array. The Last frame of each SWF would have the code to restart playing in the main Flash file so it would goto Frame 3 which would increment the index number, check that it's still within the range of the XLM's indexes, and send the playhead back to the 2nd frame, where it would load the next file in the list and repeat.

If you do it that way, you can change the order or frequency they play, or even add and remove files from the loop, by just editing the XML file (which can be done in notepad).

If you're not sure about how to do this, take a run over to Lee's tutorials at http://www.gotoandlearn.com. The Flash and XML Slideshow will give you the basics of the XML part of it, and loading SWFs is no different than the way it loads the JPG files. You just aren't going to have the button actions in the slideshow tutorial to increment the counter (IIRC he called it whoIsOn), which is why you need frame 3 to increment the counter and send the playhead back to frame 2.

>Todd
_____________________________________

I'm filling a need. Without me there would be no bad examples.
_____________________________________


Return to posts index

Jerry Prince
Re: sequencing swf files
on Mar 29, 2006 at 11:15:16 pm

Thanks again for the input. I will check out the tutorials you mentioned. This option seems to have the options I would want, but definitely gets into more complicated scripting.

JP



Return to posts index

harshil shah
Re: sequencing swf files
on Mar 13, 2010 at 6:01:56 am

Hi!,
I was also looking for similar kind of solution. i had put the loadmovie function at the end of the first swf. and it works fine. but when I export it to exe format. it ignores the first file and directly plays the second file.
I dont understand whats going on.

Can someone help??


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]