-- variables

statbarre = "vd"
countbarre = 1

-- images
barre = Image.load("image/barre.png")
barrex = 172
barrey = 212

--programme
while done == false do

screen:blit (x,y,boot6)
screen:blit (barrex,barrey,barre)

   if barrex < 173 then
      statbarre = "vd"
   end
   if barrex > 269 then
      statbarre = "vg"
      countbarre = countbarre + 1
   end

   if statbarre == "vd" then
      barrex = barrex + 1
   end
   if statbarre == "vg" then
      barrex = barrex - 1
   end
   if countbarre > 3 then
      dofile("script2.lua")
   end

-- fin du programme
screen.waitVblankStart()
screen.flip()
end
-- endnd