Jump to content

Flashy


lod3n
 Share

Recommended Posts

I know it's been done before, but what the heck:

#include <GUIConstants.au3>
#include <ie.au3>
#include <array.au3>

$flashfile = _ArrayToString($cmdline," ",1)

$gui = GUICreate("Flashy"&$flashfile, 640, 480, -1, -1, BitOR($WS_MINIMIZEBOX,$WS_MAXIMIZEBOX,$WS_SIZEBOX,$WS_THICKFRAME,$WS_SYSMENU,$WS_CAPTION,$WS_POPUPWINDOW,$WS_GROUP,$WS_BORDER,$WS_CLIPSIBLINGS),$WS_EX_ACCEPTFILES)
$oIE = _IECreateEmbedded ( )
$browser = GUICtrlCreateObj($oIE, 3, 3, 634, 474)
GUICtrlSetState (-1, $GUI_DROPACCEPTED)
GUICtrlSetResizing(-1,$GUI_DOCKBORDERS)


_IENavigate ($oIE, 'about:blank')
$oDoc = _IEDocGetObj ($oIE)
$oDoc.body.style.overflow = "auto"
GUISetState(@SW_SHOW)

$sHTML = '<embed id=flashy src="" '
$sHTML &= 'quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" '
$sHTML &= 'type="application/x-shockwave-flash" '
$sHTML &= 'width="100%" height="100%"></embed>'
_IEBodyWriteHTML ($oIE, $sHTML)

loadswf($flashfile)

While 1
    $Msg = GUIGetMsg()
    Select
        Case $msg = $GUI_EVENT_CLOSE
            Exit
        case $msg = $GUI_EVENT_DROPPED
            loadswf(@GUI_DRAGFILE)
    EndSelect
WEnd


func loadswf($filename)
    if stringlen($filename) = 0 then 
        msgbox(16,"Flashy","No flash file specified. Associate SWFs with Flashy, or drop one onto the blank window")
        Return
    EndIf
    if stringright($filename,4) <> ".swf" then 
        msgbox(16,"Flashy - Error","Dude, that's not a SWF.")
        Return
    EndIf
    $flash = _IEGetObjByName ($oIE, "flashy")
    $flash.Movie = $filename
    winsettitle($gui,"","Flashy - "&$filename)
EndFunc

[font="Fixedsys"][list][*]All of my AutoIt Example Scripts[*]http://saneasylum.com[/list][/font]

Link to comment
Share on other sites

  • 1 month later...

lod3n,

Hi and thanks for this and other great examples.

But I am having some trouble trying to combine this technique wit another of your examples to allow the flash content access fscommands.

I posted it as a new thread in support and thought I might persuade you to take a look and point me in the right direction.

Thanks again, and here is that thread.

gsb

"Did you ever stop to think? ...and forget to restart!"
Link to comment
Share on other sites

  • 10 months later...

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