Solved

How to play pre roll mid roll and post roll video in flash cs3 using AS3

Posted on 2008-10-10
7
1,260 Views
Last Modified: 2013-12-07
Currently I am using JW FLV PLayer 4.0 and I want to play pre roll ad, mid roll ad, post roll ad. Please tell me how is it possible. if you need any assistance to JW FLV PLAYER website. (www.jeroenwijering.com)

0
Comment
Question by:Bigflicks
  • 3
  • 2
7 Comments
 
LVL 38

Expert Comment

by:lherrou
ID: 22686715
Bigflicks,

You'll need to set up an XML playlist, which the JW player supports, and set to autoplay. Break your main video into two parts, where you want the mid roll ad to go.

Your XML file will look like the one below...

If you don't want the movie to start immediately when the page is called, set up your javascript to call it once a screen image of the movie in the player is clicked on (in other words, make a pic that looks like the movie in the player, when the user clicks on it, load the actual player with playlist and autoplay enabled).

Cheers,
LHerrou
<?xml version='1.0' encoding='UTF-8' ?>
<playlist version='1' xmlns='http://xspf.org/ns/0/'>
<trackList>
<track>
<title>pre ad</title>
<location>source/location/</location>
<meta rel='type'>video</meta>
</track>
<track>
<title>segment 1</title>
<location>source/location/</location>
<meta rel='type'>video</meta>
</track>
<track>
<title>mid ad</title>
<location>source/location/</location>
<meta rel='type'>video</meta>
</track>
<track>
<title>segment 2</title>
<location>source/location/</location>
<meta rel='type'>video</meta>
</track>
<track>
<title>end ad</title>
<location>source/location/</location>
<meta rel='type'>video</meta>
</track>
</trackList>
</playlist>

Open in new window

0
 

Author Comment

by:Bigflicks
ID: 22718400
we have thousands of video file so we are not going to break the video and then play mid roll, we want to play mid roll without breaking our flv file.
 
 
0
 
LVL 37

Expert Comment

by:CyanBlue
ID: 22720761
Well...  The basic idea is to read the time value for the mid roll from the XML file and run the counter as soon as the video starts...  Pause the video when the time comes, and load the mid roll on top of the current video...  Have it play till the end and unload the mid roll... and resume the video...  That's what you are looking for, right???

I don't think I have seen a freeware that supports mid roll and I don't think JW one is doing that for you either...  You basically need to create your own player that implements the functionality...  That's my 2 cents...

CyanBlue
0
Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

 
LVL 38

Expert Comment

by:lherrou
ID: 22721058
I concur, JW is a great player but it won't do what you want out of the box. You can purchase it and modify the source to pause and play as CyanBlue describes. You also might want to look at the Earth Science Agency player, which is also customizable (http://components.earthscienceagency.com/components/flvplayer/)
0
 
LVL 38

Expert Comment

by:lherrou
ID: 23278726
Well, I don't know what Bigflicks ended up doing, but CyanBlue and I offered some information and advice here, that was never fully responded to.
0
 

Accepted Solution

by:
Bigflicks earned 0 total points
ID: 23285159
we have stopped using JW and we have created our own flash player...
thanks everyone
0

Featured Post

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Connect speaker to Monitor 5 142
Play RTMP without Flash 3 539
Dell Laptop M6800 6 83
Music – name and composer 2 21
This is intended to introduce all collision detection principles in flash, their strengths, weaknesses and workarounds. The main method for Collision Detection in flash is using hitTestObject. But unless you'll be pushing rectangular shapes without …
There are times in your Flash CS4 application when you want more than a simple pointer or a hand, and it's hard to find an ideal walk-through to tell you what to do.  I spent a few days recently learning my way around making custom cursors in Flash,…
Viewers will learn how to include realistic velocity sensitivity to their Sampler instruments. Set the Vol<Vel parameter in the Filter/Global tab to your desired setting: Gather samples of hits of various intensity, and drag/drop into Velocity zon…
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question