swfObject 使用说明
1.Embed your SWF with JavaScript
使用方法 swfobject.embedSWF(swfUrl, id, width, height, version, expressInstallSwfurl, flashvars, params, attributes, callbackFn) 包含5个必须参数及5个可选参数。
- swfUrl (String, required) specifies the URL of your SWF
- id (String, required) specifies the id of the HTML element (containing your alternative content) you would like to have replaced by your Flash content
- width (String, required) specifies the width of your SWF
- height (String, required) specifies the height of your SWF
- version (String, required) specifies the Flash player version your SWF is published for (format is: "major.minor.release" or "major")
- expressInstallSwfurl (String, optional) specifies the URL of your express install SWF and activates Adobe express install. Please note that express install will only fire once (the first time that it is invoked), that it is only supported by Flash Player 6.0.65 or higher on Win or Mac platforms, and that it requires a minimal SWF size of 310x137px.
- flashvars (Object, optional) specifies your flashvars with name:value pairs
- params (Object, optional) specifies your nested object element params with name:value pairs
- attributes (Object, optional) specifies your object's attributes with name:value pairs
- callbackFn (JavaScript function, optional) can be used to define a callback function that is called on both success or failure of creating a Flash plug-in <object> on the page (see API documentation)
注意:可选的参数你可以忽略,或者给它传递false值即可,对于flashvars,params,attributes参数,你也可以传递空对象{}.
2.How can you configure your Flash content?
你可以为attributes 对象指定如下可选的属性:
- id (NOTE: when undefined, the object element automatically inherits the id from the alternative content container element)
- align
- name
- styleclass (see note about class)
- class
styleclass 与class 都是指定样式,但因为class是js中的关键字,所以如果使用class时要用引号括起来。
Example:
var attributes = {
id: "myId",
align: "left",
styleclass: "myclass"
};
If you would rather use class instead of styleclass, wrap the word class in quotes like this:
var attributes = {
id: "myId",
align: "left",
"class": "myclass"
};
你还可以为params对象指定如下可选的属性:
- play
- loop
- menu
- quality
- scale
- salign
- wmode
- bgcolor
- base
- swliveconnect
- flashvars
- devicefont (more info)
- allowscriptaccess (more info here and here)
- seamlesstabbing (more info)
- allowfullscreen (more info)
- allownetworking (more info)
3.你可以忽略flashvars参数,而使用params对象的flashvars属性指定:
<script type="text/javascript"> var flashvars = false;
var params = {
menu: "false",
flashvars: "name1=hello&name2=world&name3=foobar"
};
var attributes = {
id: "myDynamicContent",
name: "myDynamicContent"
}; swfobject.embedSWF("myContent.swf", "myContent", "300", "120", "9.0.0","expressInstall.swf", flashvars, params, attributes); </script>
官方文档:https://code.google.com/p/swfobject/wiki/documentation
属性参数值配置:http://helpx.adobe.com/flash/kb/flash-object-embed-tag-attributes.html
使用flashvars参数传值到swf:http://helpx.adobe.com/flash/kb/pass-variables-swfs-flashvars.html
swfObject 使用说明的更多相关文章
- Atitit.项目修改补丁打包工具 使用说明
Atitit.项目修改补丁打包工具 使用说明 1.1. 打包工具已经在群里面.打包工具.bat1 1.2. 使用方法:放在项目主目录下,执行即可1 1.3. 打包工具的原理以及要打包的项目列表1 1. ...
- awk使用说明
原文地址:http://www.cnblogs.com/verrion/p/awk_usage.html Awk使用说明 运维必须掌握的三剑客工具:grep(文件内容过滤器),sed(数据流处理器), ...
- 使用 SWFObject.js 插入Flash
今天学习了一下使用 SWFObject.js 这个js插入flash. 下载地址:http://code.google.com/p/swfobject/ 这个js的好处 1.IE中没有讨厌的虚框问题了 ...
- “我爱背单词”beta版发布与使用说明
我爱背单词BETA版本发布 第二轮迭代终于画上圆满句号,我们的“我爱背单词”beta版本已经发布. Beta版本说明 项目名称 我爱背单词 版本 Beta版 团队名称 北京航空航天大学计算机学院 拒 ...
- Oracle 中 union 和union all 的简单使用说明
1.刚刚工作不久,经常接触oracle,但是对oracle很多东西都不是很熟.今天我们来了解一下union和union all的简单使用说明.Union(union all): 指令的目的是将两个 S ...
- Map工具系列-02-数据迁移工具使用说明
所有cs端工具集成了一个工具面板 -打开(IE) Map工具系列-01-Map代码生成工具说明 Map工具系列-02-数据迁移工具使用说明 Map工具系列-03-代码生成BySQl工具使用说明 Map ...
- Map工具系列-03-代码生成BySQl工具使用说明
所有cs端工具集成了一个工具面板 -打开(IE) Map工具系列-01-Map代码生成工具说明 Map工具系列-02-数据迁移工具使用说明 Map工具系列-03-代码生成BySQl工具使用说明 Map ...
- jQuery验证控件jquery.validate.js使用说明
官网地址:http://bassistance.de/jquery-plugins/jquery-plugin-validation jQuery plugin: Validation 使用说明 转载 ...
- gdbsever 使用说明
gdbsever 使用说明 在新塘N3292x平台下 编译 gdbsever ./configure --target=arm-linux --host=arm-linux arm-linux-gdb ...
随机推荐
- ok6410的DMA裸机总结
1.为何使用DMA:为了提高CPU的工作效率,避免多余的等待时间 2.关于DMA控制器:(1)通道数:2440有4个通道,6410有4个DMA控制器(初始化的时候要选择),32个通道.210有两种DM ...
- ROS多个master消息互通
需求 有时候我们需要有几个不同的master, 他们之间要交换topic的内容,这时候就不能使用ros自带的设置同一个master的方法. 我们的处理方法是,构造一个client和一个server,他 ...
- [转]Openwrt的Inittab
转来一篇关于启动的文章,特意收藏.http://see.sl088.com/wiki/Inittab 文件位于/etc/inittab编辑方法vi /etc/inittab初始内容::sysinit: ...
- MySQL 的数值数据类型
MySQL 的数值数据类型可以大致划分为两个类别,一个是整数,另一个是浮点数或小数.许多不同的子类型对这些类别中的每一个都是可用的,每个子类型支持不同大小的数据,并且 MySQL 允许我们指定数值字段 ...
- hdu 1008
题目意思是:给你N个数字 每个数字表示多少层楼 现在要你从0层楼开始坐电梯 一次按顺序走过这些楼层 规则是 上楼6秒 ,下楼4秒,每次到达一个楼层停5秒..... 思路:模拟 代码如下:(要注意 ...
- android几种定时器机制及区别
在android中,经常用到的定时器主要有以下几种实现:一.采用Handler与线程的sleep(long )方法二.采用Handler的postDelayed(Runnable, long) 方法三 ...
- adb 安装失败
打开Terminal终端:Ctrl + Alt + T 按顺序执行以下三条命令: sudo add-apt-repository ppa:nilarrimogard ...
- iOS开发的22个奇谲巧技
结合自身的实践开发经验总结出了22个iOS开发的小技巧,以非常欢乐的语调轻松解决开发过程中所遇到的各种苦逼难题,光读着便已忍俊不禁. 1. TableView不显示没内容的Cell怎么办? 类似于图1 ...
- HttpModule在Web.config的配置和动态配置
学习笔记 ASP.Net处理Http Request时,使用Pipeline(管道)方式,由各个HttpModule对请求进行处理,然后到达 HttpHandler,HttpHandler处理完之后, ...
- 动态链接库知识点归纳之一(DLL概念,如何建立,如何使用,如何优化,如何查看)
简单的总结一些动态链接库的一些知识,方便以后查找. 首先,新建一个动态链接库 (1) 打开编辑器,选择WIN32项目, dll,如下图,项目名字为:test,选择空项目.如下图 (2) ...