从HTML5调用.swf [英] Calling .swf From HTML5

查看:204
本文介绍了从HTML5调用.swf的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是HTML5的新手,我想尝试从HTML按钮(或类似的)调用.swf视频文件的简单示例。

I'm new to HTML5 and am trying to get a simple example working of calling a .swf video file from an HTML button (or similar).

到目前为止,我已经获得了这段代码,但它似乎无法正常工作......

I have gotten this code so far but it doesn't seem to work...

<!DOCTYPE html>
<html>
  <head>
  </head>
  <body>
    <video src='test.swf' id='v' controls>
      Your browser does not support HTML5 video.
    </video>
    </br>
    <button onclick="document.getElementById('v').play()">Play</button>
    <button onclick="document.getElementById('v').pause()">Pause</button>
  </body>
</html>

任何帮助都将不胜感激...

Any help would be appreciated...

推荐答案

你可以使用embed标签:

You can use embed tag:

SWF WITH BACKGROUND

SWF WITH BACKGROUND

<embed src="main.swf" width="550" height="400" />

带有TANSPARENT的SWF背景

SWF WITH TANSPARENT BACKGROUND

<embed src="main.swf" width="550" height="400" wmode="transparent" />

SWF WITH FLASHVARS

SWF WITH FLASHVARS

<embed src="main.swf" width="550" height="400" flashvars="id=hello world" wmode="transparent" />

要控制swf,您需要使用外部接口功能。

To control the swf, you need to use External Interface functions.

这篇关于从HTML5调用.swf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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