GoldenEye Posted March 13, 2013 Posted March 13, 2013 (edited) Hello there! As the topic title... Do you knows the way to get a swf with transparent backgroud in a fullscreen GUI? For the fullscreen I tried with $WS_POPUP, but i can't a get transparent swf, there are some examples in the forum to get it with $WS_EX_LAYERED but it makes borders and a windowed gui... Thank you, there's an example script with the mistake ... Im a begginer in autoit #Include <GUIConstantsEx.au3> #Include <WindowsConstants.au3> #include <WINAPI.au3> $GUI = GUICreate( "Example" , @DesktopWidth , @DesktopHeight , 0 , 0 , $WS_POPUP ) GUISetBkColor( 0xABCDEF ) GUICtrlCreatePic( @ScriptDir & "\Media\bg_01.jpg" , 0 , 0 , @DesktopWidth , @DesktopHeight ) GUICtrlSetState( -1 , $GUI_DISABLE ) GUISetState( @SW_SHOW ) $oFlash = ObjCreate( "ShockwaveFlash.ShockwaveFlash" ) $FlashCtrl = GUICtrlCreateObj( $oFlash, @DesktopWidth/2 -200, @DesktopHeight/2 -100 , 300, 300 ) $oFlash.Movie = @ScriptDir & "\Media\f_izq.swf" $oFlash.BGColor = "#ABCDEF" $oFlash.Menu = False $oFlash.Play $oFlash.wmode = "transparent" _WinAPI_SetLayeredWindowAttributes( $GUI, 0xABCDEF, 255 ) GUISetState() While 1 Switch GUIGetMsg() Case -3 Exit EndSwitch WEnd Edited March 13, 2013 by GoldenEye
wakillon Posted March 15, 2013 Posted March 15, 2013 Hi GoldenEye Try this way #Include <GUIConstantsEx.au3> #Include <WindowsConstants.au3> #include <WINAPI.au3> $GUI = GUICreate( "Example", @DesktopWidth, @DesktopHeight, 0, 0, BitOR ( $WS_POPUP, $WS_CLIPCHILDREN ), BitOR ( $WS_EX_LAYERED, $WS_EX_TRANSPARENT ) ) GUISetBkColor( 0xABCDEF ) ;GUICtrlCreatePic( @ScriptDir & "\Media\bg_01.jpg" , 0 , 0 , @DesktopWidth , @DesktopHeight ) ;GUICtrlSetState( -1 , $GUI_DISABLE ) GUISetState( @SW_SHOW ) $oFlash = ObjCreate( "ShockwaveFlash.ShockwaveFlash" ) $FlashCtrl = GUICtrlCreateObj( $oFlash, @DesktopWidth/2 -200, @DesktopHeight/2 -100 , 300, 300 ) $oFlash.Movie = @ScriptDir & "\Media\f_izq.swf" $oFlash.bgcolor = "ABCDEF" _WinAPI_SetLayeredWindowAttributes( $GUI, 0xABCDEF, 255 ) GUISetState() While 1 Switch GUIGetMsg() Case -3 Exit EndSwitch WEnd AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
GoldenEye Posted March 15, 2013 Author Posted March 15, 2013 (edited) Hi wakillon! This is helpful, but now i have another question, is it posible to place an image background (jpg, bmp, png ...) and the keep the transparent swf? Seeing your answer i tried to keep the bg, but in this case the swf make a transparent rectangle and i can see behind this window :S These is the purpose of the background image.. Thanks wakillon. Edited March 15, 2013 by GoldenEye
wakillon Posted March 16, 2013 Posted March 16, 2013 Hi wakillon! This is helpful, but now i have another question, is it posible to place an image background (jpg, bmp, png ...) and the keep the transparent swf? Seeing your answer i tried to keep the bg, but in this case the swf make a transparent rectangle and i can see behind this window :S These is the purpose of the background image.. Thanks wakillon. Ok, it takes me some time for find a solution, but i get it ! I use 2 gui, one for your background pic, and second for flash with transparent background. #Include <WindowsConstants.au3> #Include <WinAPI.au3> $hGUI1 = GUICreate ( '', @DesktopWidth, @DesktopHeight, 0, 0, BitOR ( $WS_POPUP, $WS_CLIPCHILDREN ) ) GUICtrlCreatePic ( @ScriptDir & "\Media\bg_01.jpg", 0 , 0 , @DesktopWidth , @DesktopHeight ) $hGUI2 = GUICreate( "Example", @DesktopWidth, @DesktopHeight, 0, 0, BitOR ( $WS_POPUP, $WS_CLIPCHILDREN ), BitOR ( $WS_EX_LAYERED, $WS_EX_TRANSPARENT ), $hGUI1 ) GUISetBkColor( 0xABCDEF ) $oFlash = ObjCreate( "ShockwaveFlash.ShockwaveFlash" ) $FlashCtrl = GUICtrlCreateObj( $oFlash, @DesktopWidth/2 -200, @DesktopHeight/2 -100 , 300, 300 ) $oFlash.Movie = @ScriptDir & "\Media\f_izq.swf" $oFlash.bgcolor = "ABCDEF" _WinAPI_SetLayeredWindowAttributes( $hGUI2, 0xABCDEF, 255 ) GUISetState ( @SW_SHOW, $hGUI2 ) GUISetState ( @SW_SHOW, $hGUI1 ) While 1 Switch GUIGetMsg() Case -3 $oFlash.Stop GUIDelete ( $hGUI2 ) GUIDelete ( $hGUI1 ) Exit EndSwitch WEnd AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
GoldenEye Posted March 18, 2013 Author Posted March 18, 2013 (edited) Oh Wakillon... im very grateful. It was all that i need. Thank you for your time n support, the script was excellent... :D Thank you again! Edited March 18, 2013 by GoldenEye
wakillon Posted March 18, 2013 Posted March 18, 2013 Oh Wakillon... im very grateful.It was all that i need.Thank you for your time n support, the script was excellent... :D Thank you again!Thanks and glad you like it ! AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
UEZ Posted March 18, 2013 Posted March 18, 2013 Do you have a transparent SWF file for me to test? Thanks, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
wakillon Posted March 18, 2013 Posted March 18, 2013 Do you have a transparent SWF file for me to test?Thanks,UEZHi UEZ link : transparent SWF AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
UEZ Posted March 18, 2013 Posted March 18, 2013 Merci wakillon! Br, UEZ Please don't send me any personal message and ask for support! I will not reply! Selection of finest graphical examples at Codepen.io The own fart smells best! ✌Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!¯\_(ツ)_/¯ ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ
wakillon Posted March 18, 2013 Posted March 18, 2013 (edited) Merci wakillon!Br,UEZYou're welcomeI hope it's the good one ! Edit: are you trying to create same effect with GDI ? Edited March 18, 2013 by wakillon AutoIt 3.3.14.2 X86 - SciTE 3.6.0 - WIN 8.1 X64 - Other Example Scripts
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