Order Now AdSolution Sign Up | Login » Bits on the Run Sign Up | Login »

Forums

/

Problems with Post-Rolls using SWF-Object 2.0

5 replies [Last post]

Hey,

i have a problem with running adsolutions using post-rolls.
Is that code correct?

  <script type="text/javascript">
      var flashvars =
      {
        file:                 '<?php echo $R["video_link"];?>',
        autostart:            'false',
        plugins:   'gapro-1&gapro.accountid=UA-6684094-1&gapro.trackstarts=true&gapro.trackpercentage=true&gapro.tracktime=true&ltas&ltas.cc=fmzvakkzwcfdnmz',
        streamer:   'http://e-tactics.de/xmoov.php',
        type:       'http'
      };

      var params =
      {
        allowfullscreen:      'true',
        allowscriptaccess:    'always'
      };

      var attributes =
      {
        id:                   'player1', 
        name:                 'player1'
      } 
     
      swfobject.embedSWF('http://e-tactics.de/player/player-licensed.swf', 'placeholder1', '535', '325', '7.0.0', false, flashvars, params, attributes);
    </script>

Im not seeing the ads after a video.

---------------------

Here i used the same code but another channel, which is running mid-roll.
As you can see there is no problem.

Thanks (in advance) for any and all help you can provide.

best regards
Viper

You need to break apart each plugin / plugin call into an individual line.

plugins:   'gapro-1&gapro.accountid=UA-6684094-1&gapro.trackstarts=true&gapro.trackpercentage=true&gapro.tracktime=true&ltas&ltas.cc=fmzvakkzwcfdnmz',

Is not correct.

Make it:

plugins:   'gapro-1,ltas',
'gapro.accountid': 'UA-6684094-1',
'gapro.trackstarts': 'true',
'gapro.trackpercentage': 'true',
'gapro.tracktime': 'true',
'ltas.cc':fmzvakkzwcfdnmz',

Thx for your answer, but it seems to be wrong.

Im now using this statement:

      var flashvars =
      {
        file:                 '<?php echo $R["video_link"];?>',
        autostart:            'false',
        plugins:   'gapro-1,ltas',
        'gapro.accountid': 'UA-6684094-1',
        'gapro.trackstarts': 'true',
        'gapro.trackpercentage': 'true',
        'gapro.tracktime': 'true',
        'ltas.cc':'fmzvakkzwcfdnmz',
        streamer:   'http://e-tactics.de/xmoov.php',
        image:   '<?php echo $R["picture"];?>',
        type:       'http'
      };

Its just the same as before, no post-roll but the other link with mid-roll function is still working fine.

best regards

Hi,

When using swfobject 2 and the AdSolution, you need to make sure that you are using double divs, in order for the postroll to pop correctly, as well as set wmode to transparent.

Here is a sample:

<html>
<head>

<title>SWF2.0 JW 5.0 - No JS</title>

<script type="text/javascript" src="swfobject20.js"></script>

<script type="text/javascript">
var flashvars = {
  width: "700",
  height: "450",
  enablejs: "true",
  file: "video.flv",
  plugins: "ltas",
  'ltas.cc': "exjxnrnwkthlfca"
};
var params = {
  allowfullscreen: "true",
  wmode: "transparent",
  allowscriptaccess: "true"
};
var attributes = {
  id: "longtail",
  name: "longtail"
};
swfobject.embedSWF("player5.swf", "playerspace", "700", "450", "9.0.0",
"expressInstall.swf", flashvars, params, attributes);
</script>
</head>

<body >

<div id='player' name='player'>
<div id='playerspace' name='playerspace'></div>

</div>

</body>
</html>

Best,
-Ethan

Hey Ethan, thank you very mich for your help but it is still not working.
And as you can see at dashboard setup wizard, the code doesnt contain two divs.

My code now is like this:

  <script type="text/javascript">
  var flashvars =
  {
width: '535',
height: '325',
enablejs: 'true',  
    file:                 '<?php echo $R["video_link"];?>',
    autostart:            'false',
    plugins:   'gapro-1,ltas',
    'gapro.accountid': 'UA-6684094-1',
    'gapro.trackstarts': 'true',
    'gapro.trackpercentage': 'true',
    'gapro.tracktime': 'true',
    'ltas.cc':'fmzvakkzwcfdnmz',
    streamer:   'http://e-tactics.de/xmoov.php',
    image:   '<?php echo PATH_VIDEOIMAGE_WEB.$R["picture"];?>',
    type:       'http'
  };

      var params =
      {
        allowfullscreen:      'true',
        wmode: 'transparent',
        allowscriptaccess:    'always'
      };

      var attributes =
      {
        id:                   'player1', 
        name:                 'player1'
      } 
     
      swfobject.embedSWF('http://e-tactics.de/player/player-licensed.swf', 'playerspace', '535', '325', '7.0.0', false, flashvars, params, attributes);
    </script>
   
     <script type="text/javascript">
      var player   =  null;
      var seek     =     0;
      var seekFlag = false;
      var currentTime;

      function playerReady(obj)
      {
        player = gid(obj.id);
        player.addModelListener('TIME',  'timeMonitor');
      };

      function timeMonitor(obj)
      {
        if((obj.position > 0) && (seekFlag))
        {
          seekFlag = false;
          player.sendEvent('SEEK', seek);
        }
        currentTime = obj.position;
      };

      function seekSome(some)
      {
        seek = some;

        if(currentTime > 0)
        {
          player.sendEvent('SEEK', seek)
        }
        else
        {
          seekFlag = true;
          player.sendEvent('PLAY', 'true');
        }
      };

      function gid(name)
      {
        return document.getElementById(name);
      };
    </script>

<?php

<div id="player" name="player">
<div id="playerspace" name="playerspace"></div>

</div>

It is still not working :/ as you can see here too.
http://cs.e-tactics.de/guide/40/counter-strike/waffenguide/m4a1

best regards

Please send me an email so I can show you a working demo of this, thanks.

ethan [at] longtailvideo [dot] com, thanks.