You can use multiple ways to achieve that, I would recommend you using the in game design tab. But if you want to do it by code, you have to do something like
Sprite,Background,Centre,"bg.jpg",320,240
_F,0,0,1000,0,1
_F,0,9000,10000,1,0
Sprite,Background,Centre,"bg2.jpg",320,240
_F,0,10000,11000,0,1
_F,0,19000,20000,1,0
Where 0,1000 / 9000,10000 = startTime & endTime etc...
https://youtu.be/EJl4u-08VoI don't hesitate to check that video if you need some basics!