Solved: Issue With 'When Sound Finishes Playing' block after resuming sound

maxeweinbach

  • Posts: 5
Hi. I'm having an issue with the "When Sound Finishes Playing" block. Basically, I have background music playing on channel 2, and when it finishes playing, another song is supposed to start playing. I also have created a pausing function in my game, which also pauses the sound on channel 2. When I resume the game, the sound on channel 2 resumes as well.  If I'm playing the game and haven't pressed pause, the second song does, in fact, play after the first song finishes on channel 2; however, if I do pause the game and the sound on channel 2 and then resume it and then let the first song finish playing, the second song doesn't play afterwards. I've also tried having the second song on another channel, but that doesn't seem to help. Neither does using the 'When channel finishes playing' block. I should also note that if I pause at this point (after the first song finishes playing) and then resume, once I resume, I receive an error that says: Universal#uncaughtErrorHandler(51): Error #1009: Cannot access a property or method of a null object reference.

I would really love some help on this one. I've really tried my best figuring this out and can't seem to find the solution. Thanks!

« Last Edit: March 27, 2019, 09:33:47 am by maxeweinbach »

bennyliang1337

  • *
  • Posts: 11
I have the same issue. I hope somebody can reply.

Thanks,
Ben

rob1221

  • *
  • Posts: 9419
In 3.4 or 3.5?  This sounds like something that is already fixed for 3.5.

bennyliang1337

  • *
  • Posts: 11
Hello, thanks for replying.

I am using Stencyl 3.4 Build 9300. I purchased a Studio license for Stencyl. How do I go about upgrading my Stencyl? Where do I go? I only see v3.4 available.

Thanks for replying. I'll try and respond later.


maxeweinbach

  • Posts: 5
Hi guys. I only just recently saw the replies to my initial post. I'm still having the same problem if in the new Stencyl 4.0. Any suggestions?

rob1221

  • *
  • Posts: 9419
I read it a few times but still don't quite understand what's going on.  Could you attach a project showing the problem?

maxeweinbach

  • Posts: 5
Hi! Sorry if things seemed convoluted. Basically, if I don't pause, the next song plays just fine after the first song ends. If I do press pause (and resume) at anytime during the game, once the first song ends, the next song will not play, seemingly because the next song has ceased to exist. Attached are the screenshots of my project that are related to this problem. Thanks for your help!


maxeweinbach

  • Posts: 5
Wow! Thank you so much! Finally, it works. For the longest time, I thought it was something on my end that I coudn't figure out. Again, thank you for the fix.