Transparent Application Window
Submitted by eLenka on 11 October, 2010 - 16:32

This demo shows transparent application window with visible flash object.
Note. Flash Viewer Engine is needed.
Source archive: ball.zip (1.09Mb)
Some sample source:
procedure TBallWindow.FormResize(Sender: TObject); begin FlashMaker.Width := ClientWidth; FlashMaker.Height := ClientHeight; with FlashMaker.FlashMovie do begin Version := SWFVer8; AddCircle(0, -25, 25).SetRadialGradient( cswfRed, cswfBlack, 40, 40); AddSprite(Shapes.Last); with PlaceObject(Sprites.Last, 1) do begin SetPosition(ClientWidth div 2, 100); with Shadow do begin BlurX := 10; BlurY := 10; Distance := 2; end; Name := 'ball'; CompileEvent('onClipEvent (mouseDown) { _root.drag = true; startDrag("", false); } '+ 'onClipEvent (mouseUp) { _root.drag = false; _root.speed = 0; stopDrag(); } '+ 'onClipEvent (enterFrame) { if (not _root.drag) { ' + ' this._y += _root.speed; if (this._y > _root.bottom) { ' + ' this._y = _root.bottom; _root.speed *= -1; } ' + 'if (_root.speed >= 0) _root.speed += 1.8; ' + 'else _root.speed = _root.speed * 0.9 + 1.8;' + ' } } '); end; FrameActions.Compile('var drag: Boolean = false; var bottom: Number = '+ IntToStr(ClientHeight)+'; var speed: Number = 0;'); ShowFrame(); end; FlashMaker.Make; if not showinfo then begin showinfo := true; MessageBox(Handle, PChar('Drag ball and use popup menu to close application.'), Pchar('FlashViewer Window sample'), MB_OK + MB_ICONINFORMATION) end; end;