flashui.movie Flash影片
More...
List of all members.
Public Member Functions |
def | __init__ |
def | get_array |
def | get_current_frame |
def | get_focus_policy |
def | get_variable |
def | goto_frame |
def | invoke |
def | register_frame_event |
def | set_above |
def | set_array |
def | set_below |
def | set_bottom |
def | set_focus_policy |
def | set_top |
def | set_variable |
Properties |
| active = property(get_active, set_active) |
| bool 读写 影片是否被激活 .
|
| align = property(get_align, set_align) |
| int 读写 影片的对齐方式.
|
| bkgnd_alpha = property(get_bkgnd_alpha, set_bkgnd_alpha) |
| float 只写 影片背景的半透明度(0~1) .
|
| cursor_callback = property(get_cursor_callback, set_cursor_callback) |
| callback 鼠标光标形态发生改变时的回调函数回调形式为callback(movie, cursor_event),其中movie为flashui.movie对象,cursor_event为光标事件.
|
| depth = property(get_depth, set_depth) |
| int 读写 指定movie所在的层次,数字大的在上面,取值范围0<=depth<=255。
|
| enable_keyboard = property(get_enable_keyboard, set_enable_keyboard) |
| bool 启用/关闭 影片接受键盘输入 .
|
| enable_mouse = property(get_enable_mouse, set_enable_mouse) |
| bool 启用/关闭 影片接受鼠标输入 .
|
| focus = property(get_focus, set_focus) |
| bool 读写 影片的输入焦点 .
|
| focus_callback = property(get_focus_callback, set_focus_callback) |
| 影片获得/失去输入焦点后调用的回调函数回调形式为callback(movie, is_set),其中movie为flashui.movie对象,is_set为获得焦点或者失去焦点 .
|
| render_order = property(get_render_order, set_render_order) |
| int 读写 影片的绘制序数 .
|
| scale_mode = property(get_scale_mode, set_scale_mode) |
| int 读写 影片的scalemode.
|
Detailed Description
flashui.movie Flash影片
Constructor & Destructor Documentation
def __init__ |
( |
|
self, |
|
|
|
filename, |
|
|
|
active = True , |
|
|
|
transparent = True , |
|
|
|
scalemode = SM_NoScale , |
|
|
|
depth = 0 |
|
) |
| |
flashui.movie Flash影片
参数 :
filename : string 文件名
active : bool 是否立即激活影片
transparent : bool 是否透明背景
scalemode : int Scale模式,默认flashui.SM_NoScale
depth : int 指定movie所在的层次,数字大的在上面,取值范围0<=depth<=255。例如:depth=10的会一直在depth=0的上面。默认值为0
Member Function Documentation
def get_array |
( |
|
self, |
|
|
|
path |
|
) |
| |
读出Flash movie中的数组(不嵌套)
参数 :
path : str 变量路径
返回值:
list of int/float/str/bool/None : 对应数组值
def get_current_frame |
( |
|
self ) |
|
获得当前Flash movie帧
返回值:
int : 帧索引(与Flash的帧保持一致,从1开始计算)
def get_focus_policy |
( |
|
self, |
|
|
|
movie_event |
|
) |
| |
读出Flash movie中是否对特定事件自动设置输入焦点
参数 :
movie_event : int Movie事件,可取值为
flashui.Event_Activate 显示
flashui.Event_SetTop 置顶
flashui.Event_LeftDown 鼠标左键按下
flashui.Event_RightDown 鼠标右键按下
flashui.Event_MiddleDown 鼠标中键按下
返回值:
bool : 若针对该事件movie会自动获得焦点,返回True,否则返回False
注意:
对每一个movie来说,Event_LeftDown/Event_RightDown/Event_MiddleDown
这三个事件默认设置了
def get_variable |
( |
|
self, |
|
|
|
path |
|
) |
| |
读出Flash movie中的变量值
参数 :
path : str 变量路径
返回值:
int/float/str/bool : 对应变量值
def goto_frame |
( |
|
self, |
|
|
|
frame_index, |
|
|
|
callback = None , |
|
|
|
data = None |
|
) |
| |
跳转Flash movie帧(一次性事件)
此函数不建议使用。
建议使用invoke gotoAndPlay/gotoAndStop,并直接在flash编辑器的动作-帧中添加相应的python回调
参数 :
frame_index : int 帧索引(与Flash的帧保持一致,从1开始计算)
callback : function 回调时callback(movie, index[, data]),如果data为None,则回调函数不需要接收此数据
data : object 回调参数
def invoke |
( |
|
self, |
|
|
|
method, |
|
|
|
args |
|
) |
| |
调用Flash movie中方法
参数 :
method : str 方法路径
args : int/float/str/bool 参数
返回值 :
依赖于movie中的方法
def register_frame_event |
( |
|
self, |
|
|
|
frame_index, |
|
|
|
callback, |
|
|
|
data = None |
|
) |
| |
此函数已经废弃!!注册Flash movie帧(多次事件)
现改成直接在flash编辑器的动作-帧中添加相应的python回调
参数 :
已废弃
def set_above |
( |
|
self, |
|
|
|
dst_movie |
|
) |
| |
设定Movie在给定Movie之后绘制
参数 :
dst_movie : flashui.movie 目标movie,在其上绘制
def set_array |
( |
|
self, |
|
|
|
path, |
|
|
|
values |
|
) |
| |
设置Flash movie中的数组(不嵌套)
参数 :
path : str 变量路径
values: list of int/float/str/bool/None 对应数组值
返回值:
bool : 是否成功
def set_below |
( |
|
self, |
|
|
|
dst_movie |
|
) |
| |
设定Movie在给定Movie之前绘制
参数 :
dst_movie : flashui.movie 目标movie,在其下绘制
def set_focus_policy |
( |
|
self, |
|
|
|
movie_event, |
|
|
|
enable |
|
) |
| |
设定Flash movie中是否对特定事件自动设置输入焦点
参数 :
movie_event : int Movie事件,可取值为
flashui.Event_Activate 显示
flashui.Event_SetTop 置顶
flashui.Event_LeftDown 鼠标左键按下
flashui.Event_RightDown 鼠标右键按下
flashui.Event_MiddleDown 鼠标中键按下
enable: bool 是否在响应该事件时自动设置输入焦点
def set_variable |
( |
|
self, |
|
|
|
path, |
|
|
|
value |
|
) |
| |
设置Flash movie中的变量值
参数 :
path : str 变量路径
value : int/float/str/bool 变量值
Property Documentation
active = property(get_active, set_active) [static] |
align = property(get_align, set_align) [static] |
bkgnd_alpha = property(get_bkgnd_alpha, set_bkgnd_alpha) [static] |
float 只写 影片背景的半透明度(0~1) .
cursor_callback = property(get_cursor_callback, set_cursor_callback) [static] |
enable_keyboard = property(get_enable_keyboard, set_enable_keyboard) [static] |
enable_mouse = property(get_enable_mouse, set_enable_mouse) [static] |
focus = property(get_focus, set_focus) [static] |
focus_callback = property(get_focus_callback, set_focus_callback) [static] |
影片获得/失去输入焦点后调用的回调函数回调形式为callback(movie, is_set),其中movie为flashui.movie对象,is_set为获得焦点或者失去焦点 .
render_order = property(get_render_order, set_render_order) [static] |
scale_mode = property(get_scale_mode, set_scale_mode) [static] |