DOM, what are you?

This week was pretty tough for me. I definitely would say that I went to, what I call, the dark place of coding. That’s when you suddenly feel like ¬†you are inside a never-ending cave of of errors, or even worse when there are no errors, but the code is not doing what you want. I’m not sure if it was this “fall break” or my underestimation of the understanding and power of DOM. DOM, if that is your real name, what are you?

In everything I do I need context to fully create and work 100%. I begin to lack motivation when I don’t know why something is. And this was a very strong feeling this week.

Before I reached a point of creating anything, I tried to absorb as much information about DOM as possible. I realized that I had never used images in a sketch, so first I tried to do that. And then eventually got to toggling a video. I was able to get that to work and use a video of a PComp project. Then from there, I decided to play around with a button controlling more in a sketch. I came up with the idea for a children’s story I have been working on. The very abridged version.

Before getting to that I met with Moon for office hours. We spent an hour of talking about DOM.

Screen Shot 2015-10-14 at 11.11.50 AM

It looked a lot like this, which makes me speechless. I have no words to even begin to understand this.

So, for the sake of time and my own sanity, I decided to go back to my idea and put DOM aside.

Screen Shot 2015-10-14 at 11.16.36 AM

Currently there are 6 pages to the book. It took me awhile to understand how to make each page like a “scene” that has both an image and text. Basically I made two arrays–one for the images and one for the text.

Here is the first array for images which are triggered when the button is clicked in another function.

Screen Shot 2015-10-14 at 11.21.08 AM

Here is the array for the pages. It took me a very, very long time, but I finally figured out how to customized the text on each page.

Screen Shot 2015-10-14 at 11.19.29 AM

To continue on this, I think there must be a better way to have both arrays inside one “Scene” object, but can’t wrap my head around how to do that.