【问题标题】:python failed to call flash loaded html pagepython调用flash加载html页面失败
【发布时间】:2010-09-06 13:49:49
【问题描述】:

我尝试渲染包含 Flash 内容的 html 页面。但它没有响应。负载无穷。文字和图片内容都OK。这是我的代码。

self.response.out.write(template.render('ieerror.html', dict()))

html文件包含:

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>flash content</title>
<script src="scripts/AC_RunActiveContent.js" type="text/javascript"></script>
</head>

<body style=" text-align:center">
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','740','height','473','title','image navigation','src','image_navigation','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','image_navigation' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="740" height="473" title="image navigation">
  <param name="movie" value="image_navigation.swf" />
  <param name="quality" value="high" />
  <embed src="image_navigation.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="740" height="473"></embed>
</object></noscript>
</body>

【问题讨论】:

  • 这是什么意思?你是如何“渲染”这个页面的? self.response 是什么?

标签: javascript python html flash


【解决方案1】:

改用http://code.google.com/p/swfobject/

点赞from:

<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>

是的,除了这段代码 self.response.out.write(template.render('ieerror.html', dict())) 我们需要您的 Python 代码中的所有其他可运行示例。

谢谢!

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2019-03-13
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多