-- les couleurs 
blanc = Color.new(255,255,255)
black = Color.new(0,0,0)
font = Font.load("police/police.ttf")

ps1 = "By fou2psp"
 
ps12 = "Bienvenue "..System.nickName().." ."

font:setPixelSizes(30,30) 

--on cree l'effet Aplpha
bk = Image.createEmpty(480,272)--on cree une image
alphaValue = 255 -- on definit la valeur alphique ( par defaut on met 255)
bkColor = Color.new(0,0,0,alphaValue) --on cree la couleur aphique (blanche)
bk:clear(bkColor)-- on efface

Mp3me.load("file/PS1.MP3")
-- premiere image
while true do
screen:clear() -- on efface l'ecran
screen:fontPrint(font,0,100,ps1,Color.new(0,0,255)) -- on affiche la premiere image
screen:blit(0,0,bk) -- on charge l'image cree tout a l'heure
if alphaValue > 0 then -- les codes suivant permetent l'effet ALPHA
alphaValue = alphaValue - 8 -- on diminue la valeur alphique de 8
else
break
end
bkColor = Color.new(0,0,0,alphaValue)
bk:clear(bkColor)
screen.waitVblankStart()
screen.flip()
end
screen.waitVblankStart(190) 
while true do
screen:clear()
screen:fontPrint(font,0,100,ps1,Color.new(0,0,255)) 
screen:blit(0,0,bk)
if alphaValue < 255 then
alphaValue = alphaValue + 20 -- on augmente la valeur de 20
else
break
end
bkColor = Color.new(0,0,0,alphaValue)
bk:clear(bkColor)
screen.waitVblankStart()
screen.flip()
end

--seconde image
while true do -- le code est indentique que celui de l'image precedente
screen:clear()
screen:fontPrint(font,0,100,ps12,Color.new(0,0,255))
screen:blit(0,0,bk)

Mp3me.play()

if alphaValue > 0 then
alphaValue = alphaValue - 14 -- on diminue la valeur alphique de 14
else
break
end
bkColor = Color.new(0,0,0,alphaValue)
bk:clear(bkColor)
screen.waitVblankStart()
screen.flip()
end
screen.waitVblankStart(380) 
while true do
screen:clear()
screen:fontPrint(font,0,100,ps12,Color.new(0,0,255))
screen:blit(0,0,bk)
if alphaValue < 255 then
alphaValue = alphaValue + 20 -- on augmente de 20 la valeur alphique
else
break
end
bkColor = Color.new(0,0,0,alphaValue)
bk:clear(bkColor) -- on efface l'ecran
screen.waitVblankStart()
screen.flip()
Mp3me.stop()

dofile("script3.lua") -- on execute le programme 


bk = nil

end





















































































