Jump to content
Hobbyist

Splash and Sound

Recommended Posts

Hobbyist

I am attempting to try my luck at using a splash screen WITH sound as well.

I have tried this:

SplashImageOn("Your Sound", "C:\My Pictures\money22.jpg", 680, 515, 150, 100)
        SoundPlay("C:\My Sounds\Vintage Cash Register.mp3", 0)
        Sleep(1100)
       SplashOff()

The result I was seeking was to have the pic displayed and the sound played at the same time.

What i get is the pic displayed and when it disappears the sound then plays. Not even close.

I thought I was going in the right direction after reading the help file, but I guess not.

Any direction would be appreciated.

Hobbyist

Share this post


Link to post
Share on other sites
reb

put sound play before your splash image


MEASURE TWICE - CUT ONCE

Share this post


Link to post
Share on other sites
Hobbyist

Did that too and had gotten the same results, which is why it is perplexing.

Share this post


Link to post
Share on other sites
argumentum
#include <Sound.au3>
Local $pic = "C:\Program Files (x86)\AutoIt3\Examples\GUI\logo4.gif"
Local $unused = FileRead($pic) ; just to have the OS ready for it.
Local $aSound = _SoundOpen(@WindowsDir & "\media\tada.wav")
Local $iSoundLen = _SoundLength ( $aSound , 2 )
SplashImageOn(@ScriptName,$pic)
_SoundPlay($aSound,0)
Sleep($iSoundLen)
_SoundClose($aSound)

 

Share this post


Link to post
Share on other sites
Hobbyist

Thanks - that helped a lot to my understanding of it.

 

I also reversed the splash and soundplay statements since the option is set to "0".

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×