How do I Play URL Audio?

0 favourites
  • 4 posts
From the Asset Store
This Student Workbook uses both Construct 3 & 2 encoding. It supplies client-side & php "back-end" encoding.
  • Thanks to anyone who gave advice

    This is what I have done so far, and when I exported it to the Android platform to run it, any mp3 file selected would not play.

    I went through the text to make sure the music was selected correctly and the event was triggered correctly.

    + FileChooser: On changed

    ----+ System: FileChooser.FileTypeAt(0) = "audio/mpeg"

    -----> Audio: Add remote URL FileChooser.FileURLAt(0) (type "audio/mpeg") as name "LocalMusic"

    -----> Audio: Play FileChooser.FileURLAt(0) looping from Music at 10 dB (stereo pan 0, tag "")

    -----> Text4: Set text to 1

    + System: Every tick

    -> Text: Set text to FileChooser.FileTypeAt(0)

    -> Text2: Set text to FileChooser.FileNameAt(0)

    -> Text3: Set text to FileChooser.FileURLAt(0)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • -----> Audio: Add remote URL FileChooser.FileURLAt(0) (type "audio/mpeg") as name "LocalMusic"

    -----> Audio: Play FileChooser.FileURLAt(0) looping from Music at 10 dB (stereo pan 0, tag "")

    If you add a URL with the name "LocalMusic", then you need to play audio named "LocalMusic", not pass the URL again.

  • > -----> Audio: Add remote URL FileChooser.FileURLAt(0) (type "audio/mpeg") as name "LocalMusic"

    > -----> Audio: Play FileChooser.FileURLAt(0) looping from Music at 10 dB (stereo pan 0, tag "")

    If you add a URL with the name "LocalMusic", then you need to play audio named "LocalMusic", not pass the URL again.

    Thank you so much, I will try it~

  • > -----> Audio: Add remote URL FileChooser.FileURLAt(0) (type "audio/mpeg") as name "LocalMusic"

    > -----> Audio: Play FileChooser.FileURLAt(0) looping from Music at 10 dB (stereo pan 0, tag "")

    If you add a URL with the name "LocalMusic", then you need to play audio named "LocalMusic", not pass the URL again.

    It totally works now! Thank you

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