Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
control the SWF file to full screen
#1
I want to use a button  control the SWF file to full screen, but I don't know how to write the code,  I found control the swf file to full-screen code, on Google .I hope someone can guide or help me, thanks in advance

on (release) {
 fscommand("fullscreen", "true");
}

Macro Macro1
Code:
Copy      Help
typelib ShockwaveFlashObjects {D27CDB6B-AE6D-11CF-96B8-444553540000} 1.0

str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 448 246 "Dialog"
;3 ActiveX 0x54030000 0x0 0 0 448 210 "ShockwaveFlashObjects.ShockwaveFlash {D27CDB6E-AE6D-11CF-96B8-444553540000}"
;4 Button 0x54032000 0x0 172 224 72 14 "swf  Fullscreen"
;1 Button 0x54030001 0x4 308 224 48 14 "OK"
;2 Button 0x54030000 0x4 380 224 48 14 "Cancel"
;END DIALOG
;DIALOG EDITOR: "" 0x2040700 "*" "" "" ""

if(!ShowDialog(dd &sub.DlgProc 0)) ret


#sub DlgProc
function# hDlg message wParam lParam

sel message
,case WM_INITDIALOG
,ShockwaveFlashObjects.ShockwaveFlash sh3
,sh3._getcontrol(id(3 hDlg))
,sh3.LoadMovie(0 _s.expandpath("http://fs.focusky.com.cn/jhgh/mcnh/files/extfiles/ext_2018414091740557.swf"))

,
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
,case 4 ;;fullscreen
,sh3._setevents("sub.sh3")
ret 1



#sub sh3_FSCommand
function BSTR'command BSTR'args ;;ShockwaveFlashObjects.IShockwaveFlash'sh3

code ????????
#2
How to call the Flash control function? I hope someone can provide some examples, thanks   Smile
#3
Call function, an error occurs Huh


Attached Files Image(s)
   
#4
about the error in your last screenshot.
"command" is an QM reserved variable.
In the QM editor within your subfunction "sh3_FSCommand", put the cursor on (within) "command" then press [F1].
#5
Thanks for your reminder, this command is automatically created when QM adds a message. Is it a conflict between QM and Flash functions? Is there another solution?  Huh
#6
QM can not call the full-screen function of the flash file, control it full-screen display? I hope someone can provide some solutions, thank you very much  Idea
#7
From what i can tell that file is not programed for fullscreen mode even loading in chrome there is no fullscreen option for the file.
You can get it close by doing similar to browser control full screen but that file does not appear to be fullscreen capable.  But i could be mistaken
#8
this is about as close as i can get ya to Fullscreen similar to ie fullscreen in a dialog 
again this is not complete fullscreen as the file does not have full screen programmed in it seems the dialog and the control are as large as i can make them
 f11 toggles full screen on and off

Function Dialog_Quiz
Code:
Copy      Help
typelib ShockwaveFlashObjects {D27CDB6B-AE6D-11CF-96B8-444553540000} 1.0

str dd=
;BEGIN DIALOG
;0 "" 0x90C80AC8 0x0 0 0 448 246 "Quiz" "0 10"
;3 ActiveX 0x54030000 0x0 0 0 450 246 "ShockwaveFlashObjects.ShockwaveFlash {D27CDB6E-AE6D-11CF-96B8-444553540000}" ".2 Press F11 to toggle fullscreen mode"
;END DIALOG
;DIALOG EDITOR: "" 0x2040700 "*" "" "" ""

if(!ShowDialog(dd &sub.DlgProc 0)) ret


#sub DlgProc
function# hDlg message wParam lParam
__RegisterHotKey- t_hk1
sel message
,case WM_INITDIALOG
,ShockwaveFlashObjects.ShockwaveFlash-- sh3
,sh3._getcontrol(id(3 hDlg))
,sh3.LoadMovie(0 "http://fs.focusky.com.cn/jhgh/mcnh/files/extfiles/ext_2018414091740557.swf")    
,DT_SetAutoSizeControls(hDlg "1m 2m 3s 4m")    
,t_hk1.Register(hDlg 1 0 VK_F11) ;;F11
,case WM_HOTKEY
,sel wParam
,,case 1 
,,if max(hDlg)
,,,SetWinStyle hDlg WS_CAPTION 1
,,,SetWinStyle hDlg WS_BORDER 1
,,,res hDlg
,,else
,,,SetWinStyle hDlg WS_CAPTION 2
,,,SetWinStyle hDlg WS_BORDER 2
,,,max hDlg    
,case WM_DESTROY
,case WM_COMMAND goto messages2
ret
;messages2
sel wParam
,case IDOK
,case IDCANCEL
ret 1
#9
Code:
Copy      Help
import win.ui;
/*DSG{{*/
var winform = win.form(text="Embedded FLASH control";right=511;bottom=352;parent=...)
winform.add(
btnScreen={cls="button";text="full screen";left=403;top=314;right=491;bottom=341;db=1;dr=1;z=2};
flashBox={cls="custom";left=17;top=15;right=486;bottom=302;db=1;dl=1;dr=1;dt=1;edge=1;z=1}
)
/*}}*/

import com.flash; 
var flash = com.flash( winform.flashBox ); 

flash.movie = "http://fs.focusky.com.cn/jhgh/mcnh/files/extfiles/ext_2018414091740557.swf"
flash.play()
winform.show(true) 
winform.flashBox.fullscreen(true);
win.loopMessage();
In a programming language, I saw the code to control swf full-screen display, the code is very concise, I hope the developers guide me, in QM,  use a similar approach.   Thanks in advance, any suggestions and comments are welcome Idea

if QM has a function  controlled all controls toggleFullscreen. It would be great


Forum Jump:


Users browsing this thread: 3 Guest(s)