How do I call URL in Javascript?

Get help using Construct 2

Post » Tue Jul 02, 2013 9:43 am

Hi, how can I call a URL in construct actions>browser>execute javascript?
B
4
Posts: 25
Reputation: 425

Post » Tue Jul 02, 2013 9:44 am

What do you want from this URL ? If you want to retrieve datas, use the AJAX plugin instead, it's its purpose ^^
Here is how to use it
B
17
S
8
G
4
Posts: 461
Reputation: 6,097

Post » Tue Jul 02, 2013 9:52 am

ah perfect, exactly what I was looking for. It's working. Thanks!
B
4
Posts: 25
Reputation: 425

Post » Tue Jul 02, 2013 10:05 am

my next problem, the url calls to the link of activating a local video player that runs above the application app in the tab of the browser.
How can I simulate this player? to test if I can close it within construct on any click?

my code is as followed:
On any Click
     col = 1
          trigger once> AJAX> Request "http://127.0.0.1/send-to-local.php?command=play0&filenaam=video1.mp4" (tag "video1")

and this with col2 to col9 because it's a slideshow and on click it triggers the video in that video player that is linked through the requested link.

So once again, my problem is. how can I simulate a player on my own computer for testing? linked to this url.
B
4
Posts: 25
Reputation: 425

Post » Tue Jul 02, 2013 10:41 am

Not sure I understand.
If what you need is to call a javascript custom function that you have on the page, the best thing is the "Call Javascript" plugin that you can find here.
B
17
S
8
G
4
Posts: 461
Reputation: 6,097

Post » Tue Jul 02, 2013 10:59 am

let's say
On Any Click
Do this: Request "link to start vlc and play a local video"

how would I do that?
B
4
Posts: 25
Reputation: 425

Post » Tue Jul 02, 2013 11:08 am

Javascript can't access local programs as far as I know. I thought you were using something like youtube's API in your page and wanted to call a function that would start it. I'm sorry but I don't know how to do what you are looking for...
B
17
S
8
G
4
Posts: 461
Reputation: 6,097

Post » Tue Jul 02, 2013 11:15 am

yeah well the people I'm making it for managed to get a video player working on a request url command which is: ""http://127.0.0.1/send-to-local.php?command=play0&filenaam=video1.mp4"

Which starts the video player with that file, the only problem is, if that the user wants to stop the video and go back to the slideshow by clicking the mouse, they would have to code that in the video player.

oh well, a problem for their solving I guess.
B
4
Posts: 25
Reputation: 425

Post » Thu Jul 11, 2013 4:19 pm

They can't get it solved,

is there a way like... downloading a vlc plugin for chrome and starting a video through that browser plugin and after it's done or mouse click is pressed that it sends the user back to the construct export index.html file ??
B
4
Posts: 25
Reputation: 425

Post » Thu Jul 11, 2013 4:39 pm

If this is on PC. Could you not just pause the game, open a new tab with the movie, and then once the movie is done playing, the user will be able to go back to the game.
B
54
S
14
G
13
Posts: 818
Reputation: 17,459

Next

Return to How do I....?

Who is online

Users browsing this forum: FabianB, Vodakman and 8 guests