prev | index | next

MX-Animated mask
6
30
3384 bytes
967 bytes
2004-01-04 00:00:00
2007-09-12 17:57:51
Oldes (oliva.david@seznam.cz)


How to use animation (sprite) to mask an image

This is available only for Flash version 6 and more

(mx-animmask.rswf)
background 246.250.255
es: EmptySprite
spr_animmask: Sprite [
    stop showFrame
    rebol [
        repeat i 74 [
            rswf/compile load rejoin [{
                shp_arc} i {: Shape [
                    Bounds -300x-300 300x300
                    fill color 255.55.55
                    arc 300 0 } i * 5 {
                ]
                RemoveDepth 1
                Place shp_arc} i { [at 0x0 depth 1]
                showFrame
            }]
        ]
    ]
    end
]
place spr_animmask [
    at 200x185 mask 1
    actions [
        load [bIn: true]
        enterFrame [
            either bIn [
                nextFrame
                if _currentFrame = _totalframes [bIn: not bIn]
            ][
                prevFrame
                if _currentFrame = 1 [bIn: not bIn]
            ]
        ]
    ]
]
picture: place es
doAction [
    picture.loadMovie(%demon.swf)
]

showFrame
end