jQuery slider, Autoplay SWF when slided to

天大地大妈咪最大 提交于 2019-12-23 01:45:05

问题


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

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.

Regards Erik


回答1:


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.

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
    });

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



来源:https://stackoverflow.com/questions/4145700/jquery-slider-autoplay-swf-when-slided-to

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!