Guif0DA's Recent Forum Activity

  • Try first add the entire xml code to the LOAD action in the XML object

    remember to add "" at the beginning and at the end and add two instead of one " inside the code.

    example:

    "<test name=""test"">

       <testing>

       </testing>

    </test>"

    after that, test your event again, if work, then the problem are with AJAX trying to get the content of your xml, if it doesn't work then your .xml file may be not okay or your events might be with something wrong..

  • I made a game a time ago that if there wasn't anything running every tick then the fps would go to 200+, everything go super fast.. but it was on a old version of Construct2(8x or 9x I guess)..

    so the reason for that could be on your events ;)

  • Sorry for bumping the post again, but I really need to understand well what's possible and not possible.

    Also if there's another one with the same questions they might have some answers here..

    I will explain with details what I'm trying and how I'm doing..

    there is a webserver running in my PC, php files are inside the 'htdocs', however the game isn't in 'htdocs', it's in a local folder.

    I can request php files with AJAX running in preview mode (adding the header to allow access), but I can't request .XML files. When I request a .xml file and add below a condition AJAX->On "xml request" Completed and add some simple actions to check if it has succeed to get it, nothing happens, meaning that AJAX failed to retrieve the file from the webserver, probably because of security definitions..

    Now.. comes the question, so how do I successfully request a .xml file from a webserver?

    I'm trying some solutions.. one of them is request a .php file with '(header('Access-Control-allow..')' and add "simplexml_load_file" to load the .xml file, then use the function 'asXML()' to send the whole xml information to AJAX.

    example:

    <?php
    header('Access-Control-Allow-Origin: *');
    
    $xml = simplexml_load_file("test.xml");
    echo $xml->asXML();
    ?>
    

    After requested, load the ajax.lastdata to XML Object

    this formula currently is working, but isn't the most efficient way...

    Concluding, after all, is it possible to request("REQUEST URL") .XML files from a webserver using AJAX object? I already tried but couldn't succeed to request it, so if anyone know how to do it, please make a tutorial explaining..

    Thanks

  • Do you mean the 'Access-Control-Allow-Origin' HTTP header? That is only necessary if you are requesting a file from a different domain (e.g. requesting example.com/test.xml from scirra.com/demo.html). If you are making a cross-domain request, you need to set the server up to respond with that HTTP header - the file contents are not affected.

    Hi Ashley thanks for reply

    I have a webserver running on my pc and there's a file located like: localhost/test.xml

    My game is running outside the 'https' directory from the webserver, in a normal folder on my PC and in preview, I used AJAX to request this test file but it can't access it, does nothing.

    For php files I used whoever the header 'access-control' like you said and it works if I request with AJAX.

    so my problem are with .XML files..

  • I'm trying to access XML files too from a local webserver but I can't.

    I can whoever access php files if I declare a access header to the file but I have no idea how to do that with .XML files

    any solution??

  • To access php files with ajax object stored in a server you need to add a "header access-control..." to the file.

    But what about xml files, how do I access it?

    Tryed but couldn't get the information of the file with AJAX and from what I know xml are just files that you storage information, so how do I request it from a webserver if there's no header in xml?

  • nice effects from the demo!

    also fps running at 60 in GChrome.. hope old pcs get good performance too.. that's what I fear.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • found some awesome effects =D

  • .exe export would be awesome, downloaded the space blaster with awesomium and worked great!

  • First time I hear about that awesomium and to be honest I'm still not sure what's that hahaha.. I'm taking a look at their site and the features..

  • Well that isn't hard to achieve ;)

    you just need to call the message that will appear in the msg box when you click the object.

    you can use it with ajax and call .txt files with the message or even have texts stored in variables of the objects.

    You can check the current variable and add a choice for the player (yes/no).

    when the message is over put the msg box and the message invisible.

    it's important to add those objects in a separate layer that doesn't move around.

  • I hope the next update for xbox the Internet explorer have html5 support, would be SO AWESOME see our games in the TV and even better.. with a controller support..

Guif0DA's avatar

Guif0DA

Member since 5 Dec, 2010

None one is following Guif0DA yet!

Trophy Case

  • 13-Year Club
  • Email Verified

Progress

14/44
How to earn trophies