Windows 8: "The app can't use script to load the..

Get help using Construct 2

Post » Sat Dec 14, 2013 4:32 am

Hi, I'm creating a Windows 8 app and I wondering if anybody has experienced this bug before? In my game, I have a Sprite and when clicked it is supposed to navigate to the Windows 8 Store. But, instead I get the following error:

"APPHOST9624: The app can't use script to load the <URL_HERE> url because the url launches another app. Only direct user interaction can launch another app."


My event is: onMouseClick OR onTouchedObject

My action is using the Browser plugin's Go to URL action.


Notes:
- I do have the Internet capability enabled.


Update: I posted one solution below, but I'd still like to leave this thread open in case anybody else would like to illuminate on this issue more.danialgoodwin2013-12-14 04:40:16
B
20
S
4
G
1
Posts: 185
Reputation: 2,563

Post » Sat Dec 14, 2013 4:39 am

Well, instead of using the Browser plugin's "Go to URL" action, I decided to try the "Go to URL in a new window" action. And, it works fine.

Still though, this is just one answer. Anybody else have any more ideas or knowledge surrounding using the "Go to URL" action in a Windows app?
B
20
S
4
G
1
Posts: 185
Reputation: 2,563

Post » Sat Dec 14, 2013 8:32 am

The browser object is not made specifically for calling packaged app functions. It is for manipulating the browser which means it will have calls that do not always work in packaged apps for teh various stores. Since the game is not counting as a browser, it can't browse to the site. That specific call is to load the address into the current browser session. Your windows 8 app does not really allow this because though it is using the IE10/11 engine to render, it is not a browser, it is an app. At least that is what I have been lead to believe. Some of the browser objects calls are meant to actually run in a browser. Your app can't "Go" to the URL directly. It can call to it for an actual browser to open though using the Got to URL in a new window calls a separate instance of IE up which works fine as then you are not trying to load the page inside of your app.
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,573

Post » Sat Dec 14, 2013 6:41 pm

[QUOTE=BluePhaze] The browser object is not made specifically for calling packaged app functions. It is for manipulating the browser which means it will have calls that do not always work in packaged apps for teh various stores. Since the game is not counting as a browser, it can't browse to the site. That specific call is to load the address into the current browser session. Your windows 8 app does not really allow this because though it is using the IE10/11 engine to render, it is not a browser, it is an app. At least that is what I have been lead to believe. Some of the browser objects calls are meant to actually run in a browser. Your app can't "Go" to the URL directly. It can call to it for an actual browser to open though using the Got to URL in a new window calls a separate instance of IE up which works fine as then you are not trying to load the page inside of your app.[/QUOTE]

Great information!
B
20
S
4
G
1
Posts: 185
Reputation: 2,563

Post » Sat Dec 14, 2013 6:47 pm

Glad to be of assistance!
B
49
S
12
G
10
Posts: 1,833
Reputation: 14,573


Return to How do I....?

Who is online

Users browsing this forum: marcinkowski and 1 guest