Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - WarrenTierney

Pages: 1
Guides & How-To's / Re: Saving Game Attributes to Server
« on: September 29, 2015, 12:18:17 pm »
That I do not know, I was using online server.  I imagine for a local host if your using PHP I would follow those guidelines.

Resolved Questions / Re: Unexpected problem
« on: July 08, 2015, 12:05:00 pm »
Thanks guys! Big help!!!

Just check your Log Viewer, download the zip, open the biggest file and look for the last error pertaining to a missing resource. I think this happens cause user are not letting the system save correctly, instead while the saving button is flashing the user is doing other things!!!

Guides & How-To's / Re: Saving Game Attributes to Server
« on: December 21, 2014, 11:46:16 am »
Thanks for the help man! Stencyl is great!

Guides & How-To's / Saving Game Attributes to Server
« on: December 16, 2014, 10:58:51 am »
I am a complete noob and only started using servers, php, mysql and Stencyl last week. But anyone who reads these posts knows I have been trying to save game attributes to a server. I found a way. This is not to suggest it is the best way or the only way, or that people did not know. I am just putting it out there so some poor other person does not have to spend 5 days coming up with a way to do this.

This is just a brief outline of how to save Game Attributes to an online server.  In order to achieve this you need 3 communication pathways.

1. The POST function available in Stencyl.
2. A php file on your server to receive the POST (with the GET or REQUEST function;

Example of code for a POST:

   $fname = $_REQUEST['fname'];       (Notice how there is no submit button here, that it is easier to pass through for Stencyl)
   $sqlinsert = "INSERT INTO People (firstname) VALUES ('$fname')";
   if (!mysqli_query($dbcon, $sqlinsert)) {
      die('error inserting new record');
   $newrecord = "1 record added to the database";

<title>Hello World</title>

<h1>Insert Data into DB</h1>
<form method="REQUEST" action="Prosses.php">(Processes.php is usually called Index.php but just the php file receive the post)
   <label>First Name: <input type="text" name="fname" /></label>

<input type="submit" value="add new person" />

echo $newrecord

Or you can use GET



   $fname = $_REQUEST[fname];
    $sqlinsert = "INSERT INTO People (firstname) VALUES ('$fname')";
if (!mysqli_query($dbcon, $sqlinsert)) {
      die('error inserting new record');
   $newrecord = "1 record added to the database";
echo $fname

PHP to MySql database
3. Then the php should be set up to relay the data back to a mySql server ( 


DEFINE ('DB_NAME', 'Score');

$dbcon = mysqli_connect (DB_HOST, DB_USER, DB_PSWD, DB_NAME);

if (!$dbcon) {
   die('Fuck you fucker');

echo 'This is So annoying';


Once you are in a position where you know that the php is connected to the server i.e., you can post or include information at the end of the .php url like ?fname=Warren and this information is sent to MySql and stored on the database, you are ready.

Final Part

Note in this demonstration I set the post to receive from the field name: fname and the table area in MySql was People, just like the Youtube clip.

Load the game to the server.

You need the subsequent code:

This is what Stencyl recommends

Now the code is sent in exactly the same way as the recommended method is suggested by Stencyl, it is just programmed in a way that makes the raw code the game attribute readable by the php file and transferable to MySql.

Hope this helps someone!

Extension Ideas / Re: On-line ScoreBoard
« on: December 16, 2014, 08:53:42 am »
Thanks man, I actually figured it out, I can now send Game Attributes to server! I am just going to write a entry about it once I refine the build. It is really simple! This along with your save scoreboard function could be really cool,  you could essentially have a game which automatically enters you into a database and then you could retrieve your score.

Resolved Questions / Re: E-mail PHP
« on: December 15, 2014, 03:00:03 pm »
Me preguntaba funciona este sistema con la nueva versión ? Estoy teniendo problemas con el envío a mi archivo php con ambas peticiones GET y POST .

Extension Ideas / Re: On-line ScoreBoard
« on: December 15, 2014, 02:25:36 pm »
Again sorry for Trolling your page.

I have the mysql functioning with get and post on two different php pages. Both connected to the same mysql database, and when I submit, and add information to the link, both register on MySql, however when I try via Qualtrics, which is the website I have uploaded the game, it does not work. Even to be highly conservative I used the visit block to try the GET method. Either way doesnt work. It appears to be the link between Stencyl and webpage. I have created a crossdomain file so interesting that nothing comes up. Strange thing is yesterday I could clearly see the game on qualtrics sending a Get request to my website. Might be the security settings on Flash, or I may broaden the crossdomain file to allow every page from Qualtrics.  If I try the visit block as a test on my server this will show whether it is Stencyl or Qualtrics.  I am just putting this out there in order to help anyone. Not that I know what I am doing. I only started using Stencyl Thursday and I have zero programming experience. Sorry for trolling man!

I used this tutorial to set up a php file. I know it is not 100 what we need but it does allow to connect a php file to a database and then all we need is for the POST from Stencyl to be accepted by the server/php file. The thing is the form fields must align. Also, there is a bloody submit button, if it is possible to have a functioning php page which just accepts raw fields i.e., name. Then I was hoping it would be possible to Post the game attribute labelled as the same form field that the Stencyl posts.

Ask a Question / Re: Save data handling over cloud/server
« on: December 15, 2014, 10:53:31 am »
Thanks man, this community is really good tool. I suppose the key word there is if I encode it correctly. One question, is it possible to code AS3 in the newest version of Stencyl? I want to use the Externalinterface function in AS3 in Stencyl, I know there is a Haxe code for this but I am not really good enough at changing the code. Basically I have the Externalinterface code in AS3. Also, if I get this working I would love to share!

Extension Ideas / Re: On-line ScoreBoard
« on: December 15, 2014, 10:32:55 am »
Thanks for your reply man, and please excuse me for my ignorance but how can I do it?

For instance, I have a game attribute, which is saving and working. Then I use the post function to set-up to post to my php file on my website. Now I have made a cross-domain.xml in root folder of server allowing full permission for survey. I see from the logs that the website has made a Get request, but it does not post the information. I think the problem is I have a submit set up on the php file. I know this is silly but I am super new to all this stuff and I appreciate the POST function on Stencyl does not probably press the submit button :P.

So I was just wondering is what I am trying to do possible? And if it is my logic correct i.e.., create game with scoring system, upload game on Qualtrics,  set the game attributes to post to my server, access this information.

That is all I need to do. Anyway any advice anyone could offer would be great, I am super hyped about creating a game but makes me sad to think I may not be able to do it!

I think this is a question everyone would like answered. At the moment I am trying to do something similar- post game attributes to a server (my website), and then save it (php) on a database (mysql). But I really think it is not possible. This makes me super sad, Stencyl is such a cool program, but I need that data on a server. I am creating a game to collect psychological data on Mturk.

Ask a Question / Re: Save data handling over cloud/server
« on: December 14, 2014, 03:49:19 pm »
Is there any way to save game attributes on a server online?

Extension Ideas / Re: On-line ScoreBoard
« on: December 14, 2014, 01:06:55 pm »
This is a super cool idea, I am definietly going to try it out. On a related note is it possible to upload a game online (server a), and save the game attributes to a different server (server b)? I have a  php file linking the database to the server (server b)and I have also a crossdomain file allowing accessing from server a to server b. I was thinking if I created a form and had congruence between all the forms it might work. For instance, the name:John&password:12345 example. Is it possible to put score and have a score filed on the php and then transfer this to a database? Or are there easier ways to do this like using Newgrounds as a server/database?

Pages: 1