话说给那位Qzoo的东西,有兴趣可以玩玩~~欢迎转载~
虚幻勇士吧
全部回复
仅看楼主
level 6
效果还不错,只提供一个思路,还可以自行添加其它角色的过场~http://www.codelyoko.cn/bbs/thread-1579-1-1.html
2007年09月17日 14点09分 1
level 6
话说Qzoo没有时间
2007年09月19日 13点09分 2
level 6
话说虎头蛇尾吗?
2007年09月21日 11点09分 3
level 6
ls是来干嘛的?
2007年09月22日 05点09分 5
level 6
MS没有办法改了,插件都装完了
2007年09月23日 06点09分 6
level 6
公共事件里面写一个就可以了,这又不是写在脚本里面的用的时候在普通事件里面插入公共事件,执行后就会实现这个过场效果~写游戏就像写作文,好作文是改出来的,游戏亦是如此仅提供思路
2007年09月23日 07点09分 7
level 6
写了,我现在只需要能够在窗口里面播放视频的脚本,因为要锁定圆塔,在2里面还要输入密码 Power拯救霍兰
2007年09月23日 08点09分 8
level 6
我到有一个播放AVI的脚本,是高手写的,不过我觉得并不好用~所以才把播放短时间的视频改成播放图片来实现,以下是脚本内容,分个部分写
2007年09月23日 09点09分 9
level 6
# 建立窗体#
ExStyle,ClassName,WindowName,
# style,x,y,width,height#
0,0,hInstance,0$MP_CreateWindowEX = Win32API.new('user32','CreateWindowEx','%w(l,p,p,l,l,l,l,l,l,l,l,p)','L')#==============================================================================# ■ MoviePlayer#------------------------------------------------------------------------------#  处理视频播放画面的类。#==============================================================================class MoviePlayer #--------------------------------------------------------------------------
# ● 初始化 #
project_name : 工程名称 #-------------------------------------------------------------------------- def initialize(project_name = PROJECT_NAME) @sys_timer=SystemTimer.new() buffer = "\0\0" * project_name.size @project_name = "\0" * project_name.size $MP_m2w.call(CP_UTF8, 0, project_name, -1, buffer, project_name.size) $MP_w2m.call(CP_ACP,0,buffer,-1,@project_name,project_name.size,0,0) @hWnd = $MP_FindWindowEX.call(0,0,nil,@project_name) @hInt = $MP_GetWindowLong.call(@hWnd,GWL_HINSTANCE) @class_name = " " * 256 $MP_GetClassName.call(@hWnd,@class_name,256) end #--------------------------------------------------------------------------
# ● 是否已经全屏幕 #
-------------------------------------------------------------------------- def is_full? # 播放起始坐标 point = [0, 0].pack('ll') if $MP_ClientToScreen.call(@hWnd, point) == 0 return false end x, y = point.unpack('ll') if x == 0 and y == 0 return true else return false end end #--------------------------------------------------------------------------
# ● 切换全屏 #
-------------------------------------------------------------------------- def switch_full $keybd = Win32API.new 'user32.dll', 'keybd_event', ['i', 'i', 'l', 'l'], 'v' $MP_keybd.call (0xA4, 0, 0, 0) $MP_keybd.call (13, 0, 0, 0) $MP_keybd.call (13, 0, 2, 0) $MP_keybd.call (0xA4, 0, 2, 0) Graphics.update sleep(SWITCH_DELAY) Graphics.update end #-------------------------------------------------------------------------- # ● 播放电影
# movie_name : 视频文件名(*.avi) #
movie_length : 电影时间,单位是秒
# skip : 是否可以按键跳过 #
fullscr : 是否强制为全屏幕播放 # x,y,width,height: 播放的位置以及宽度 # loop : 循环播放 #-------------------------------------------------------------------------- def play(movie_name,movie_length, skip = true,fullscr = false, x = 0,y = 0,width = 640,height = 480,loop = false) # 数据不合法则退出 return true if movie_name == nil or movie_length <= 0 # 文件不存在 movie_name = Dir.getwd()+"\\"+movie_name return true unless FileTest.exist?(movie_name) # 窗口宽度(限制640*480) #width -= (x + width)- 640 if (x + width) > 640 #height -= (y + height)- 480 if (y + height) > 480 if fullscr and !is_full? self.switch_full end fullscr = self.is_full? # 播放起始坐标 point = [x, y].pack('ll') if $MP_ClientToScreen.call(@hWnd, point) == 0 return true end x, y = point.unpack('ll') return true if (x + width) < 0 or (y+height) < 0 if fullscr wnd = $MP_CreateWindowEX.call(WS_EX_TOPMOST,@class_name,@project_name, WS_VISIBLE | WS_POPUP,x,y,width,height, 0,0,@hInt,0) else wnd = $MP_CreateWindowEX.call(WS_EX_TOOLWINDOW,@class_name,@project_name, WS_VISIBLE | WS_POPUP,x,y,width,height, 0,0,@hInt,0) end # 窗体建立失败 return true if wnd == 0 # 屏蔽原窗体 $MP_EnableWindow.call(@hWnd,0) $MP_mciSendString.call("open \"" + movie_name + "\"" + " alias FILE style 1073741824 parent " +\ wnd.to_s,0,0,0) if loop $MP_mciSendString.call("play FILE repeat window",0,0,0) else $MP_mciSendString.call("play FILE window",0,0,0) end @sys_timer.clear() step = 0.1 begin loop do # 如果在窗口模式 unless fullscr # 变成全屏 if self.is_full? break else Graphics.update end end #sleep(step) if skip Input.update break if Input.trigger?(Input::A) end if @sys_timer.now_s >= movie_length break end if $MP_GetActiveWindow.call() != wnd $MP_SetActiveWindow.call(wnd) end end rescue Hangup retry end # 关闭当前窗体 $MP_PostMessage.call(wnd,WM_CLOSE,0,0) $MP_mciSendString.call("close FILE",0,0,0) $MP_EnableWindow.call(@hWnd,1) $MP_SetActiveWindow.call(@hWnd) return true endend$MP = MoviePlayer.new
2007年09月23日 09点09分 12
level 6
汗如雨下————脚本‘aviplayer’的 201 行 发生了 syntaxERROR。
2007年09月23日 10点09分 13
level 6
再次汗如雨下————脚本‘AVI’ 的 99 行 发生了 syntaxERROR。
2007年09月23日 10点09分 14
level 6
检查你复制的有没有问题,除非你复制错误,否则没有问题我这里使用正常~
2007年09月24日 13点09分 15
level 6
你去我论坛发一个演示文件,或者是6RPG上的,我研究一下,真的有问题
2007年09月30日 22点09分 16
level 6
不可能,夏之纳小姐天天去光顾
2007年10月01日 03点10分 18
level 6
黄上次也去了
2007年10月01日 03点10分 19
level 6
你刷新一下
2007年10月01日 03点10分 20
level 6
那就是你个人信息那里的链接有问题~不知道你的论坛地址是啥
2007年10月01日 04点10分 21
level 6
……服你了,那个是客服系统我的论坛是QZOO。A。lunqun。com
2007年10月01日 04点10分 22
level 6
没办法,免费论坛的域名都这么难记,目前网络饱和很卡,要什么东西我直接上传到CLC了
2007年10月01日 04点10分 24
level 6
恩,所以我装了一个特殊域名软件,在Dotworld上注册特殊域名(Beta,免费)但是推广棋类比较难
2007年10月01日 04点10分 25
1 2 尾页