2 little HTML5 questions about AppMobi and Web

Discussion and feedback on Construct 2

Post » Tue Apr 23, 2013 6:58 pm

Hello !

I have 2 questions :)

1 - When I try to use AppMobi in their kind of , it asks me to put that code in the head of my index.htm :

"<!-- the line below is required for access to the appMobi JS library -->
<script type="text/javascript" charset="utf-8" src="http://localhost:58888/_appMobi/appmobi.js"></script>

<script type="text/javascript" language="javascript">
        // This event handler is fired once the AppMobi libraries are ready
        function onDeviceReady() {
            //use AppMobi viewport to handle device resolution differences if you want
            //AppMobi.display.useViewport(768,1024);

            //hide splash screen now that our app is ready to run
            AppMobi.device.hideSplashScreen();
        }

        //initial event handler to detect when appMobi is ready to roll
        document.addEventListener("appMobi.device.ready",onDeviceReady,false);
</script>
"

I've tried, and tried, but it never works.
Does someone has the solution ?

2 - I tried to to put my game on my website, to share it with my friends and have their returns.
I'm really stuck with it : i put an iframe on a page, calling the index.htm of the game, but it never works, and says that the file can't be found.
I tried to find solution on the forum, but didn't succed in it.
I'm probably missing something, but I don't know what.

Thanks !
B
11
S
6
G
2
Posts: 105
Reputation: 3,910

Post » Tue Apr 23, 2013 9:27 pm

1) You don't need to worry about that - just choose the 'export for Intel XDK' (note they bought out appMobi) option when exporting, and it generates all the code for you.

2) Link us to your website so we can see what you've done.
Scirra Founder
B
359
S
214
G
72
Posts: 22,951
Reputation: 178,578

Post » Tue Apr 23, 2013 10:11 pm

For number 2 are you using absolute or relative links?
B
49
S
11
G
10
Posts: 1,833
Reputation: 14,418

Post » Wed Apr 24, 2013 12:47 pm

hi and thanks for your answer.

I'm using "www.blabla" link.
Ashley, I did as you said, but it seems that it's not working, it's still asking me to put the code in tha index.htm.
B
11
S
6
G
2
Posts: 105
Reputation: 3,910


Return to Construct 2 General

Who is online

Users browsing this forum: Eisenhans and 14 guests