[SOLVED]How do I play music (mp3) from an URL

0 favourites
  • 10 posts
From the Asset Store
A complete set of Graphic, User Interface element to build 2D mobile game or PC game.
  • Hi

    I simply want to know how i can play an music (mp3) from a URL stored in an variable instead of my project files ?

    Thank in advance for your response ^^

  • Try This:

    Create a global variable called URL, set it to text, and leave the value blank

    Global text URL = ""

    System> On start of layout > System > Set URL to "http://www.whatever.com/your_music.mp4"

    System> On start of layout > Audio > Play "http://www.whatever.com/your_music.mp4"


    Use Play (by name)

    and put the following in the name and tag fields:


    I didn't test this

    Hope this or some variation of this helps....

  • Thank you, but it doesn't work :/

    I think it's because the audio plugin search on the "Sounds" or "Musics" folder on the local project, but i don't need the effects of the audio object give to me.

    I just need to Play/Pause mp3 from an url, if i can use javascript or wathever like this and don't use the audio object, it's not a problem for me ^^

    Thank for your futur help

  • I just up this post ^^

    Thank for any future helper(s)

  • up please ^^

  • well, you can use the iframe plugin. (search forum)

    And then use the "soundcloud embed" feature on soundcloud in your iframe to play/stream big remote audio files.

    Thats what i do, anyway.

  • plugin name:


    The url to set ind the iframe:


  • Why you shouldn't use MP3 in your HTML5 games

    Basically, there's no HTML5 way to read a MP3 file. So unless you're going through some kind of flash player, which may not be installed on every computers, you'll likely have different results from a computer to another.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I will try the iframe method, thanks ^^

  • Thanks, i use the div plugin with this code -->

    <audio controls>

    <source src='yoursourcehere.mp3 type='audio/mpeg'>

    Your browser does not support the audio control.


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