Need Help on Finishing RevMob mobile web plugin

For developers using the Construct 2 Javascript SDK

Post » Thu Jan 01, 2015 7:18 pm

Hi

This is my second plugin that I'm developing. The problem now is that based from the documentation
http://sdk.revmobmobileadnetwork.com/mobile_website.html

Code: Select all
<script type="text/javascript">
    var REVMOB_CONFIG = { id: "copy your RevMob Mobile Website ID here", disable_auto_fullscreen: true };
</script>  <-- I always get "[RevMob] ReferenceError: REVMOB_CONFIG is not definedapiweb.revmob.com/assets/revmob.js:1 error"

<script src="https://apiweb.revmob.com/assets/revmob.js" type="text/javascript"> </script>  <-- I believed that the only way to do this is to load the js runtime which I already done. Am I correct ?


Currently the only way to fix "REVMOB_CONFIG error" this is to put the var REVMOB_CONFIG.... in the index.html which I think is not really secure and even elegant. People can just rip your games and replace the id easily with their own. (at least I want to make it harder for people to do this)

So how can I do this correctly ? Did I declare the variable in a wrong place ?

Attached is the files for the plugin. It is almost done (90% ?) except the "Link" function. I think we can just do "Sprite" on touched "RevMob.openLink()" ?

Anybody help me please.
You do not have the required permissions to view the files attached to this post.
B
79
S
22
G
14
Posts: 389
Reputation: 12,324

Post » Fri Jan 02, 2015 9:49 am

Try like this it is working but in my local it is hanging.

var REVMOB_CONFIG={ id:this.properties[0], disable_auto_fullscreen: true };
Image
B
52
S
12
G
2
Posts: 256
Reputation: 5,010


Return to Javascript SDK

Who is online

Users browsing this forum: No registered users and 0 guests