Open URL in new window

Discussion and feedback on Construct 2

Post » Mon Sep 05, 2011 9:17 pm

How do I use the built in browser object to open a URL in a new tab or in a new browser window?

Jason
B
18
S
7
G
5
Posts: 62
Reputation: 4,410

Post » Mon Sep 05, 2011 9:40 pm

you actually can't with the way it is implemented.
You would have to add a function to the plugin.

And the runtime would go along :
[code]
acts.GoToNewURL = function (url,tab)
     {
          window.open(url,tab);
     };
[/code]

Where url (destination url) and tab (name of the new tab/window) are both strings.
The new tab/window depends on how the user set its browser, if it is to open tabs or windows.
Nothing you can do about this one.Kyatric2011-09-05 21:41:25
New to Construct ? Where to start

Image Image
Image Image

Please attach a capx to any help request or bug report !
Moderator
B
247
S
85
G
40
Posts: 6,999
Reputation: 57,793

Post » Mon Sep 26, 2011 5:05 pm

Something like this could be extremely useful considering how much Adobe Flash has been utilized for designing flash websites. Just thinking of the possibilities. C2 could essentially be used to design entire dynamic websites just as flash has been used to do so if one were so inclined...
B
22
S
9
G
3
Posts: 202
Reputation: 3,645

Post » Mon Sep 26, 2011 5:17 pm

This is an old thread - since it was posted the browser object has had an 'Open URL in new window' action added.

Note: neither Flash nor Construct 2 are designed for making websites. Usability experts have always advised against using Flash to make websites, and the same pretty much applies to Construct 2 - it's a tool for making games, not websites.Ashley2011-09-26 17:17:53
Scirra Founder
B
359
S
214
G
72
Posts: 22,949
Reputation: 178,544


Return to Construct 2 General

Who is online

Users browsing this forum: Arima, Paradox and 6 guests