How to replicate a set of layers, states and events?
I want to replicate page indicators for later use. Writing the layers, states and events from scratch works fine but my prototype has two more slideshows and I feel my code repeats itself and this could be solved more efficiently.
When trying to write this as a function I failed miserably. What am I doing wrong? Is a function even the correct way to approach this, or is it better to use a class in this case? Thanks!