jQuery滑杆,滑至时自动播放SWF [英] jQuery slider, Autoplay SWF when slided to

查看:106
本文介绍了jQuery滑杆,滑至时自动播放SWF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经为Google搜索了一段时间,以获取该问题的答案.

I've serach google for a while to get an answer to this question.

我想用JavaScript构建一个既有图像又有我自己的SWF电影的滑块. 问题是我希望此滑块自动滑动,当它碰到SWF电影时,我应该自动播放,当电影结束时继续滑动. 当然,我希望它循环播放.

I want to build a slider with JavaScript that both have images and my own SWF movies. The problem is that i want this slider to slide automatic and when it hits a SWF movie i should play that automatic and when the movie ends continue with the slide. And ofcourse i want it to loop.

我需要一个正确的方向来找到示例和帮助.

I need a finger in the right direction where to find examples and help.

问候 埃里克

推荐答案

我建议使用SWFObject插件(http://code.google.com/p/swfobject/)和JW Player(http://www.JF Player). longtailvideo.com/players/jw-flv-player/).如果只是电影,FLV可能是更好的格式.

I would recommend using SWFObject plugin (http://code.google.com/p/swfobject/), and JW Player (http://www.longtailvideo.com/players/jw-flv-player/). If it's just a movie, FLV might be a better format.

在应加载页面的情况下,您需要执行$ .ajax请求以获取相应文件的flashvars.在您的Flashvar中,您需要创建div来附加视频播放器,并确保将自动启动"设置为true.

On the event that your page should load, you need to do a $.ajax request to get the flashvars for the appropriate file. In your flashvars, you need to create the div to have your video player appended to, and make sure 'autostart' is set to true.

$.ajax({
        url: '/path/to/flashvars.js',
        dataType: 'script',
        cache: false
    });

要使用滑块进行设置,请尝试将其与jCarousel集成.那应该做.

To set it up with a slider, try integrating it with jCarousel. That should do it.

这篇关于jQuery滑杆,滑至时自动播放SWF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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