Jump to content

This site uses cookies. By continuing to browse the site you are agreeing to our use of cookies. Find out more here. X
X


Photo

Flash and AutoIt...


  • Please log in to reply
16 replies to this topic

#1 gsb

gsb

    Adventurer

  • Active Members
  • PipPip
  • 146 posts

Posted 24 June 2007 - 04:26 AM

Flash and AutoIt... ...an example along a continuing saga.

I saw a thread and decided to make a similar example. The original thread: http://www.autoitscript.com/forum/index.php?showtopic=48155

Is nice as this is an AutoIt forum and a totally AutoIt solution is good. But here we use many other system and 3rd party dll's and the like to accomplish a desired task. Me, I have centered on Flash content: as a stand alone and as a GUI to/through AutoIt.

So, I made a clock face (actually, I used an existing clock face modified for this example) in flash to display as a stand alone application on the desktop (verses a browser window.) Transparent but clickable - context menu and dragable. It is a fullscreen GUI with one control, an IE embed. The HTML embeds a specially made Flash movie (.swf) file. This swf connects to the AutoIt via IE events, initializes and then loads a 'target' movie, ...in this case the clock face. The AutoIt script, HTML and initial swf orchestrate a desktop control environment for the target movie to run and comunicate to the hosting computer.

This is a step in my working towards a Flash/AutoIt integration and seems to work just fine for now, thanks to many here especially lod3n.

Here is a sample code where the HTML, swf and target movie (clock face) are grabbed from my site via a InetGet:

Plain Text         
#include <GUIConstants.au3> #include <IE.au3> #include <Misc.au3> ; ...setup Initializations Opt("TrayIconHide", 1) _IEErrorHandlerRegister() Dim $guiWinTitle = "swfSMexe" Dim $Version = "v070623a" Dim $AboutText = $guiWinTitle & "  " & $Version & "   " & @LF & "by gsb" & @LF ; ...setup hotkeys HotKeySet("^+v", "_ToggleVisibility") HotKeySet("{ESC}", "_Exit") ; ...setup files Local $htmlFilename = @ScriptDir & "\swfSMexe.htm" Local $swfFilename = @ScriptDir & "\swfSMexe.swf" Local $swfTarget = @ScriptDir & "\TransparentClock.swf" Local $imageFile = @ScriptDir & "\required.gif" InetGet("http://www.GypsyTrader.com/SWiSHmax/au3Examples/swfSMexe.htm",$htmlFilename) InetGet("http://www.GypsyTrader.com/SWiSHmax/au3Examples/swfSMexe.swf",$swfFilename) InetGet("http://www.GypsyTrader.com/SWiSHmax/au3Examples/TransparentClock.swf",$swfTarget) InetGet("http://www.GypsyTrader.com/SWiSHmax/au3Examples/required.gif",$imageFile) ;; ...size params Local $height = @DesktopHeight + 4 Local $width = @DesktopWidth + 4 ; ...Core GUI code Local $mainGUI = GUICreate($guiWinTitle, $width, $height, -2, -2, $WS_POPUP, $WS_EX_LAYERED + $WS_EX_TOPMOST) GUISetBkColor(0xFFFFFF) Local $ieOBJ = _IECreateEmbedded() Local $ieCTL = GUICtrlCreateObj($ieOBJ, 0, 0, $width, $height) GUICtrlSetResizing($ieCTL, $GUI_DOCKBORDERS) GUICtrlCreatePic($imageFile, 0, 0, 1, 1, -1) _IENavigate($ieOBJ, $htmlFilename) Sleep(10);; needed for old sytems and slow machines Local $oTarget = $ieOBJ.document.parentwindow.document.documentElement $oTarget.setAttribute ("gsb", "") Local $stageManager, $handler = ObjEvent($oTarget, "IeEvent_") GUISetState(@SW_SHOW) ; ...setup runtime variables Local $isVisible = 1 ; ...main movie interface loop While 1     Switch GUIGetMsg()         Case $GUI_EVENT_CLOSE             _Exit()     EndSwitch WEnd _Exit();; unreachable ;;----------------- fsCommand receiver Func IeEvent_onpropertychange()     Local $oElement = @COM_EventObj     If IsObj($oElement.gsb) Then         If $oElement.gsb.cmd = "initialize" Then             $stageManager = $oElement.gsb.obj             $stageManager.SetVariable ("/:au3Init", $oElement.gsb.args)             $stageManager.gsbTrace("au3Init: "&$oElement.gsb.args)         Else             _fsCommand($oElement.gsb.cmd, $oElement.gsb.args)         EndIf         $oElement.gsb = ""     EndIf EndFunc ;==>IeEvent_onpropertychange ;;----------------- fsCommand processor Func _fsCommand($cmd, $args)     Select         Case $cmd = "_About"             _About($args)         Case $cmd = "quit"             _Exit()         Case $cmd = "_ToggleVisibility"             _ToggleVisibility()         Case $cmd = "_Alert"             _Alert($args)         Case Else             $stageManager.gsbTrace ("Unknown cmd: " & $cmd & " Args: [" & $args & "]")     EndSelect EndFunc ;==>_fsCommand ;;----------------- Functions Func _ToggleVisibility()     If Not $isVisible Then         GUISetState(@SW_SHOW)         $isVisible = 1     Else         GUISetState(@SW_HIDE)         $isVisible = 0     EndIf EndFunc ;==>_ToggleVisibility Func _Trace($str)     $stageManager.gsbTrace ($str) EndFunc ;==>_Trace Func _About($str = "")     MsgBox(266288, "About", _Iif($str = "", $AboutText, "swf: "&$str & @LF & "exe: "&$AboutText), 10); modal, top, info EndFunc ;==>_About Func _Alert($str)     MsgBox(266288, "Alert", $str, 10); modal, top, info EndFunc ;==>_Alert Func _Exit()     Exit EndFunc ;==>_Exit

Well, just thought I'd post an example tonight. Let me know your thoughts.

Regards,


gsb

***EDIT: 070624a
This example requires the "Adobe Flash Player" plug-in, v8 or better for IE.
If you do not have it, the script fails silently. To get it: Flash Player Download Center

As an add-in, how would I add to the script a check to see if the target machine has the Flash Player plugin for IE?
I know I could do it in Javascript from within the browser, but anyway, say via AutoIt searching the registry?

Edited by gsb, 24 June 2007 - 02:34 PM.

"Did you ever stop to think? ...and forget to restart!"







#2 smashly

smashly

  • Active Members
  • PipPipPipPipPipPip
  • 1,636 posts

Posted 24 June 2007 - 06:18 AM

Hi,
Doesn't work for me ,
I get no errors when I run your script.
I get a minimized toolbar window and it sits dormant with nothing else on the screen till I hit escape.

Am I missing something or is my patience to short , I left it active for over five minutes.
Tried the hotkey for visibility but nothing happens.

Cheers

#3 RazerM

RazerM

    cowinkeedenky - coincidence?

  • Active Members
  • PipPipPipPipPipPip
  • 1,246 posts

Posted 24 June 2007 - 09:56 AM

A file needs to be downloaded.

This is a really nice example! Good clock too :rolleyes:
My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.

#4 martin

martin

    ~~\o/~~~/0\=¬''~~~

  • MVPs
  • 7,321 posts

Posted 24 June 2007 - 01:23 PM

A file needs to be downloaded.

This is a really nice example! Good clock too :rolleyes:



ok, but what file?
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

#5 RazerM

RazerM

    cowinkeedenky - coincidence?

  • Active Members
  • PipPipPipPipPipPip
  • 1,246 posts

Posted 24 June 2007 - 01:36 PM

Did you even look at the source?
The flash files etc.
My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.

#6 gsb

gsb

    Adventurer

  • Active Members
  • PipPip
  • 146 posts

Posted 24 June 2007 - 01:55 PM

Thanks RazerM.

But smashly, it should dl the files for you.
And I does require the Flash Player Plugin for IE to be on your machine. It is simply a transparent flash movie, swf.

You too had trouble martin? Argh....


gsb
"Did you ever stop to think? ...and forget to restart!"

#7 martin

martin

    ~~\o/~~~/0\=¬''~~~

  • MVPs
  • 7,321 posts

Posted 24 June 2007 - 02:12 PM

Did you even look at the source?
The flash files etc.



Don't be like that! Maybe you should have considered that I would have? Is that why you're RazorM, because you like to cut people up? The InetGets get those files, so when you said A file is needed then I asked because it didn't work for me.

@gsb: I don't use IE so I've now installed the Flash plugin and it works. It's beautiful!
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

#8 gsb

gsb

    Adventurer

  • Active Members
  • PipPip
  • 146 posts

Posted 24 June 2007 - 02:24 PM

Thanks martin.
I will add that as a prerequisite to my original post.

But an AutoIt'er that does not use IE... Isn't that an oxymoron?
( I am new here and that is meant to be funny. :rolleyes: )
So much of AutoIt seems designed for IE automation and not other browsers.


As an add-in, how would I add to the script a check to see if the target machine has the Flash Player plugin for IE?
I know I could do it in Javascript from within the browser, but anyway, say via AutoIt searching the registry?


gsb
"Did you ever stop to think? ...and forget to restart!"

#9 martin

martin

    ~~\o/~~~/0\=¬''~~~

  • MVPs
  • 7,321 posts

Posted 24 June 2007 - 03:02 PM

Thanks martin.
I will add that as a prerequisite to my original post.

But an AutoIt'er that does not use IE... Isn't that an oxymoron?
( I am new here and that is meant to be funny. :rolleyes: )
So much of AutoIt seems designed for IE automation and not other browsers.
As an add-in, how would I add to the script a check to see if the target machine has the Flash Player plugin for IE?
I know I could do it in Javascript from within the browser, but anyway, say via AutoIt searching the registry?
gsb


I use Firefox!

When I installed the Flash plugin for IE the files were installed in
D:\WINDOWS\system32\Macromed\Flash, and there is a registry entry in


- you need to add '59B32}' after the '...8E' as the name was clipped.

and these are the keys I've got in the registry



Maybe this helps.
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

#10 RazerM

RazerM

    cowinkeedenky - coincidence?

  • Active Members
  • PipPipPipPipPipPip
  • 1,246 posts

Posted 24 June 2007 - 03:03 PM

I understand there's no tone in writing but I only asked if you had looked at the source. My wording may have been unclear when I said a file needs to be downloaded, I was replying to smashly. I apologise.
My Programs:AInstall - Create a standalone installer for your programUnit Converter - Converts Length, Area, Volume, Weight, Temperature and Pressure to different unitsBinary Clock - Hours, minutes and seconds have 10 columns each to display timeAutoIt Editor - Code Editor with Syntax Highlighting.Laserix Editor & Player - Create, Edit and Play Laserix LevelsLyric Syncer - Create and use Synchronised Lyrics.Connect 4 - 2 Player Connect 4 Game (Local or Online!, Formatted Chat!!)MD5, SHA-1, SHA-256, Tiger and Whirlpool Hash Finder - Dictionary and Brute Force FindCool Text Client - Create Rendered ImageMy UDF's:GUI Enhance - Enhance your GUIs visually.IDEA File Encryption - Encrypt and decrypt files easily! File Rename - Rename files easilyRC4 Text Encryption - Encrypt text using the RC4 AlgorithmPrime Number - Check if a number is primeString Remove - remove lots of strings at onceProgress Bar - made easySound UDF - Play, Pause, Resume, Seek and Stop.

#11 martin

martin

    ~~\o/~~~/0\=¬''~~~

  • MVPs
  • 7,321 posts

Posted 24 June 2007 - 03:05 PM

I understand there's no tone in writing but I only asked if you had looked at the source. My wording may have been unclear when I said a file needs to be downloaded, I was replying to smashly. I apologise.


OK, all forgiven. I'm too easily irritated, but it's easy to make me smile as well :rolleyes: Glad you replied.
Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.

#12 Astormooke

Astormooke

    Seeker

  • Active Members
  • 48 posts

Posted 03 July 2007 - 04:26 AM

due that had to be one of the most amazing clocks I have ver seen that was awesome....

#13 gsb

gsb

    Adventurer

  • Active Members
  • PipPip
  • 146 posts

Posted 03 July 2007 - 05:02 AM

Thank you.

But clock is just the tip of what can be done.


gsb
"Did you ever stop to think? ...and forget to restart!"

#14 mesale0077

mesale0077

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 478 posts

Posted 27 February 2012 - 04:00 PM

hi
InetGet("http://www.GypsyTrader.com/SWiSHmax/au3Examples/swfSMexe.htm",$htmlFilename)
InetGet("http://www.GypsyTrader.com/SWiSHmax/au3Examples/swfSMexe.swf",$swfFilename)
InetGet("http://www.GypsyTrader.com/SWiSHmax/au3Examples/TransparentClock.swf",$swfTarget)
InetGet("http://www.GypsyTrader.com/SWiSHmax/au3Examples/required.gif",$imageFile)

dont work
again please

#15 Melba23

Melba23

    I'm old - what's your excuse?

  • Moderators
  • 21,816 posts

Posted 27 February 2012 - 04:06 PM

mesale0077,

Do you think someone who has not been active here for over 3 years is going to read that and update links from even longer ago? :oops:

Please use your brain a bit before posting. :bye:

M23
StringSize - Automatically size controls to fit text                                                               ExtMsgBox - A user customisable replacement for MsgBox
Toast - Small GUIs which pop out of the Systray                                                                Marquee - Scrolling tickertape GUIs
Scrollbars - Automatically sized scrollbars with a single command                                   GUIFrame - Subdivide GUIs into many adjustable frames
GUIExtender - Extend and retract multiple sections within a GUI                                      NoFocusLines - Remove the dotted focus lines from buttons, sliders, radios and checkboxes
ChooseFileFolder - Single and multiple selections from specified path tree structure      Notify - Small notifications on the edge of the display
Date_Time_Convert - Easily convert date/time formats, including the language               GUIListViewEx - Insert, delete, move, drag, sort and edit ListView items

#16 mesale0077

mesale0077

    Universalist

  • Active Members
  • PipPipPipPipPipPip
  • 478 posts

Posted 27 February 2012 - 06:28 PM

ı know
but
html code
<html>
<body>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/
cabs/flash/swflash.cab#version=6,0,40,0"
width="468" height="400" id="mymoviename">
<param name="movie"
value="application.swf" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="application.swf" quality="high" bgcolor="#ffffff"
width="468" height="400"
name="mymoviename" align="" type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer">
</embed>
</object>
</body>
</html>
Func flashy_FSCommand($cmd,$args)
msgbox(0,"FSCommand","au3 Command: "&$cmd & @crlf & "Args:" & $args)
EndFunc


ı want not ObjCreate("ShockwaveFlash.ShockwaveFlash.1")


like this

Plain Text         
; #include <GUIConstantsEx.au3> #include <WindowsConstants.au3> #include <IE.au3> #include <GuiConstants.au3> #include <WindowsConstants.au3> #include <ButtonConstants.au3> #include <StaticConstants.au3> #include <WinAPI.au3> #include <GUIConstantsEx.au3> #include <EditConstants.au3> HotKeySet("{ESC}", "Terminate") _IEErrorHandlerRegister () $oIE = _IECreateEmbedded () $Form1 = GUICreate("Embedded flash control Test", 540, 510,-1, -1, $WS_POPUP, BitOR($WS_EX_LAYERED, $WS_EX_TOPMOST)) GUISetBkColor(345) _WinAPI_SetLayeredWindowAttributes($Form1, 345, 255) $GUIActiveX = GUICtrlCreateObj($oIE,-240,-20,  1024, 1024) $swfObjEvents = ObjEvent($oIE,"_fscommand") ;dont work GUISetState()     ;Show GUI _IENavigate($oIE, @ScriptDir&"\a3d.html"); ; Waiting for user to close the window While 1     $msg = GUIGetMsg()     Select         Case $msg = $GUI_EVENT_CLOSE             ExitLoop         EndSelect WEnd GUIDelete() Exit Func Terminate()     Exit 0 EndFunc    Func _fscommand($type,$command,$arguments) if $type = "fscommand" then Switch $command Case  "button2" exit Case  "button1" msgbox(0,"info","hello word") EndSwitch endif endfunc

or html code
a3d.html
<script type="text/javascript" >
var RightClick = {
init: function () {
this.FlashObjectID = "customRightClick";
this.FlashContainerID = "flashcontent";
this.Cache = this.FlashObjectID;
if(window.addEventListener){
window.addEventListener("mousedown", this.onGeckoMouse(), true);
} else {
document.getElementById(this.FlashContainerID).onmouseup = function() { document.getElementById(RightClick.FlashContainerID).releaseCapture(); }
document.oncontextmenu = function(){ if(window.event.srcElement.id == RightClick.FlashObjectID) { return false; } else { RightClick.Cache = "nan"; }}
document.getElementById(this.FlashContainerID).onmousedown = RightClick.onIEMouse;
}
},
UnInit: function () {

if(window.RemoveEventListener){
alert('Un init is called for GECKO' );
window.addEventListener("mousedown", null, true);
window.RemoveEventListener("mousedown",this.onGeckoMouse(),true);

} else {

document.getElementById(this.FlashContainerID).onmouseup = "" ;
document.oncontextmenu = "";
document.getElementById(this.FlashContainerID).onmousedown = "";
}
},

killEvents: function(eventObject) {
if(eventObject) {
if (eventObject.stopPropagation) eventObject.stopPropagation();
if (eventObject.preventDefault) eventObject.preventDefault();
if (eventObject.preventCapture) eventObject.preventCapture();
if (eventObject.preventBubble) eventObject.preventBubble();
}
},
onGeckoMouse: function(ev) {
return function(ev) {
if (ev.button != 0) {
RightClick.killEvents(ev);
if(ev.target.id == RightClick.FlashObjectID && RightClick.Cache == RightClick.FlashObjectID) {
RightClick.call();
}
RightClick.Cache = ev.target.id;
}
}
},
onIEMouse: function() {
if (event.button > 1) {
if(window.event.srcElement.id == RightClick.FlashObjectID && RightClick.Cache == RightClick.FlashObjectID) {
RightClick.call();
}
document.getElementById(RightClick.FlashContainerID).setCapture();
if(window.event.srcElement.id)
RightClick.Cache = window.event.srcElement.id;
}
},
call: function() {
document.getElementById(this.FlashObjectID).rightClick();
}
}

if(typeof deconcept=="undefined"){var deconcept=new Object();}if(typeof deconcept.util=="undefined"){deconcept.util=new Object();}if(typeof deconcept.SWFObjectUtil=="undefined"){deconcept.SWFObjectUtil=new Object();}deconcept.SWFObject=function(_1,id,w,h,_5,c,_7,_8,_9,_a){if(!document.getElementById){return;}this.DETECT_KEY=_a?_a:"detectflash";this.skipDetect=deconcept.util.getRequestParameter(this.DETECT_KEY);this.params=new Object();this.variables=new Object();this.attributes=new Array();if(_1){this.setAttribute("swf",_1);}if(id){this.setAttribute("id",id);}if(w){this.setAttribute("width",w);}if(h){this.setAttribute("height",h);}if(_5){this.setAttribute("version",new deconcept.PlayerVersion(_5.toString().split(".")));}this.installedVer=deconcept.SWFObjectUtil.getPlayerVersion();if(!window.opera&&document.all&&this.installedVer.major>7){deconcept.SWFObject.doPrepUnload=true;}if©{this.addParam("bgcolor",c);}var q=_7?_7:"high";this.addParam("quality",q);this.setAttribute("useExpressInstall",false);this.setAttribute("doExpressInstall",false);var _c=(_8)?_8:window.location;this.setAttribute("xiRedirectUrl",_c);this.setAttribute("redirectUrl","");if(_9){this.setAttribute("redirectUrl",_9);}};deconcept.SWFObject.prototype={useExpressInstall:function(_d){this.xiSWFPath=!_d?"expressinstall.swf":_d;this.setAttribute("useExpressInstall",true);},setAttribute:function(_e,_f){this.attributes[_e]=_f;},getAttribute:function(_10){return this.attributes[_10];},addParam:function(_11,_12){this.params[_11]=_12;},getParams:function(){return this.params;},addVariable:function(_13,_14){this.variables[_13]=_14;},getVariable:function(_15){return this.variables[_15];},getVariables:function(){return this.variables;},getVariablePairs:function(){var _16=new Array();var key;var _18=this.getVariables();for(key in _18){_16[_16.length]=key+"="+_18[key];}return _16;},getSWFHTML:function(){var _19="";if(navigator.plugins&&navigator.mimeTypes&&navigator.mimeTypes.length){if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","PlugIn");this.setAttribute("swf",this.xiSWFPath);}_19="<embed type=\"application/x-shockwave-flash\" src=\""+this.getAttribute("swf")+"\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\"";_19+=" id=\""+this.getAttribute("id")+"\" name=\""+this.getAttribute("id")+"\" ";var _1a=this.getParams();for(var key in _1a){_19+=[key]+"=\""+_1a[key]+"\" ";}var _1c=this.getVariablePairs().join("&");if(_1c.length>0){_19+="flashvars=\""+_1c+"\"";}_19+="/>";}else{if(this.getAttribute("doExpressInstall")){this.addVariable("MMplayerType","ActiveX");this.setAttribute("swf",this.xiSWFPath);}_19="<object id=\""+this.getAttribute("id")+"\" classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" width=\""+this.getAttribute("width")+"\" height=\""+this.getAttribute("height")+"\" style=\""+this.getAttribute("style")+"\">";_19+="<param name=\"movie\" value=\""+this.getAttribute("swf")+"\" />";var _1d=this.getParams();for(var key in _1d){_19+="<param name=\""+key+"\" value=\""+_1d[key]+"\" />";}var _1f=this.getVariablePairs().join("&");if(_1f.length>0){_19+="<param name=\"flashvars\" value=\""+_1f+"\" />";}_19+="</object>";}return _19;},write:function(_20){if(this.getAttribute("useExpressInstall")){var _21=new deconcept.PlayerVersion([6,0,65]);if(this.installedVer.versionIsValid(_21)&&!this.installedVer.versionIsValid(this.getAttribute("version"))){this.setAttribute("doExpressInstall",true);this.addVariable("MMredirectURL",escape(this.getAttribute("xiRedirectUrl")));document.title=document.title.slice(0,47)+" - Flash Player Installation";this.addVariable("MMdoctitle",document.title);}}if(this.skipDetect||this.getAttribute("doExpressInstall")||this.installedVer.versionIsValid(this.getAttribute("version"))){var n=(typeof _20=="string")?document.getElementById(_20):_20;n.innerHTML=this.getSWFHTML();return true;}else{if(this.getAttribute("redirectUrl")!=""){document.location.replace(this.getAttribute("redirectUrl"));}}return false;}};deconcept.SWFObjectUtil.getPlayerVersion=function(){var _23=new deconcept.PlayerVersion([0,0,0]);if(navigator.plugins&&navigator.mimeTypes.length){var x=navigator.plugins["Shockwave Flash"];if(x&&x.description){_23=new deconcept.PlayerVersion(x.description.replace(/([a-zA-Z]|\s)+/,"").replace(/(\s+r|\s+b[0-9]+)/,".").split("."));}}else{if(navigator.userAgent&&navigator.userAgent.indexOf("Windows CE")>=0){var axo=1;var _26=3;while(axo){try{_26++;axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash."+_26);_23=new deconcept.PlayerVersion([_26,0,0]);}catch(e){axo=null;}}}else{try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");}catch(e){try{var axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");_23=new deconcept.PlayerVersion([6,0,21]);axo.AllowScriptAccess="always";}catch(e){if(_23.major==6){return _23;}}try{axo=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");}catch(e){}}if(axo!=null){_23=new deconcept.PlayerVersion(axo.GetVariable("$version").split(" ")[1].split(","));}}}return _23;};deconcept.PlayerVersion=function(_29){this.major=_29[0]!=null?parseInt(_29[0]):0;this.minor=_29[1]!=null?parseInt(_29[1]):0;this.rev=_29[2]!=null?parseInt(_29[2]):0;};deconcept.PlayerVersion.prototype.versionIsValid=function(fv){if(this.major<fv.major){return false;}if(this.major>fv.major){return true;}if(this.minor<fv.minor){return false;}if(this.minor>fv.minor){return true;}if(this.rev<fv.rev){return false;}return true;};deconcept.util={getRequestParameter:function(_2b){var q=document.location.search||document.location.hash;if(_2b==null){return q;}if(q){var _2d=q.substring(1).split("&");for(var i=0;i<_2d.length;i++){if(_2d[i].substring(0,_2d[i].indexOf("="))==_2b){return _2d[i].substring((_2d[i].indexOf("=")+1));}}}return "";}};deconcept.SWFObjectUtil.cleanupSWFs=function(){var _2f=document.getElementsByTagName("OBJECT");for(var i=_2f.length-1;i>=0;i--){_2f[i].style.display="none";for(var x in _2f[i]){if(typeof _2f[i][x]=="function"){_2f[i][x]=function(){};}}}};if(deconcept.SWFObject.doPrepUnload){if(!deconcept.unloadSet){deconcept.SWFObjectUtil.prepUnload=function(){__flash_unloadHandler=function(){};__flash_savedUnloadHandler=function(){};window.attachEvent("onunload",deconcept.SWFObjectUtil.cleanupSWFs);};window.attachEvent("onbeforeunload",deconcept.SWFObjectUtil.prepUnload);deconcept.unloadSet=true;}}if(!document.getElementById&&document.all){document.getElementById=function(id){return document.all[id];};}var getQueryParamValue=deconcept.util.getRequestParameter;var FlashObject=deconcept.SWFObject;var SWFObject=deconcept.SWFObject
</script>
<style type="text/css">
<!--
body {
background-color: #000000;
}
-->
</style><body scroll="no" oncontextmenu="return false;" onload="RightClick.init();">
<div id="flashcontent"></div>
<script type="text/javascript">
var so = new SWFObject("application.swf", "customRightClick", "900", "900", "9", "#CCCCCC");
so.addParam("quality", "high");
so.addParam("name", "customRightClick");
so.addParam("id", "customRightClick");
so.addParam("AllowScriptAccess", "always");
so.addParam("wmode", "opaque");
so.addParam("wmode", "transparent");
so.addParam("menu", "false");
so.addVariable("variable1", "value1");
so.write("flashcontent");


</script>
</body>



help me

Attached Files


Edited by mesale0077, 27 February 2012 - 06:55 PM.


#17 ValeryVal

ValeryVal

    Dig the way

  • Active Members
  • PipPipPipPipPipPip
  • 463 posts

Posted 29 February 2012 - 07:23 AM

@mesale0077:

It's easy. You can use this Application.au3:
Plain Text         
$GUI = GUICreate("Application, 2012", 670, 470, -1, -1) $oGame = ObjCreate("ShockwaveFlash.ShockwaveFlash") $oGameGUI = GUICtrlCreateObj($oGame, 10, 10, 650, 450) $SinkObject=ObjEvent($oGame,"Game_","_IShockwaveFlashEvents") With $oGame     .bgcolor = "#000000"     .Movie = @ScriptDir & "Application.swf"     .Loop = True     .ScaleMode = 2     .wmode = "Opaque" EndWith GUISetState() While 1     $nMsg = GUIGetMsg()     Select     Case $nMsg = -3         Exit     EndSelect WEnd func Game_OnReadyStateChange($newState) endfunc func Game_OnProgress($percentDone) endfunc func Game_FSCommand($command, $args)   Switch $command   Case  "button2"    exit   Case  "button1"     msgbox(0,"info","hello word")   EndSwitch endfunc func Game_FlashCall($request) endfunc


I've just used Flash Player ver. 11 with your application.swf
:oops:
The point of world view




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users