Unit 4 Lesson 1-3 - why does sound have to be included in Scene?

I’ve been working on the Unit 4 lesson 1 - 3 exercise. I chose the Sports option. The only way my animation of sports ball images will be displayed is if I have a playSound() method in my drawSporty() method (which is pretty much identical to the drawEmoji() method in lesson 2). If no playSound(), everything compiles and runs, but nothing is displayed in the Theater. Why? I’ve read through the documentation for Theater and Scene, and I don’t see any requirement for a sound. I can’t figure it out. Thanks, jr

Could you share your project? Might be easier to find the issue if we can look through it!

1 Like

I just tried the same code on a Windows machine using Chrome (was using a Mac with Safari earlier). Now if I comment out the playSound() it still displays the animation. I’m going to test it on the Mac again next period, just to see if I can replicate it.

(Previously - Can you see my session? johnranta is my login - Unit 4 lesson 1-3 (Sports option).

Hi @jranta, would you mind sharing your project so we can help debug? Maybe if we put a couple of eyes on it we can get to the bottom of the problem. Sounds like @jeff.rhodes might want to look at it too :).

One issue I have heard of happening is if you are using Safari some problems like yours arise. I believe Java Lab has been optimized for chrome.

Please let us know if you were able to replicate the problem.

  • Sam

The problem is specific to the browser. Code runs fine (without playing a sound) in Chrome on a Windows system. Code compiles without errors but doesn’t run on a Mac using Safari, unless I play a sound in the method. jr

I have also run into this issue with the theater- I just send a message to support@code.org to make sure they are aware.
Best,
Lindsay

Hey @jranta , @lindsay.davis reached out to support about this issue and this is what they had to say:

This is a known issue our team is aware of and they are actively working on a fix. In the meantime, our team recommends adding audio to the project to make it work. We apologize for any inconvenience and thank you for your patience while our teams work on a fix.

I personally haven’t tried adding audio but if you do let us know if this is another fix.

  • Sam

No worries. The only problem was the hour I spent figuring it out. JR