Is there currently any way of my app accessing a .php page ( on a seperatley hosted server so cross domain IS an issue ) , retrieving a variable and using this in my project.
Compiling in Cocoonjs.
I have tried and tried using varies snippets I found on the forums and failed.
If anyone has managed this in any way ( even in a bit of a hodge-podge way ) then I would be so grateful if you could show me how or provide an example.
For reasons I wont go into I dont want to use the clayIO sort of approach, as other things will be happening server side to change the variable(s)
Thanks so much
You are mostly out of luck in getting AJAX working with CocoonJS ( I tried several ways). You can try AppMobi plugin using "GET REMOTE DATA" action. Download the latest plugin github.com/koza/appMobiC2Plugin/tree/master/appmobidev so that u can tag the calls and listen for the tag of the event to occur.
Thanks for the reply. I did try that but also it didn't work. This was almost certainly me doing something wrong. I don't suppose you have an example I could look at
Try this capx , dl.dropbox.com/u/80050021/TestAjax64.capx
Thanks, but it doesn't do anything.
ps Can you confirm this works for you ?
Develop games in your browser. Powerful, performant & highly capable.
Are you exporting to DirectCanvas or Phone Browser ? if phone browser then you don't have to do anything if DC,
follow the instructions in the readme
You will see a section at the bottom about including the directcanvasc2.js file in your index.html file. If that file is not present the calls will not work under DC. So just make sure you include the directcanvasc2.js file in your bundle and paste the following ,
(under the appmobi.js script tags) in you index.html
Note the Scirra will convert filenames to lower case if you add it in your file bundle (Files section in the project) . so use small case for all files that u refer in ur eventsheet or index.ml
Let me know if it works , or provide with your capx. You don't have to be sad we are here to help :)
<img src="smileys/smiley4.gif" border="0" align="middle" /> <img src="smileys/smiley4.gif" border="0" align="middle" />
Thanks, I solved it.
I simply defined the ID tag