开发者

Video Ad (show video then ad)

Doe's anyone know how I can replicate this? I'd like to show an a promo code after the video plays on my website.

Like the current chipotle facebook ad.

Fa开发者_开发问答cebook Ad


You would have to have the Flash movie call your JavaScript function when it finishes playing. Alternatively you might use HTML5 video tag but it would work only on modern browsers.

For example if you are using Flowplayer then you would have to register a callback when the movie finishes playing using something like this:

flowplayer().onFinish(yourFunction);

and define yourFunction to do what you want to do when the movie finishes playing, like showing more content etc.

function yourFunction() {
    $('#promo').show();
}

If you have your promo in a hidden div with id promo like this:

<div id="promo" style="display: none">Your hidden div</div>

This is just the most basic example, you probably would like to make the code less obvious than to include it in HTML.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜