Page 1 of 1
IsVideoPlaying(id) works?
Posted: Mon Aug 05, 2013 1:41 pm
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
Re: IsVideoPlaying(id) works?
Posted: Tue Aug 06, 2013 2:10 pm
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.
Re: IsVideoPlaying(id) works?
Posted: Wed Aug 07, 2013 10:01 am
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.
Re: IsVideoPlaying(id) works?
Posted: Thu Aug 08, 2013 1:30 pm
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.