IsVideoPlaying(id) works?

Find quick help here to get you started with Hollywood
Post Reply
User avatar
Juan Carlos
Posts: 932
Joined: Mon Sep 06, 2010 1:02 pm

IsVideoPlaying(id) works?

Post by Juan Carlos »

Well I have this question the instruction "playing = IsVideoPlaying(id)" really works? because I'm using this instruction in my current game project and the objective is to avoid the superposition of two videos.
My little code:
Reproduciendo= IsVideoPlaying(VideoNumber)
If Reproduciendo= True then StopVideo(VideoNumber)

With this code I try to avoid play two videos the same time, and stopped the playing in curse to begin with the new video, but this instruction doesn't understand that already there is a video playing.
Well with the IsMusicPlaying also happen the same situation but now I'm interest in the IsVideoPlaying
User avatar
airsoftsoftwair
Posts: 5834
Joined: Fri Feb 12, 2010 2:33 pm
Location: Germany
Contact:

Re: IsVideoPlaying(id) works?

Post by airsoftsoftwair »

You need to provide a complete example to illustrate your problem. These two lines don't really help to understand what you want to do.
User avatar
Juan Carlos
Posts: 932
Joined: Mon Sep 06, 2010 1:02 pm

Re: IsVideoPlaying(id) works?

Post by Juan Carlos »

Andreas wrote:You need to provide a complete example to illustrate your problem. These two lines don't really help to understand what you want to do.
Well Andreas the main routine is that:
ReproVideo=IsVideoPlaying(VideoVer)
If ReproVideo=True Then StopVideo(VideoVer)
VideoVer=VideoVer+1
SetVideoPosition(VideoVer, #CENTER+135, #CENTER)
SetVideoVolume(VideoVer, VolumenVideo)
PlayVideo(VideoVer)

I want stopped a previous playing video for my game if the video still is playing, to avoid the over playing the previous video and the next,
If I have send you the full code also I have send you the graphics and yes the videos all 30 MB and the videos, ejem, are very hot because I'm working in a slot machine game with videos hot as some Flash games with videos, I want test and show to the Amiga community the odds from your great Hollywood as alternative from Amiga side to Flash.
User avatar
Juan Carlos
Posts: 932
Joined: Mon Sep 06, 2010 1:02 pm

Re: IsVideoPlaying(id) works?

Post by Juan Carlos »

Well Andreas, I found a solution very easy to do that IsVideoPlaying work in my game and as instruction for all programmers and is this:

Create and set an Interval: SetInterval(1, p_Check, 100)
and in the function:
Function p_Check()
ReproVideo=IsVideoPlaying(VideoVer)
EndFunction

This function check every second if the video is playing.

And to avoid the over playing of two videos this:

If ReproVideo=True Then StopVideo(VideoVer)
and now the next video is playing without over playing the previous and next.

This is the way that I found to avoid the problem of IsVideoPlaying doesn't work to easy way, doing a checking with an Interval.
Post Reply