image slide show
Blitz3D Forums/Blitz3D Beginners Area/image slide show
| ||
Hi I was wondering how do you take a image for example h1=loadimage=( "Dm1.png" ) ;wait a while for it to change. h2=loadimage=( "Dm2.png" ) Do I use millisecs to do this if so how? |
| ||
Wouldn't it be easier to put all images in a array and pass them using a while loop. Just of the top of my head... eg. You then call the initialise routine before main loop and call the show routine in your main loop (while Not KeyHit(1)) - defining the interval you want to wait (in ms). |
| ||
Graphics3D 800,600,16 SetBuffer BackBuffer() Dim images$(3) images$(0) = "Dm1.png" images$(1) = "Dm2.png" images$(2) = "Dm3.png" Dim slides(3) Global index=3; While Not KeyHit(1) ; Show the loaded images. index=3 If (index < 3)=True Then DrawImage( 0,0, slides(index) ) Delay(time) index=index+1 Flip EndIf Wend End ;Load images on initialisation. Function InitialiseSlideShow() index = 3; While(index < 3) slides(index) = LoadImage( images$(index) ) index=index+1; Wend End Function |
| ||
A little better... Hope this helps... |
| ||
Your code was excellent thanks :) |
| ||
No probs. |