/*! SWFObject v2.2 <http://code.google.com/p/swfobject/>
is released under the MIT License <http://www.opensource.org/licenses/mit-license.php>
*/
var swfobject = function() {
var UNDEF = "undefined",
OBJECT = "object",
SHOCKWAVE_FLASH = "Shockwave Flash",
SHOCKWAVE_FLASH_AX = "ShockwaveFlash.ShockwaveFlash",
FLASH_MIME_TYPE = "application/x-shockwave-flash",
EXPRESS_INSTALL_ID = "SWFObjectExprInst",
ON_READY_STATE_CHANGE = "onreadystatechange",
win = window,
doc = document,
nav = navigator,
plugin = false,
domLoadFnArr = [main],
regObjArr = [],
objIdArr = [],
listenersArr = [],
storedAltContent,
storedAltContentId,
storedCallbackFn,
storedCallbackObj,
isDomLoaded = false,
isExpressInstallActive = false,
dynamicStylesheet,
dynamicStylesheetMedia,
autoHideShow = true,
/* Centralized function for browser feature detection
- User agent string detection is only used when no good alternative is possible
- Is executed directly for optimal performance
*/
ua = function() {
var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF,
u = nav.userAgent.toLowerCase(),
p = nav.platform.toLowerCase(),
windows = p ? /win/.test(p) : /win/.test(u),
mac = p ? /mac/.test(p) : /mac/.test(u),
webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit
ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html
playerVersion = [0,0,0],
d = null;
if (typeof nav.plugins != UNDEF && typeof nav.plugins[SHOCKWAVE_FLASH] == OBJECT) {
d = nav.plugins[SHOCKWAVE_FLASH].description;
if (d && !(typeof nav.mimeTypes != UNDEF && nav.mimeTypes[FLASH_MIME_TYPE] && !nav.mimeTypes[FLASH_MIME_TYPE].enabledPlugin)) { // navigator.mimeTypes["application/x-shockwave-flash"].enabledPlugin indicates whether plug-ins are enabled or disabled in Safari 3+
plugin = true;
ie = false; // cascaded feature detection for Internet Explorer
d = d.replace(/^.*\s+(\S+\s+\S+$)/, "$1");
playerVersion[0] = parseInt(d.replace(/^(.*)\..*$/, "$1"), 10);
playerVersion[1] = parseInt(d.replace(/^.*\.(.*)\s.*$/, "$1"), 10);
playerVersion[2] = /[a-zA-Z]/.test(d) ? parseInt(d.replace(/^.*[a-zA-Z]+(.*)$/, "$1"), 10) : 0;
}
}
else if (typeof win.ActiveXObject != UNDEF) {
try {
var a = new ActiveXObject(SHOCKWAVE_FLASH_AX);
if (a) { // a will return null when ActiveX is disabled
d = a.GetVariable("$version");
if (d) {
ie = true; // cascaded feature detection for Internet Explorer
d = d.split(" ")[1].split(",");
playerVersion = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
}
}
}
catch(e) {}
}
return { w3:w3cdom, pv:playerVersion, wk:webkit, ie:ie, win:windows, mac:mac };
}(),
/* Cross-browser onDomLoad
- Will fire an event as soon as the DOM of a web page is loaded
- Internet Explorer workaround based on Diego Perini's solution: http://javascript.nwbox.com/IEContentLoaded/
- Regular onload serves as fallback
*/
onDomLoad = function() {
if (!ua.w3) { return; }
if ((typeof doc.readyState != UNDEF && doc.readyState == "complete") || (typeof doc.readyState == UNDEF && (doc.getElementsByTagName("body")[0] || doc.body))) { // function is fired after onload, e.g. when script is inserted dynamically
callDomLoadFunctions();
}
if (!isDomLoaded) {
if (typeof doc.addEventListener != UNDEF) {
doc.addEventListener("DOMContentLoaded", callDomLoadFunctions, false);
}
if (ua.ie && ua.win) {
doc.attachEvent(ON_READY_STATE_CHANGE, function() {
if (doc.readyState == "complete") {
doc.detachEvent(ON_READY_STATE_CHANGE, arguments.callee);
callDomLoadFunctions();
}
});
if (win == top) { // if not inside an iframe
(function(){
if (isDomLoaded) { return; }
try {
doc.documentElement.doScroll("left");
}
catch(e) {
setTimeout(arguments.callee, 0);
return;
}
callDomLoadFunctions();
})();
}
}
if (ua.wk) {
(function(){
if (isDomLoaded) { return; }
if (!/loaded|complete/.test(doc.readyState)) {
setTimeout(arguments.callee, 0);
return;
}
callDomLoadFunctions();
})();
}
addLoadEvent(callDomLoadFunctions);
}
}();
function callDomLoadFunctions() {
if (isDomLoaded) { return; }
try { // test if we can really add/remove elements to/from the DOM; we don't want to fire it too early
var t = doc.getElementsByTagName("body")[0].appendChild(createElement("span"));
t.parentNode.removeChild(t);
}
catch (e) { return; }
isDomLoaded = true;
var dl = domLoadFnArr.length;
for (var i = 0; i < dl; i++) {
domLoadFnArr[i]();
}
}
function addDomLoadEvent(fn) {
if (isDomLoaded) {
fn();
}
else {
domLoadFnArr[domLoadFnArr.length] = fn; // Array.push() is only available in IE5.5+
}
}
/* Cross-browser onload
- Based on James Edwards' solution: http://brothercake.com/site/resources/scripts/onload/
- Will fire an event as soon as a web page including all of its assets are loaded
*/
function addLoadEvent(fn) {
if (typeof win.addEventListener != UNDEF) {
win.addEventListener("load", fn, false);
}
else if (typeof doc.addEventListener != UNDEF) {
doc.addEventListener("load", fn, false);
}
else if (typeof win.attachEvent != UNDEF) {
addListener(win, "onload", fn);
}
else if (typeof win.onload == "function") {
var fnOld = win.onload;
win.onload = function() {
fnOld();
fn();
};
}
else {
win.onload = fn;
}
}
/* Main function
- Will preferably execute onDomLoad, otherwise onload (as a fallback)
*/
function main() {
if (plugin) {
testPlayerVersion();
}
else {
matchVersions();
}
}
/* Detect the Flash Player version for non-Internet Explorer browsers
- Detecting the plug-in version via the object element is more precise than using the plugins collection item's description:
a. Both release and build numbers can be detected
b. Avoid wrong descriptions by corrupt installers provided by Adobe
c. Avoid wrong descriptions by multiple Flash Player entries in the plugin Array, caused by incorrect browser imports
- Disadvantage of this method is that it depends on the availability of the DOM, while the plugins collection is immediately available
*/
function testPlayerVersion() {
var b = doc.getElementsByTagName("body")[0];
var o = createElement(OBJECT);
o.setAttribute("type", FLASH_MIME_TYPE);
var t = b.appendChild(o);
if (t) {
var counter = 0;
(function(){
if (typeof t.GetVariable != UNDEF) {
var d = t.GetVariable("$version");
if (d) {
d = d.split(" ")[1].split(",");
ua.pv = [parseInt(d[0], 10), parseInt(d[1], 10), parseInt(d[2], 10)];
}
}
else if (counter < 10) {
counter++;
setTimeout(arguments.callee, 10);
return;
}
b.removeChild(o);
t = null;
matchVersions();
})();
}
else {
matchVersions();
}
}
/* Perform Flash Player and SWF version matching; static publishing only
*/
function matchVersions() {
var rl = regObjArr.length;
if (rl > 0) {
for (var i = 0; i < rl; i++) { // for each registered object element
var id = regObjArr[i].id;
var cb = regObjArr[i].callbackFn;
var cbObj = {success:false, id:id};
if (ua.pv[0] > 0) {
var obj = getElementById(id);
if (obj) {
if (hasPlayerVersion(regObjArr[i].swfVersion) && !(ua.wk && ua.wk < 312)) { // Flash Player version >= published SWF version: Houston, we have a match!
setVisibility(id, true);
if (cb) {
cbObj.success = true;
cbObj.ref = getObjectById(id);
cb(cbObj);
}
没有合适的资源?快使用搜索试试~ 我知道了~
flex4实例-SparkInc.rar
共152个文件
html:52个
jpg:24个
mxml:18个
需积分: 3 79 下载量 182 浏览量
2010-04-10
09:59:26
上传
评论 1
收藏 5.75MB RAR 举报
温馨提示
flex4实例-SparkInc.rar 学习 flex4的一个实例:Spark_Intranet_SampleApp
资源推荐
资源详情
资源评论
收起资源包目录
flex4实例-SparkInc.rar (152个子文件)
.actionScriptProperties 1KB
CustomerData.as 1KB
Hours.as 1KB
RecalculateHoursEvent.as 431B
LoginEvent.as 389B
Customer.as 359B
Activity.as 313B
Project.as 311B
Users.cfc 2KB
Users.cfc 2KB
Styles.css 2KB
SourceStyles.css 1KB
history.css 365B
history.css 365B
.emptyDir 1B
.flexProperties 244B
.fxpProperties 613B
TimeSheetView_CF.mxml.html 46KB
TimeSheetView.mxml.html 45KB
TimeSheetItemRenderer.mxml.html 28KB
TimeSheetDataList.mxml.html 25KB
Main.mxml.html 24KB
ExpandedNewsView.mxml.html 15KB
LoginView.mxml.html 14KB
NewsListItemRenderer.mxml.html 12KB
Styles.css.html 11KB
HomeView.mxml.html 10KB
Hours.as.html 9KB
CustomerData.as.html 9KB
NewsView.mxml.html 7KB
NewsList.mxml.html 7KB
index.template.html 5KB
index.template.html 5KB
SourceTree.html 5KB
Main.html 5KB
EmailButtonSkin.mxml.html 4KB
EmployeeDirectoryButtonSkin.mxml.html 4KB
RecalculateHoursEvent.as.html 4KB
LoginEvent.as.html 4KB
TimesheetButtonSkin.mxml.html 4KB
Track1.mxml.html 4KB
AppBackgroundSkin.mxml.html 3KB
Thumb1.mxml.html 3KB
Customer.as.html 3KB
VerticalScrollbar1.mxml.html 3KB
Project.as.html 3KB
Activity.as.html 3KB
history.css.html 3KB
historyFrame.html 798B
historyFrame.html 798B
historyFrame.html 798B
index.html 525B
EmployeeDirectoryOverBtn.png.html 421B
ApplicationBackground.jpg.html 415B
employee_of_the_month.jpg.html 415B
EmployeeDirectoryBtn.png.html 413B
featured_employee.jpg.html 407B
TimesheetOverBtn.png.html 405B
SparkInc_logo.png.html 399B
EmailOverBtn.png.html 397B
TimesheetBtn.png.html 397B
bar_chart.jpg.html 391B
Cafeteria.jpg.html 391B
EmailBtn.png.html 389B
meeting.jpg.html 387B
seminar.jpg.html 387B
Picnic.jpg.html 385B
Globe.png.html 383B
401k.jpg.html 381B
ApplicationBackground.jpg 41KB
ApplicationBackground.jpg 41KB
Cafeteria.jpg 18KB
Cafeteria.jpg 18KB
seminar.jpg 16KB
seminar.jpg 16KB
Picnic.jpg 9KB
Picnic.jpg 9KB
Picnic.jpg 9KB
401k.jpg 7KB
401k.jpg 7KB
401k.jpg 7KB
employee_of_the_month.jpg 6KB
employee_of_the_month.jpg 6KB
employee_of_the_month.jpg 6KB
meeting.jpg 6KB
meeting.jpg 6KB
meeting.jpg 6KB
bar_chart.jpg 6KB
bar_chart.jpg 6KB
bar_chart.jpg 6KB
featured_employee.jpg 6KB
featured_employee.jpg 6KB
featured_employee.jpg 6KB
swfobject.js 25KB
swfobject.js 25KB
swfobject.js 25KB
history.js 25KB
history.js 25KB
mimetype 25B
TimeSheetView_CF.mxml 6KB
共 152 条
- 1
- 2
资源评论
普通网友
- 粉丝: 5
- 资源: 3
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功