Link: https://imanas.shanghai.nyu.edu/~ys3041/audio/story.html
In this project, I am responsible for the website coding. We three wrote the rough storyline together and then work on the script. According to my partner’s requirement and my opinion, I designed the layout of the website, which is not that difficult.
My first work is to find out the way to the countdown on the website automatically. I searched on the website and then get some codes about counting from 1 to 10. Then, I revised it to the countdown.
In our design, if the audience clicks the start button, the sounds and countdown will go through automatically. Our original idea is to set a different interval. For instance, the interval from 190 to 180 is half second, but the interval from 180 to 179 is the duration of audio. But this is too hard that I tried a lot of time and also asked Professor Moon for help, while they all could not work.
So I changed the design of the coding. I used the click count to control the audio and countdown. So when the audience clicks the button, the first audio play. And when they click the button again, the countdown started from 190. It would end at 180 and played the second audio. Hence, my coding is when the countdown stops at a certain time, the audio would be switched and played.
Since professor Moon’s coding doesn’t help, I emailed him before I wrote the new coding. When I went to his office, I showed him my coding and he helped me to improve my coding. Since there are some tricky parts in my coding, we changed the frame of the coding. In this coding, we used three functions. One is for countdown by click count, the other is for the time interval and another one is for change number of the website. So in this website, when the audio ends, the countdown starts.
Finally, I got the audio file from Chloe and Vincent and double check the audio with the script in case of the mistakes. And I implement them into the coding.
Difficulties:
For my part, the most challenging part is the logic of the website. How the code works and the causal relationship are very important in this coding. And the other thing is the last part. When the day counts to 0 days, if the audience clicks the button, the last scene plays. While from our coding, the countdown goes on when the audio ends though the number is negative. I tried a lot and at last, I used this to control it.
I think this part can be improved but now I don’t have any other better idea.
Thanks for my partner’s work and Dave’s suggestion. Thanks to Professor Moon for helping my coding.