Not sure what you're asking. Each time the frame is loaded, this code will fire. If you want to specify when the code is executed, then you need a separate function that is called when you want to fire of the lines.