Presentacion para Videojuego VBS+HTA

Iniciado por John1Connor, 24 Junio 2015, 09:47 AM

0 Miembros y 1 Visitante están viendo este tema.

John1Connor

Que les parece?
[youtube=640,360]https://www.youtube.com/watch?v=0KrIuOY7fqE[/youtube]


La falta de WScript.Sleep en las aplicaciones html me hace hacer estas cosas raras:
Código (vb) [Seleccionar]

Dim T
T = 0
Public Sub Presenta()
Document.Body.Style.Cursor = "hand"
Logos.src = "imagenes/logos/ramonscriptlogo.png"
With Logos.Style
.position = "Absolute"
.display = "inline"
.filter = "alpha(opacity=" & T & ")"
.width = 230
.height = 300
.top = (Limpiar(Screen.Height) / 2) - (Limpiar(.height) / 2)
.left = (Limpiar(Screen.Width) / 2) - (Limpiar(.width) / 2)
Call Opacity()
end with
End SUb

Public Function Limpiar(s)
Limpiar = Replace(s,"px","")
End Function



Sub Opacity()
if T = 100 Then
Call BorrarUno()
Else
T = cdbl(T) + cdbl(1)
Logos.Style.filter = "alpha(opacity=" & T & ")"
TP = Window.SetTimeOut("Opacity()",50)
end if

End Sub


Sub BorrarUno()
Logos.Style.filter = "alpha(opacity=0)"
T = 0
Logos.src = "imagenes/logos/foroeh.png"
With Logos.Style
.width = 513
.height = 145
.top = (Limpiar(Screen.Height) / 2) - (Limpiar(.height) / 2)
.left = (Limpiar(Screen.Width) / 2) - (Limpiar(.width) / 2)
Call OpacityDos()
end with
End SUb


Sub OpacityDos()
if T = 100 Then
Call BorrarDos()
Else
T = cdbl(T) + cdbl(1)
Logos.Style.filter = "alpha(opacity=" & T & ")"
TP = Window.SetTimeOut("OpacityDos()",50)
end if
End Sub


Sub BorrarDos()
Logos.Style.filter = "alpha(opacity=0)"
T = 0
Logos.src = "imagenes/logos/oglogo.png"
With Logos.Style
.width = 450
.height = 100
.top = (Limpiar(Screen.Height) / 2) - (Limpiar(.height) / 2)
.left = (Limpiar(Screen.Width) / 2) - (Limpiar(.width) / 2)
Call OpacityTres()
end with
End SUb


Sub OpacityTres()
if T = 100 Then
Call BorrarTres()
Else
T = cdbl(T) + cdbl(1)
Logos.Style.filter = "alpha(opacity=" & T & ")"
TP = Window.SetTimeOut("OpacityTres()",50)
end if
End SUb

Sub BorrarTres()
Logos.Style.filter = "alpha(opacity=0)"
T = 0
Logos.src = "imagenes/logos/jclogo.png"
With Logos.Style
.width = 400
.height = 36
.top = (Limpiar(Screen.Height) / 2) - (Limpiar(.height) / 2)
.left = (Limpiar(Screen.Width) / 2) - (Limpiar(.width) / 2)
Call OpacityCuatro()
end with
End SUb

Sub OpacityCuatro()
if T = 100 Then
Call BorrarCuatro()
Else
T = cdbl(T) + cdbl(1)
Logos.Style.filter = "alpha(opacity=" & T & ")"
Logos.Style.Left = Limpiar(Logos.Style.Left) - (T / 50)
TP = Window.SetTimeOut("OpacityCuatro()",20)
end if
End SUb



Sub BorrarCuatro()
Logos.Style.filter = "alpha(opacity=0)"
T = 0
Logos.src = "imagenes/logos/plogo.png"
With Logos.Style
.width = 200
.height = 30
.top = (Limpiar(Screen.Height) / 2) + 50
.left = (Limpiar(Screen.Width) / 2) - (Limpiar(.width) / 2)
Call OpacityCinco()
end with
End SUb

Sub OpacityCinco()
if T = 100 Then
Call BorrarCinco()
Else
T = cdbl(T) + cdbl(1)
Logos.Style.filter = "alpha(opacity=" & T & ")"
Logos.Style.Left = Limpiar(Logos.Style.Left) + (T / 20)
TP = Window.SetTimeOut("OpacityCinco()",50)
end if
End SUb


Sub BorrarCinco()
Logos.Style.filter = "alpha(opacity=0)"
T = 0
Logos.src = "imagenes/logos/logo.png"
With Logos.Style
.width = 692 / 2
.height = 305 / 2
.top = (Limpiar(Screen.Height) / 2) - (Limpiar(.height) / 2)
.left = (Limpiar(Screen.Width) / 2) - (Limpiar(.width) / 2)
Call OpacitySeis()
end with
End SUb

Sub OpacitySeis()
if T = 100 Then
Exit Sub
Else
T = cdbl(T) + (0.5)
Logos.Style.filter = "alpha(opacity=" & T & ")"
Logos.Style.Top = (Limpiar(Screen.Height) / 2) - (T)
TP = Window.SetTimeOut("OpacitySeis()",10)
end if
End SUb



Espero que les guste.
Saludos