Help Playing a Video
by alphonso Stelivani · in Torque in Education · 01/23/2009 (7:51 am) · 2 replies
I am working with a team on a mod of a TGEA fps for my senior project here in Devry Long Beach. We have figured out how to make our own animations and can save them in to almost any format, but are having trouble with playing them. Our test animation is 8 seconds long and is an avi file type. Can any one enlighten me on how to play animations properly with a GUI?
Will the following code work in TGEA?
//--- OBJECT WRITE BEGIN ---
new GuiTheoraCtrl(Startup3Gui) {
canSaveDynamicFields = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "0 0";
Extent = "640 480";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
hovertime = "1000";
theoraFile = "./YourVideo.ogg"; // Place your video in client/ui, then place it's name here.
done = "0";
stopOnSleep = "1";
backgroundColor = "0 0 0 255";
new GuiBitmapButtonCtrl() {
Profile = "GuiButtonProfile";
HorizSizing = "relative";
VertSizing = "relative";
position = "463 439";
Extent = "140 30";
MinExtent = "8 8";
Visible = "1";
Command = "skipIt();";
text = "Button";
groupNum = "-1";
buttonType = "PushButton";
bitmap = "./button";
helpTag = "0";
new GuiMLTextCtrl() {
Profile = "GuiMLTextNoSelectProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "75 10";
Extent = "300 19";
MinExtent = "8 2";
Visible = "1";
lineSpacing = "2";
allowColorChars = "0";
maxChars = "-1";
text = "<color:F6F4C4><shadowcolor:000000><shadow:1:1><font:Arial Bold:19>Skip";
helpTag = "0";
allowSelection = "1";
};
};
};
//--- OBJECT WRITE END ---
function loadStartup2()
{
StartupGui.done = false;
Canvas.setContent( Startup2Gui );
schedule(100, 0, checkStartup3Done );
}
//-------------------------------------
function Startup2Gui::click()
{
StartupGui.done = true;
}
//-------------------------------------
function checkStartup2Done()
{
if (Startup2Gui.done)
{
echo ("*** Load Main Menu");
loadMainMenu();
}
else
schedule(100, 0, checkStartup2Done );
}
//My skip function sto stop the video when the player skips the splash screen
function skipIt()
{
Startup2Gui.stop();
loadMainMenu();
}
If so how do you make an .ogg movie type?
Will the following code work in TGEA?
//--- OBJECT WRITE BEGIN ---
new GuiTheoraCtrl(Startup3Gui) {
canSaveDynamicFields = "0";
Profile = "GuiDefaultProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "0 0";
Extent = "640 480";
MinExtent = "8 2";
canSave = "1";
Visible = "1";
hovertime = "1000";
theoraFile = "./YourVideo.ogg"; // Place your video in client/ui, then place it's name here.
done = "0";
stopOnSleep = "1";
backgroundColor = "0 0 0 255";
new GuiBitmapButtonCtrl() {
Profile = "GuiButtonProfile";
HorizSizing = "relative";
VertSizing = "relative";
position = "463 439";
Extent = "140 30";
MinExtent = "8 8";
Visible = "1";
Command = "skipIt();";
text = "Button";
groupNum = "-1";
buttonType = "PushButton";
bitmap = "./button";
helpTag = "0";
new GuiMLTextCtrl() {
Profile = "GuiMLTextNoSelectProfile";
HorizSizing = "right";
VertSizing = "bottom";
position = "75 10";
Extent = "300 19";
MinExtent = "8 2";
Visible = "1";
lineSpacing = "2";
allowColorChars = "0";
maxChars = "-1";
text = "<color:F6F4C4><shadowcolor:000000><shadow:1:1><font:Arial Bold:19>Skip";
helpTag = "0";
allowSelection = "1";
};
};
};
//--- OBJECT WRITE END ---
function loadStartup2()
{
StartupGui.done = false;
Canvas.setContent( Startup2Gui );
schedule(100, 0, checkStartup3Done );
}
//-------------------------------------
function Startup2Gui::click()
{
StartupGui.done = true;
}
//-------------------------------------
function checkStartup2Done()
{
if (Startup2Gui.done)
{
echo ("*** Load Main Menu");
loadMainMenu();
}
else
schedule(100, 0, checkStartup2Done );
}
//My skip function sto stop the video when the player skips the splash screen
function skipIt()
{
Startup2Gui.stop();
loadMainMenu();
}
If so how do you make an .ogg movie type?
About the author
#2
08/18/2009 (12:21 am)
be aware that the Theora player doesnt work in the new TGEA, there is a fix for the video, but SFX remains broken.
Torque 3D Owner 7nMs23fF
"avi to ogg converter"