Jump to content
Sign in to follow this  
GoldenEye

Is it possible to get transparents swf with fullscreen GUI?

Recommended Posts

GoldenEye

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

Share this post


Link to post
Share on other sites
wakillon

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

Share this post


Link to post
Share on other sites
GoldenEye

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

Share this post


Link to post
Share on other sites
wakillon

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

Share this post


Link to post
Share on other sites
GoldenEye

Oh Wakillon... im very grateful.

It was all that i need.

Thank you for your time n support, the script was excellent... :D :D :D

Thank you again!

Edited by GoldenEye

Share this post


Link to post
Share on other sites
wakillon

Oh Wakillon... im very grateful.

It was all that i need.

Thank you for your time n support, the script was excellent... :D :D :D

Thank you again!

Thanks and glad you like it ! :)


AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

Share this post


Link to post
Share on other sites
UEZ

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!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
UEZ

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!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites
wakillon

Merci wakillon!

Br,

UEZ

You're welcome

I hope it's the good one ! o:)

Edit: are you trying to create same effect with GDI ?

Edited by wakillon

AutoIt 3.3.14.2 X86 - SciTE 3.6.0WIN 8.1 X64 - Other Example Scripts

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  

×