PDA

View Full Version : button for full screen video


bobbie
04-18-2005, 11:44 PM
I have this but it opens and stops and then crashes ..
I just want to open a video and play full screen . and I have a button that plays the video in the the player I made and that works fine .

-- Display a File Browse Dialog, and then play the video that they select

-- Pick a nice default folder to start the browsing in (My Documents)
myfolder = Shell.GetFolder(SHF_MYDOCUMENTS);

-- Show the file browse dialog
tFiles = Dialog.FileBrowse(true, "Load Video", myfolder, "Video Files (*.mpg;*.avi)|*.mpg;*.avi|MPEG (*.mpg)|*.mpg|AVI (*.avi)|*.avi|", "", "", false, true);

-- Only load the video if they did not press Cancel
if tFiles[1] ~= "CANCEL" then
-- make sure the Video object is visible before trying to load a video
Video.SetVisible("Video1", true);

-- Load the video File
Video.Load("Video1", tFiles[1]);

-- Play the video
Video.SetFullScreen("Video1", true);

-- Adjust the Play/Pause button text
Button.SetText("ButtonPlay", "PAUSE");
end

longedge
04-19-2005, 01:23 AM
Hello,

If you want to play your video automatically, then your load statement is incomplete -

-- Load the video File
Video.Load("Video1", tFiles[1], true, false);

I think that what's happening is that you are going to full screen without actually playing the video and just seeing a blank screen.

bobbie
04-19-2005, 03:24 AM
What I have is two right now one loads the video and plays it in the small window .
Then I have button 2 that I want to browse for a video and play it full screen .
So that way I can watch it in the small screen or full size .
I added that what you gave me but now it opens real fast and quits .(video)
Thank you for your help .

longedge
04-19-2005, 04:41 AM
Hello,

Not quite sure about your meaning. When you say two, I take it that is two buttons? Or do you mean two video objects?

In the code you posted, there was no action that would actually start the video playing, but changing the code as I suggested would cause it to play automatically.

It sounds as if you've got quite a lot more code than what you posted, how about posting the project if that's possible? Someone will have a look at it I'm sure. I'm off out now for the rest of the day but I'll look in again later :)

bobbie
04-19-2005, 05:22 AM
Yes two buttons one for full screen video on one for small window video.

bobbie
04-19-2005, 07:56 AM
If you make a broswer can you resize it ?or does it have to be a standard like 800x600 etc .

longedge
04-19-2005, 08:23 AM
Have you got just one video object on your page?

It would help to post the project if you can (without the videos :) ).

Re the web object - check out the Web.SetSize and Web.SetPos actions.