Game Development Community

Open URL from torque

by Jep Hest · in Technical Issues · 06/25/2008 (10:39 am) · 3 replies

Hi,

I have a button in my game that closes it, the whole game and torque window. I would like to show a webpage right after the game closes. Does anyone know a code for this?

thanx very much.

About the author

Recent Threads

  • Simple Torque level2level

  • #1
    06/25/2008 (3:18 pm)
    Simply override onExit and call gotoWebPage.

    package MyPackage
    {
        function onExit()
        {
             gotoWebPage( "http://www.foobar.com" );
             Parent::onExit();
        }
    }
    
    activatePackage( MyPackage );
    #2
    08/15/2008 (8:53 am)
    Hi,

    My problem is other..
    How to post from gui input to web form..

    For example i want to put in gui one nick name and password input
    and after when client press "enter in on line game" the function
    post the input to the web form "example www.yp.com/myform.php"


    Exist function for do this..

    Sry for the question "me noob ":)
    #3
    08/17/2008 (9:00 am)
    Depends a bit on how myform.php does the parameter passing. If it passes them through the URI (like with www.yp.com/myform.php?arg1=val1&arg2=val2) you can still simply use gotoWebPage. This scenario is the most likely one.

    If the parameter passing happens "in the background" through the HTTP request, you could use Torque's HTTPObject to do it.

    NB: For the password stuff, you probably wouldn't want to be passing as plaintext.