electrico Posted December 30, 2009 Posted December 30, 2009 Hi everyone. Happy New year! I am making a GUI with a swf show inside and i want to put border, so flash video will look a bit "pushed into deep". How can i make such border around my swf??.. Here is my code expandcollapse popup #NoTrayIcon #include <resources.au3> #include <GuiConstantsEx.au3> HotKeySet('{ESC}', 'Close') Opt('GUIOnEventMode', 1) Global $hGUI, $FlashCtrl Global $oFlash Global $fError = False ;main GUI $gui = GuiCreate ("Happy New 2010 YEAR!!!", 900, 700) GuiSetBkColor (0xffffff, $gui) ;Install source FileInstall ("ny.swf", @TempDir & "\ny.swf") ;Now adding flash to the GUI $oFlash = ObjCreate("ShockwaveFlash.ShockwaveFlash.10") $oAutoItError = ObjEvent("AutoIt.Error", "COMError") $FlashCtrl = GUICtrlCreateObj($oFlash, 0, 0, 500, 350) GUISetOnEvent($GUI_EVENT_CLOSE, "Close") With $oFlash .Movie = @TempDir & "\ny.swf" .wmode = "opaque" .allowScriptAccess = "Always" .Playing = True EndWIth GuiSetState() While 1 Sleep (10) WEnd Func Close() $oFlash.Stop() $oFlash = 0 GuiDelete() Exit EndFunc Func COMError() $fError = True EndFunc Thanks in advance.
disposable Posted December 30, 2009 Posted December 30, 2009 Hi everyone. Happy New year! I am making a GUI with a swf show inside and i want to put border, so flash video will look a bit "pushed into deep". How can i make such border around my swf??.. Here is my code #NoTrayIcon#include <resources.au3>#include <GuiConstantsEx.au3>HotKeySet('{ESC}', 'Close')Opt('GUIOnEventMode', 1)Global $hGUI, $FlashCtrlGlobal $oFlashGlobal $fError = False;main GUI$gui = GuiCreate ("Happy New 2010 YEAR!!!", 900, 700)GuiSetBkColor (0xffffff, $gui);Install sourceFileInstall ("ny.swf", @TempDir & "\ny.swf");Now adding flash to the GUI$oFlash = ObjCreate("ShockwaveFlash.ShockwaveFlash.10")$oAutoItError = ObjEvent("AutoIt.Error", "COMError")$FlashCtrl = GUICtrlCreateObj($oFlash, 0, 0, 500, 350)GUISetOnEvent($GUI_EVENT_CLOSE, "Close")With $oFlash .Movie = @TempDir & "\ny.swf" .wmode = "opaque" .allowScriptAccess = "Always" .Playing = TrueEndWIthGuiSetState()While 1 Sleep (10)WEndFunc Close() $oFlash.Stop() $oFlash = 0 GuiDelete() ExitEndFuncFunc COMError() $fError = TrueEndFunc Thanks in advance. How about embedding IE and then embedding flash inside the IE control? This is what I did to embed a flash chart inside a desktop application: $oIEChart = _IECreateEmbedded() $object_ctrlChart = GUICtrlCreateObj($oIEChart, 168, 152, 513, 321) ... and then setting the parameters using: _IEDocWriteHTML ($oIEChart, $strHTML) _IEAction ($oIEChart, "refresh") $strHTML can then be loaded just like a normal HTML. (i.e. creating the SWF object, setting params, etc...) The embedded SWF will already have a beveled edge, or you can still apply GUI border settings into the parent control.
KaFu Posted December 30, 2009 Posted December 30, 2009 Fake a border with colored labels... expandcollapse popup#cs ---------------------------------------------------------------------------- AutoIt Version: 3.3.2.0 Author: myName Script Function: Template AutoIt script. #ce ---------------------------------------------------------------------------- ; Script Start - Add your code below here #NoTrayIcon ;#include <resources.au3> #include <GuiConstantsEx.au3> HotKeySet('{ESC}', 'Close') Opt('GUIOnEventMode', 1) Global $hGUI, $FlashCtrl Global $oFlash Global $fError = False ;main GUI $gui = GuiCreate ("Happy New 2010 YEAR!!!", 900, 700) GuiSetBkColor (0xffffff, $gui) ;Now adding flash to the GUI $oFlash = ObjCreate("ShockwaveFlash.ShockwaveFlash.10") $oAutoItError = ObjEvent("AutoIt.Error", "COMError") $FlashCtrl = GUICtrlCreateObj($oFlash, 20, 20, 500, 350) GUICtrlCreateLabel("",16,16,508,358) GUICtrlSetBkColor(-1,0x000000) GUICtrlCreateLabel("",17,17,506,356) GUICtrlSetBkColor(-1,0x121212) GUICtrlCreateLabel("",18,18,504,354) GUICtrlSetBkColor(-1,0x898989) GUICtrlCreateLabel("",19,19,502,352) GUICtrlSetBkColor(-1,0xcdcdcd) GUISetOnEvent($GUI_EVENT_CLOSE, "Close") With $oFlash .Movie = @ScriptDir & "\ny.swf" .wmode = "opaque" .allowScriptAccess = "Always" .Playing = True EndWIth GuiSetState() While 1 Sleep (10) WEnd Func Close() $oFlash.Stop() $oFlash = 0 GuiDelete() Exit EndFunc Func COMError() $fError = True EndFunc OS: Win10-22H2 - 64bit - German, AutoIt Version: 3.3.16.1, AutoIt Editor: SciTE, Website: https://funk.eu AMT - Auto-Movie-Thumbnailer (2024-Oct-13) BIC - Batch-Image-Cropper (2023-Apr-01) COP - Color Picker (2009-May-21) DCS - Dynamic Cursor Selector (2024-Oct-13) HMW - Hide my Windows (2024-Oct-19) HRC - HotKey Resolution Changer (2012-May-16) ICU - Icon Configuration Utility (2018-Sep-16) SMF - Search my Files (2025-May-18) - THE file info and duplicates search tool SSD - Set Sound Device (2017-Sep-16)
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