How do I call URL in Javascript?

0 favourites
  • 11 posts
From the Asset Store
Medeival & Viking War Horns Sounds / 22 Unique Calls / 2:40 minutes of audio
  • Hi, how can I call a URL in construct actions>browser>execute javascript?

  • 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

  • ah perfect, exactly what I was looking for. It's working. Thanks!

  • 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.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • 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.

  • let's say

    On Any Click

    Do this: Request "link to start vlc and play a local video"

    how would I do that?

  • 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...

  • 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.

  • 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 ??

  • 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.

  • it's a touch based screen. with no keyboard or mouse. the user has to be restricted within the application. It's a public app that people will use in a public area. the app must be indestructable.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)