Sign in to follow this  
Followers 0
au3scr

Animatons

7 posts in this topic

#1 ·  Posted (edited)

Can i do with autoit some thing like this?

http://autoit.pri.ee/downloads/noname.exe

source :

' 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 by au3scr

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

You could do it with Flash. AutoIt doesn't refresh images quickly enough without showing tearing effects.

Edited by weaponx

Share this post


Link to post
Share on other sites

as you can see i used 4 different images and added in exe.

How i do it with flash?


Share this post


Link to post
Share on other sites

It all depends on how well you know how to use GDI.

Share this post


Link to post
Share on other sites

#6 ·  Posted (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 by Zedna

Share this post


Link to post
Share on other sites

I meant for animating without flicker.

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
Sign in to follow this  
Followers 0