开发者

jQuery slider, Autoplay SWF when slided to

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开发者_JS百科 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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜