Switching Music

0 favourites
  • 4 posts
From the Asset Store
Toggles Dials Switches and Alerts ! A foundational sound grouping of Analog type switches and Steampunk effects
  • --------------

    Found solution

    --------------

    Seems to be a bug when playing music files in Chrome.

    Just set my music files as sound files instead. No problems now.

    Also, music files were interfering with my pathfinding. Now that they are set to sound files, there is no issue.

    ----------------

    Original Problem

    ----------------

    Hello,

    Not sure why this is happening.

    I've loaded two music files, both work fine when played on their own.

    For example:

    ---

    On Layout Start

    -> Play "Music 1" looping. Tag = "Music 1"

    ---

    ((Music plays on startup))

    Then I added a sprite "button" which should stop Music 1, and play Music 2.

    ---

    On "Sprite 1" clicked

    -> Stop "Music 1"

    -> Play "Music 2" looping. Tag = "Music 2"

    ---

    *When running in debug, it shows the first music play, then when the sprite is pressed, it shows the first music stop and second music as "playing". However, the second music does not play (music time playing stays at zero).

    Am I missing something simple?

    Should I pre-load the second music file??

    Thanks for reading.

  • have you tried preloading it yet?

  • I have, but I'd rather avoid it. It is a decent sized file and takes a long time to load.

    I don't think I need to preload it -- as Kyatric's Asteroid clone does not preload the music when it switches between stages.

    scirra.com/tutorials/358/asteroid-clone-in-less-than-100-events/page-1

    So... since his works... not sure why my basic example is not working.

    Is it possible that Construct 2 starts streaming the first file, then when it switches, it tries to stream both files??

    Very bizarre.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Found solution.

    Might be a chrome bug.

    (Not using "music" files anymore. Just using "Sound" files fixed the problem).

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