使用JavaScript控制Flash Player [英] Controlling a Flash Player using JavaScript

查看:155
本文介绍了使用JavaScript控制Flash Player的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望能够使用JavaScript在与Flash组件相同的页面中控制Flash电影流,包括:


  • 播放和暂停流

  • 更改流



我已经可以加载播放器并设置闪存参数,但是一旦流开始,我不知道如何与玩家互动。这可能没有修改当前用于播放电影的SWF?



Mike。

解决方案

SWF需要使用Flash库中的ExternalInterface API将函数公开给Javascript。这允许JavaScript调用Flash,反之亦然。



http://livedocs.adobe.com/flex/3/langref/flash/external/ExternalInterface.html


I would like to be able to control a flash movie stream using JavaScript in the same pages as the flash component including:

  • Play and Pause stream
  • Change Stream

I can already load the player and set the flash args, but I don't know how to interact with the player once the stream has started. Is this possible without modifying the SWF that is currently used to play the movie?

Mike.

解决方案

The SWF needs to expose functions to Javascript using the ExternalInterface API from the Flash libraries. This allows Javascript to call into Flash and vice-versa.

http://livedocs.adobe.com/flex/3/langref/flash/external/ExternalInterface.html

这篇关于使用JavaScript控制Flash Player的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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