Jump to content

Is it possible to get transparents swf with fullscreen GUI?


 Share

Recommended Posts

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 by GoldenEye
Link to comment
Share on other sites

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.0WIN 8.1 X64 - Other Example Scripts

Link to comment
Share on other sites

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 by GoldenEye
Link to comment
Share on other sites

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 ! :king:

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.0WIN 8.1 X64 - Other Example Scripts

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...