Sign in to follow this  
Followers 0
electrico

How to do this?

3 posts in this topic

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, $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.

Share this post


Link to post
Share on other sites



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.

Share this post


Link to post
Share on other sites

Fake a border with colored labels...

#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

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