Displaying duration of a directx object.
I'm trying to create my own controls for a directx object that will show a video, specifically a trackbar so the user can slide it along and the video will fast forward or reverse along with it.
I'm taking this one step at a time and the first thing I want to do is show the duration of the loaded video, but I'm having a little difficulty. I've created a string object and i'm using the Following:
GetDuration( "Direct Show" )
Which I assume will get the length of the video loaded in, but I can't get the text object to display the duration. I tried using the following:
val(GetDuration( "Direct Show" ))
But it gives an error: "Mixed string and numbers". How to I get the string object to display the duration? Or are there any other objects that would allow me to display the duration? Any help appreciated.
Re: Displaying duration of a directx object.
str$(GetDuration("Direct Show")) i'd imagine
Re: Displaying duration of a directx object.
Val() is for converting a string to a value.
Str$() is for converting a value to a string.
Re: Displaying duration of a directx object.
Already tried that :)
Get the error "Please enter a numeric expression".
Re: Displaying duration of a directx object.
Re: Displaying duration of a directx object.
Are you sure you are setting the alterable string and not the paragraph number?
Re: Displaying duration of a directx object.
Str$(GetDuration( "Direct Show" ))
This works fine for me.. just tried it!
Re: Displaying duration of a directx object.
I wonder why it's giving me the error when I 'Check current expression'.
http://www.madladdesigns.co.uk/temp/clipboard02.jpg
Re: Displaying duration of a directx object.
Did you try it without the str$()?
The number of the paragraph would be a value not a string.
Re: Displaying duration of a directx object.
Quote:
Are you sure you are setting the alterable string and not the paragraph number?
Ahh, thanks Jamie, now I see it's asking for a paragraph, I assumed it was just displaying text. Do I have to set an alterable string / value somewhere and read that in?