How to play external audio file selected with FileChooser ( C 2 )?

Not favoritedFavorited Favorited 0 favourites
  • 1 posts
From the Asset Store
Convert multiple Excel files into JSON files and import them into construct3.
  • Hi everyone,

    I’m trying to build a music player in Construct 2.

    The idea is that the user can upload an external audio file using the FileChooser and then play it inside the app.

    However, I have a problem:

    When I try to use the Audio → Play action, Construct always forces me to choose an internal project sound (like “SOUND_SAMPLE”).

    It does not allow me to use a URL or FileChooser.FileURLAt().

    If I try to type the URL manually, the action turns red and becomes invalid.

    Here is my event setup:

    • Line 3: FileChooser → On changed → AJAX.Request(FileChooser.FileURLAt())

    • Line 5: AJAX → On completed → Call "PlayExternal" (AJAX.LastData)

    • Line 6: Function → On "PlayExternal" → (I want to play the external file here)

    • Line 8: List → On double-clicked → Set playingSong to List.SelectedIndex

    My question:

    How can I correctly play an external audio file (a URL returned by FileChooser) in Construct 2?

    Does Construct 2 officially support playing audio from a URL, or does it only support internal project sounds?

    [Construct 2]

    Thanks!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
Jump to:
Active Users
There are 0 visitors browsing this topic (0 users and 0 guests)