prev | index | next

FLASH8 DraggableClipHandler
8
24
11752 bytes
1048 bytes
2007-10-08 16:37:56
2007-10-08 20:48:46
Oldes (oliva.david@seznam.cz)


Demontstrates how to extend existing Class to create a new one

(swf8-draggablecliphandler.rswf)
background 200.200.200

require %includes/tracer.rswf
require %gui/GUI_ClipHandler.rswf

GUI_DraggableClipHandler: Extends GUI_ClipHandler [
    ;init not required if there is no new action to provide
    ;init: func[url width height][super(url width height)]
    onPress:   does [this.startDrag() this.updateAfterEvent()]
    onRelease: does [this.stopDrag()]
    onReleaseOutside: does [this.stopDrag()]
]

clip1: place GUI_DraggableClipHandler at 10x80
clip2: place GUI_DraggableClipHandler at 10x382

doAction [
    Tracer.resize(419 50)
    trace("== LoadClips ==")
    clip1.loadClip("http://box.lebeda.ws/~hmm/rswf/bitmaps/holky.jpg" 400 300)
    clip2.loadClip("http://box.lebeda.ws/~hmm/rswf/bitmaps/motyl.jpg" 400 300)
]

showFrame
end