Code for ON COMPLETE to call next video

Discussions about the Slideshow component.

Code for ON COMPLETE to call next video

Postby AllegroGuy on Fri Jan 29, 2010 3:58 pm

David,

Is there something wrong with this code?

import com.flashotaku.events.SlideshowVideoPlayerEvent;
import com.flashotaku.events.SlideshowEvent;



vidPlayer.addEventListener (SlideshowVideoPlayerEvent.COMPLETE, videoCompleteHandler);

function videoCompleteHandler (event:SlideshowVideoPlayerEvent):void
{
randVid.start ();
}


randVid.addEventListener (SlideshowVideoPlayerEvent.COMPLETE, videoCompleteHandler2);

function videoCompleteHandler2 (event:SlideshowVideoPlayerEvent):void
{
introVid.start ();
}

introVid.addEventListener (SlideshowVideoPlayerEvent.COMPLETE, videoCompleteHandler3);

function videoCompleteHandler3 (event:SlideshowVideoPlayerEvent):void
{
outVid.start ();
}

Do you know if there are any incompatibilities on the PC side of things?

A couple of funky things are happening...the video runs fine right out of Dreamweaver - in the browser as a test. When I upload to the server...oh wait.

I'll check my JS that goes with it...but anyway, it's jumping right to the next clip, not playing the first one...odd.

Thanks,

Dean Stevenson
Allegro Interactive Media
AllegroGuy
 
Posts: 38
Joined: Tue Nov 17, 2009 3:11 pm

Re: Code for ON COMPLETE to call next video

Postby David on Fri Jan 29, 2010 4:20 pm

That's strange but anyway, I can see you are using multiple component instance for the same presentation. I don't think that is necessary. You could have a single instance of the slideshow, which would contain 3 slides, and a single instance of the video player. Or maybe I don't understand what you are trying to achieve.

PS: I'll answer to your other post a little later.
David
Site Admin
 
Posts: 350
Joined: Tue Nov 04, 2008 4:38 pm

Re: Code for ON COMPLETE to call next video

Postby AllegroGuy on Fri Jan 29, 2010 4:39 pm

David,

The reason for doing this is because the instances of the video player change with each circumstance.

The first one calls the second one which is random, the next one, if I called it into the same vidPlayer component - how does it know to play the next video? And then, the last one needs to loop, which means it has to have a different setting for REPEAT on it. So, I end up having 3 different instances to account for, so I might as well account for each one, so I'm thinking it gives me more control over the whole thing. Am I wrong? I'd be very happy to tidy this up instead. If you remember the diagram I sent you showing how one video moves into the other one, each one of those videos is different, and smack in the middle of it all is a random call - which by the way works PERFECTLY!! Thank you!!

So, i'm game for anything...today is launch day, so I have to get this all working perfectly today, regardless.

Dean Stevenson
Allegro Interactive Media
AllegroGuy
 
Posts: 38
Joined: Tue Nov 17, 2009 3:11 pm

Re: Code for ON COMPLETE to call next video

Postby David on Fri Jan 29, 2010 5:12 pm

Ok, I understand now. Your work flow seems ok if these are the requirements.

Didn't know you launch today. How many hours you've got?
David
Site Admin
 
Posts: 350
Joined: Tue Nov 04, 2008 4:38 pm

Re: Code for ON COMPLETE to call next video

Postby AllegroGuy on Fri Jan 29, 2010 5:24 pm

David,

We're looking at probably 6-7 hours left, but we're reviewing now. And things are looking much better. Although, when i review this from the dev server on my PC it's not looking nearly as smooth. Are there PC compatibility issues that you are aware of?

Thanks,

Dean Stevenson
Allegro Interactive Media
AllegroGuy
 
Posts: 38
Joined: Tue Nov 17, 2009 3:11 pm

Re: Code for ON COMPLETE to call next video

Postby David on Fri Jan 29, 2010 5:29 pm

There shouldn't be any compatibility problems. What exactly is not running smooth? Do you have to wait until a video loads?
David
Site Admin
 
Posts: 350
Joined: Tue Nov 04, 2008 4:38 pm


Return to Slideshow

Who is online

Users browsing this forum: No registered users and 0 guests

cron