找回密码
 加入
搜索
查看: 1932|回复: 2

[AU3基础] 怎样拉伸flash画面大小来适应窗口大小(已解决)

[复制链接]
发表于 2012-2-25 13:26:28 | 显示全部楼层 |阅读模式
本帖最后由 fuldho 于 2012-2-25 14:49 编辑

看了sanhen大侠帖子:调用Flash的两个函数

http://www.autoitx.com/forum.php ... p;extra=&page=1

不知怎样拉伸flash画面大小来适应窗口大小

先谢谢了!
#include <GuiConstantsEx.au3>
Opt('MustDeclareVars', 1)
_Main()
Func _Main()
    Local $Flash,$FlashXml,$Bbs,$msg
    GUICreate("Flash 播放器", 570, 320)
        $Flash = _CreateSWF( @ScriptDir &'\chojimali.swf',10,10,550,300)
GUISetState()

 While 1
           $msg = GUIGetMsg()
                Switch $msg 
           Case $GUI_EVENT_CLOSE
                Exit
        EndSwitch
   WEnd
EndFunc   ;==>_Main

Func _CreateSWF($SWFPath, $SWFL, $SWFT, $SWFW, $SWFH, $SWFBGColor = "#505050")
Local $SWFObj,$SWFActiveX

    $SWFObj = ObjCreate("ShockwaveFlash.ShockwaveFlash")
    $SWFActiveX = GUICtrlCreateObj( $SWFObj, $SWFL, $SWFT, $SWFW, $SWFH)

With $SWFObj
        .Movie = $SWFPath
        .ScaleMode = 3 ;0 showall, 1 noborder, 2 exactFit, 3 noscale
        .bgcolor = $SWFBGColor
        .Loop = True
        .allowScriptAccess = "Always"
        
 EndWith
    Return $SWFObj
EndFunc
发表于 2012-2-25 14:12:38 | 显示全部楼层
GUICreate('Flash 播放器', 570, 320)
Local $Obj = ObjCreate('ShockwaveFlash.ShockwaveFlash.9')
If @error Then Exit
If Not GUICtrlCreateObj($Obj, 10, 10, 550, 300) Then Exit

GUISetState()
$Obj.Movie = @ScriptDir & '\chojimali.swf'
$Obj.Play()

While GUIGetMsg() <> -3
WEnd

GUIDelete()
Exit
 楼主| 发表于 2012-2-25 14:49:11 | 显示全部楼层
非常感谢 afan 版主!
您需要登录后才可以回帖 登录 | 加入

本版积分规则

QQ|手机版|小黑屋|AUTOIT CN ( 鲁ICP备19019924号-1 )谷歌 百度

GMT+8, 2024-9-30 21:22 , Processed in 0.078885 second(s), 24 queries .

Powered by Discuz! X3.5 Licensed

© 2001-2024 Discuz! Team.

快速回复 返回顶部 返回列表