During development, cells must interpret complex signalling inputs to initiate appropriate gene expression programmes. In fly embryos, brachyenteron (byn) expression is promoted by Tll and repressed by Hkb. Tll and Hkb are transcription factors whose own expression is promoted by ERK signalling to different extents: Hkb is expressed only in the embryo posterior, where ERK activity is higher, whereas Tll is expressed more broadly. This difference in Tll and Hkb expression domains has been proposed to generate a stripe of byn expression before gastrulation begins. Here, Jared Toettcher, Stanislav Shvartsman and colleagues interrogate this model, applying optogenetic approaches to ectopically induce ERK activity in Drosophila embryos. They use live imaging to follow tll and hkb transcription following exposure to a light stimulus and find that tll is expressed before hkb. Surprisingly, hkb expression can be triggered even by low light levels, and time to hkb induction scales with ERK activity. The authors therefore propose that lower levels of ERK signalling increase the delay between Tll and Hkb expression. Indeed, they show that a short light pulse promotes expression of Tll but not Hkb, thus producing sustained byn expression. Together, this work sheds new light on how ERK inputs establish the byn stripe during Drosophila development and demonstrates the power of optogenetic approaches.