Welcome to the Indigo Rose Software discussion forums! You will need to sign up for a forum account and login before you can post. Need help? View the Forum FAQ.
Announcement
Collapse
No announcement yet.
playing media file in sequence in the SAME Media object
playing media file in sequence in the SAME Media object
How can I do that? playing a second file after the first is easy (onendstream, load and play file2), but what about third, fourth...files?
Thanks
Yossi
Re: playing media file in sequence in the SAME Media object
Finally an easy one. [img]/ubbthreads/images/icons/smile.gif[/img]
1. Just create a media player object, let's call it "MP".
2. plop all your avis into your dist folder, names them numerically, i.e. 1.avi, 2.avi, 3.avi, etc.
3. Put an action on page 1 Initialize to set current movie to 1, i.e. %movie% = 1
3. Put an action on MP's OnEndStream even which does two things:
a) first it increments the movie count, i.e. %movie% = %movie% + 1
b) it loads that movie into the media player, i.e. %SrcDir%/%movie%.avi (you could even set this up to work with multiple file extensions, or dynamic extensions, etc.)
That's it, it'll daisy chain the movies perfectly.... use an IF conditional to sense when the movies are done, either dynamically or static, and then you can do a page jump or whatever once all the movies are done.
If you want to take it a step further and make it work with normail filenames, multiple extensions, etc. just use a global list. This can even be done dynamically at runtime. i.e. it's simple to set up an app to read in a folder full of movie file names and then play through them in sequence.
Heck you could veen do it with different sized movies too if you incorporate multiple sized hidden MP objects or even different pages with different sized MP for each possible frame size. The sky's the limit dude.
Re: playing media file in sequence in the SAME Media object
Now THAT'S an answer! Corey, you and the other IR contributors on these forums (Brett, Lorne, et al.) are second to none when it comes to support. Above and beyond is all I have to say. Thank you.
Re: playing media file in sequence in the SAME Media object
Global lists work very well for doing this. I had a project that played mp3s in the background for effect. It worked well in the fashion that Corey describes. I read a folder for all .mp3s upon startup place them in a global list then randomly get a position from the global list (not that you would want to do this). You may even want to have your global list prebuilt before you build your project that way you can have the videos in the order that you want. Once you get the position then you can load and play. And then OnStreamEnd, you will do a GlobalList.GetNext function, and then load and play the next on in list. I am hoping that my future projects will take me into the realm of video. Something I would like to learn, that and flash.
If you want any sample projects, I could throw something together for you.
Comment