au3scr Posted February 11, 2008 Share Posted February 11, 2008 (edited) Can i do with autoit some thing like this?http://autoit.pri.ee/downloads/noname.exesource :expandcollapse popup' Flip book project v1.0 ' Our largest bitmap is: $DEFINE MaxHeight 50 $DEFINE MaxWidth 50 $DEFINE MaxImages 4 ' We want to loop back to the beginning: $DEFINE LoopBook ' How many milliseconds should elapse before flipping to next page: $DEFINE FlipDelay 200 $RESOURCE BMP_0 AS "C:\Documents and Settings\rain\My Documents\PINVA0_H.bmp" $RESOURCE BMP_1 AS "C:\Documents and Settings\rain\My Documents\PINVB0_H.bmp" $RESOURCE BMP_2 AS "C:\Documents and Settings\rain\My Documents\PINVC0_H.bmp" $RESOURCE BMP_3 AS "C:\Documents and Settings\rain\My Documents\PINVD0_H.bmp" TYPE TFlipBook EXTENDS QFORM Images(0 TO MaxImages-1) AS QBITMAP Canvas AS QDXSCREEN FlipTimer AS QTIMER ItemIndex AS INTEGER EVENT FlipTimer.OnTimer (Sender AS QTIMER) WITH This .Canvas.Draw(0,0,.Images(.ItemIndex).BMP) .Canvas.Flip .ItemIndex = (.ItemIndex+1) MOD MaxImages $IFNDEF LoopBook IF .ItemIndex = 0 THEN .FlipTimer.Enabled = 0 $ENDIF .FlipTimer.Interval = FlipDelay END WITH END EVENT FUNCTION Execute AS LONG WITH This .ItemIndex = 0 .FlipTimer.Interval = 1 .FlipTimer.Enabled = 1 .ShowModal END WITH END FUNCTION CONSTRUCTOR Caption = "Flip book" Center ClientWidth = MaxWidth ClientHeight = MaxHeight FlipTimer.Enabled = 0 Images(0).BMPHandle = BMP_0 Images(1).BMPHandle = BMP_1 Images(2).BMPHandle = BMP_2 Images(3).BMPHandle = BMP_3 Canvas.Parent = This Canvas.Init(MaxWidth, MaxHeight) Canvas.Align = 5 END CONSTRUCTOR END TYPE DIM FlipBook AS TFLIPBOOK FlipBook.Execute Edited February 11, 2008 by au3scr Link to comment Share on other sites More sharing options...
weaponx Posted February 11, 2008 Share Posted February 11, 2008 (edited) You could do it with Flash. AutoIt doesn't refresh images quickly enough without showing tearing effects. Edited February 11, 2008 by weaponx Link to comment Share on other sites More sharing options...
au3scr Posted February 11, 2008 Author Share Posted February 11, 2008 as you can see i used 4 different images and added in exe. How i do it with flash? Link to comment Share on other sites More sharing options...
jvanegmond Posted February 11, 2008 Share Posted February 11, 2008 I don't know if you can do it with AutoIt, but I can do it with AutoIt. github.com/jvanegmond Link to comment Share on other sites More sharing options...
Richard Robertson Posted February 11, 2008 Share Posted February 11, 2008 It all depends on how well you know how to use GDI. Link to comment Share on other sites More sharing options...
Zedna Posted February 11, 2008 Share Posted February 11, 2008 (edited) For bitmaps as resources look at my resource UDF For switching image just use picture control GUICtrlCreatePic() and GUICtrlSetImage() or my _ResourceSetImageToCtrl()I think there is no need to use GDI Edited February 11, 2008 by Zedna Resources UDF ResourcesEx UDF AutoIt Forum Search Link to comment Share on other sites More sharing options...
Richard Robertson Posted February 11, 2008 Share Posted February 11, 2008 I meant for animating without flicker. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now