Source language: Translate to:

NeoBookDX 1.1a Question

Questions about NeoBook PlugIns

Moderator: Neosoft Support

NeoBookDX 1.1a Question

Postby ErgoMan » Sat May 19, 2007 10:09 am

I am using the NeoBookDX plugin to play video. After trying myself and searching the forum I have been unable to figure out how to automatically trigger an action after a video stops. I have tried to use [PlayerID.State] to sense when a video stops. When I program a button to sense the state by triggering an Alertbox after clicking the button, it works great. I can't understand how I can create to execute an action automatically after the video stopped at the end of play.

An help would be appreciated.

ErgoMan
ErgoMan
 
Posts: 50
Joined: Thu Jul 14, 2005 8:00 pm
Location: Bel Air, MD

Postby Gaev » Sat May 19, 2007 11:25 am

Ergoman:
... how to automatically trigger an action after a video stops.
By this, do you mean anytime it is stopped ? ... whether because it completes playing or even if user makes it stop/pause while it is still playing ?
I have tried to use [PlayerID.State] to sense when a video stops. When I program a button to sense the state by triggering an Alertbox after clicking the button, it works great. I can't understand how I can create to execute an action automatically after the video stopped at the end of play.
The [PlayerID.State] will contain "Stopped" even when the user caused it to stop before reaching completion ... if you need to use this, you would also have to check [PlayerID.Length] and [PlayerID.Position] ... if they are the same, then it would mean that the file stopped after being played to its end.

In order to check this situation without the use of a Button, you would need to start a Timer object ... and in the TimerInterval section, do this type of checking.


However, if you just want to do something when the video stops upon reaching the end of the file ...

The Help file description for the command dxCreate has a typo in it ... but if you read the details, you will see that there is a third parameter called subroutine ... and it is described as ...
subroutine (optional)

The name of a subroutine from your publication's Subroutine Action. The subroutine specified here will be automatically executed if the media player plays all the way to the end of a file. Subroutines are entered from the Actions page of NeoBook's Book Properties screen. Leave this parameter blank if you do not wish to use a subroutine.
So, you can specify a subroutine and have it do whatever you want done when the media player plays all the way to the end
User avatar
Gaev
 
Posts: 3733
Joined: Fri Apr 01, 2005 7:48 am
Location: Toronto, Canada

Postby ErgoMan » Sat May 19, 2007 2:46 pm

Gaev,

Thanks a million! The third parameter in dxCreate did the job. I only needed to execute a subroutine if the video reached the end.

ErgoMan
ErgoMan
 
Posts: 50
Joined: Thu Jul 14, 2005 8:00 pm
Location: Bel Air, MD


Return to PlugIn Discussions

Who is online

Users browsing this forum: No registered users and 2 guests