swfobject.js不会在chrome中显示flash(在边缘工作) [英] swfobject.js won't display flash in chrome (works in edge)

查看:277
本文介绍了swfobject.js不会在chrome中显示flash(在边缘工作)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我试图修复这个生成flash图表的数据分析器脚本,在Edge中工作正常,但是由于没有显示结果,Chrome会以某种方式出现bug。



(在本地Chrome中工作)



任何人都可以请建议我如何升级或修复这个问题? 解决方案要在Chrome浏览器中查看您的Flash内容,您必须执行以下步骤: 1)在您的页面上,点击绿色的挂锁图标地址栏。


$ b 2)转到Flash设置并从询问(默认)变成允许(所有将来的访问)。
$ b $ 3)单击重新加载弹出通知(或刷新页面)。
$ b 这是因为您不直接嵌入任何Flash内容( .swf code> file),您的 DataAnalyzer.js 正在动态添加一个 div 为SWF稍后与这样的代码:

  var div = document.createElement('div' ); 
div.id =图表+ count; div.className ='chartCSS'; dest.appendChild(DIV);

chartType = _ge('cmbChartType')。value;
if(chartType =='Random'){chartType =(Math.floor(Math.random()* 2))== 0? 馅饼:酒吧; }
$ b $ if(chartSrc =='Flash Chart')
{
window ['myChart'+ count] = new SWFObject(open-flash-chart.swf, div.id,this.chartHeight,this.chartWidth,9,#FFFFFF);
window ['myChart'+ count] .addVariable(variables,true);
window ['myChart'+ count] .addVariable('x_label_style','10,0x0000FF,2');
window ['myChart'+ count] .addVariable(tool_tip,Charts [count] .LabelX +:#x_label#< br>+(operation!= -1?Charts [count] .LabelY :'Count')+:#val#);
window ['myChart'+ count] .addVariable((chartType =='pie'?'pie':'bar_glass'),'50,#7E97A6');
window ['myChart'+ count] .addVariable(title,Charts [count] .Title +',{font-size:16px;}');

// ... etc etc ...

}

这种动态嵌入也是恶意网站使用的一种技巧,因此默认情况下会被阻止。如果您有其他最终用户,那么他们也必须在自己的Chrome浏览器中执行这三个步骤。


I'm trying to fix this Data Analyzer script which generates flash charts, works fine in the Edge but bugs in chrome somehow by not showing the results.

(works in Chrome locally)

Can anyone please suggest me how to upgrade or fix this?

解决方案

To view your Flash content in Chrome, you have to do following steps:

1) Whilst on your page, click the green padlock icon in address bar.

2) Go to Flash settings and change from Ask (default) into Allow (for all future visits).

3) click Reload in the notification pop-up (or just refresh page).

This is because you're not directly embedding any Flash content (a .swf file) in the page, your DataAnalyzer.js is dynamically adding a div for the SWF later on with code like this:

var div = document.createElement('div');
div.id = "Chart" + count; div.className = 'chartCSS'; dest.appendChild(div);

chartType =  _ge('cmbChartType').value;
if(chartType == 'Random') { chartType = (Math.floor(Math.random()*2)) == 0 ? 'pie' : 'bar'; }

if(chartSrc == 'Flash Chart') 
{
window['myChart'+count] = new SWFObject("open-flash-chart.swf", div.id, this.chartHeight, this.chartWidth, "9", "#FFFFFF");
window['myChart'+count].addVariable("variables","true");
window['myChart'+count].addVariable('x_label_style','10,0x0000FF,2');
window['myChart'+count].addVariable("tool_tip", Charts[count].LabelX + ": #x_label#<br>" + (operation != -1 ? Charts[count].LabelY : 'Count') + ": #val#");
window['myChart'+count].addVariable((chartType == 'pie' ? 'pie' : 'bar_glass'), '50,#7E97A6');
window['myChart'+count].addVariable("title",Charts[count].Title + ',{font-size: 16px;}');

// ...etc etc...

}

This kind of dynamic embedding is also a trick used by malicious sites so it's blocked by default. If you have other end-users, then they too must do those 3 steps in their own Chrome browsers.

这篇关于swfobject.js不会在chrome中显示flash(在边缘工作)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆