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

Forums

/

Configuring "clickSign" and "notice" properly (using OVA AS3 framework and custom player)

19 replies [Last post]
Reply

Hello,

Before asking my question, I'd love to say thank you very much to the developer(s) that created the OVA AS3, it's been really, really great experience to work with your framework! I understand how much time and hard work has been put into this to make it work with such adaptability and flexibility!

Okay now to the main part, I've just worked with OVA AS3 for a week or so, and I managed to build a working system utilizing a custom player and my OVA plugin. Everything was good until I got stuck trying to display an "Ad Notice" and a "Click Sign" while my ads are running. The details are as followed:

  1. I enabled the display of non-linear Ads by calling _vastController.enableNonLinearAdDisplay()
  2. I followed most of the guide on "Integrating OVA for AS3"
  3. I have NOT listened to any event regarding overlay linear ad (I expected to use the default features of OVA for AS3 before trying to customize anything)
  4. I setup the configuration like this:
    "notice": {
    "show": true,
    "type": "countdown",
    "message": "<p class=\"smalltext\" align=\"right\">My_message_in_UTF-8 _countdown_ another_part_of_my_message</p>"
    }
  5. I also setup the "clickSign" key very similar to the guide and examples. I'm sure I set "enabled" to true

And the results (as well as the problems) are here:

  1. My message displays like this:

    <p class="smalltext" align="right">My_message_in_UTF-8 [seconds] _another_part_of_my_message</p>

    (So instead of formatting the message using the html tags, it displays the tags along with the non-formatted message)

  2. As for the above issue, when I changed the key "message" into "html" - which makes my configuration look like this:
    "notice": {
    "show": true,
    "type": "countdown",
    "textStyle": "normaltext",
    "html": "<p class=\"my-style\" align=\"right\">My_message_in_UTF-8 _countdown_ another_part_of_my_message</p>"
    }

    - then my message appears nice-looking, BUT... the content of the message falls back to the default value, which is

    "This advertisement runs for x seconds"

    (So my custom message and styling are completely ignored).

  3. As for the "clickSign", no matter how I try to tweak the configuration settings, nothing ever shows up (although when I click on an ad while it's playing, the browser does open the destination url!)

---------------- Wrap up ----------------

So, with all the above stated, I think what I would love to ask is that:

  1. Was I wrong in the configuration step? or,
  2. I do have to write my custom OVA plugin to implement the "Ad Notice" and "ClickSign" events myself?

Thank you very much for your time and your help,
(I'm also sorry if this question has been asked before, I just could not find a similar one, or maybe I didn't try hard enough...),

Best regards,
Khang

Reply

Hi Khang,

Thanks for the feedback and the questions... ok, let me try to help you over this hump.

To kick things off, can I ask - which version (build) of the AS3 framework are you running? (just so I can try to replicate your issues locally as I help out)... is it the latest version from the SVN repository?

Paul.

Reply

Hi Paul,

Thank you for your (very) fast reply, I didn't even expect it this soon :)

And yes, I'm using the latest release from the SVN repository (the one that got updated like a week ago if I'm correct)

I wonder if this can help you with tracking down the problems, here is the debug information I got when I set debug level to "region_formation, display_events":

16:32:44 GMT+0700: Region width is defined as a number 450 for region null
16:32:44 GMT+0700: Arranging text (CLICK FOR MORE INFORMATION ) to sit at X:5 Y:5 height:16 width:440
16:32:44 GMT+0700: Region height is defined as a number 32 for region null
16:32:44 GMT+0700: Arranging text (CLICK FOR MORE INFORMATION ) to sit at X:5 Y:5 height:16 width:440
16:32:44 GMT+0700: Vertical alignment set to 164 for region null
16:32:44 GMT+0700: Horizontal alignment set to 145 for region null
16:32:44 GMT+0700: Scaling set to X: 1 Y: 1
16:32:44 GMT+0700: Width is to be set to a percentage of the parent - 100pct setting to 740
16:32:44 GMT+0700: Region height is defined as a number 50 for region reserved-bottom-w100pct-h50px-transparent
16:32:44 GMT+0700: Vertical alignment set to 305 for region reserved-bottom-w100pct-h50px-transparent
16:32:44 GMT+0700: Horizontal alignment set to 0 for region reserved-bottom-w100pct-h50px-transparent

and that keeps repeating itself in my Firebug console :)

Reply

Thanks... ok, great.. good to know it's a recent version...

Ok, let's see if we can sort the issue.

I know what's happening on point 2) - the default message is being taken as the "html" option is not valid in the "notice" config structure - that option is just available in the "regions" declaration.. hence why you aren't seeing your custom message there but the default countdown message...

As for 1) and the 3) - that's a bit trickier..

On 1) I'm wondering if the JSON parsing is causing the issue somehow... what happens if you define the message as follows (html encoding the < and > signs):

"message": "&lt;p class=\"smalltext\" align=\"right\"&gt;My New Ad Notice - _seconds_ seconds&lt;/p&gt;"

Let's get 1) sorted first then we'll move onto 3)...

Paul

Reply

Hi Paul,

Thank you for your feedback, I tried to define a custom region in the "regions" block (I gave it the id value "adNotice". Now in my "notice" block (inside "ads"), I declare a "message" block and set it to the string you gave me in the previous post, I also set its "region" to my "adNotice" region created earlier.

The result is that, while the "padding" and "backgroundColor" settings work really good, I cannot get my text to be displayed as html. Briefly put, this is what appears on my computer screen:

<p class="smalltext" align="center">my ad notice content</p>

*The _countdown_ and _seconds_ keywords still work well, only the html text format messes up :)

It's like, the TextField holding the ad notice content calls the set method "text" rather than "htmlText". Would you think this might be my issue?

Reply

Hiya.. would you mind cutting and pasting in your full config.. think it will help for me to see the full configuration you are using... ?

Just an important note though - where you have "&lt;" etc. in the text string, can you replace it with "&amplt;" as you paste it into this forum post so that it appears correctly in the post (so that I can correctly see where you are using "&amplt") ...

Paul

Reply

Hi Paul,

Okay this is my current configuration settings:

{
"overlays": {
"regions":
[
{
"id": "adNotice",
"verticalAlign": "bottom",
"horizontalAlign": "center",
"backgroundColor": "transparent",
"padding": "5 5 5 5",
"width": 660,
"height": 30,
"style": ".adNoticeText { font: Arial, Sans-serif 14px normal; color:#CC0000; }",
"html": "&lt;p class=\"adNoticeText\" align=\"center\"&gt;Main content will run in _countdown_ seconds.&lt;/p&gt;"
}
]
},

"ads": {
"servers": [
{
"type": "OpenX",
"apiAddress": "http://localhost/openx/www/delivery/fc.php",
}
],
"schedule": [
{
"zone": "2",
"position": "pre-roll"
},
{
"zone": "2",
"position": "post-roll"
}
],
"clickSign":
{
"enabled": "true",
"verticalAlign": "center",
"horizontalAlign": "center",
"width": 600,
"height": 32,
"opacity": 0.5,
"borderRadius": 20,
"backgroundColor": "#000000",
"style": ".smalltext { font-size:12pt; }",
"message": "&lt;p class=\"smalltext\" align=\"center\"&gt;CLICK FOR MORE DETAILS!&lt;/p&gt;",
"scaleRate": 0.75
},
"notice":
{
"message": "&lt;p class=\"adNoticeText\" align=\"center\"&gt;Message: Main content will run in _countdown_ seconds.&lt;/p&gt;",
"region": "adNotice",
"show": "true",
"type": "countdown",
"textStyle": "adNoticeText",
"style": ".adNoticeText { font: Arial, Sans-serif 14px normal; color:#CC0000; }"
}
},
"debug": {
"debugger": "firebug",
"levels": "region_formation, display_events"
}
}

If you find nothing wrong with it, then the problem must be in my implementing the OVA framework...

Reply

Well the good news is that your config is close to perfect.

I cut and paste it into a config here and ran with the OVA for JW5 plugin and the following happened:

1. Ad notice comes up "Main content will run in X seconds" - great

2. "Click through" message however appears, but it is the default text

The fix in your config to get the click sign showing the right message is simple.

You have:

"clickSign": {
     .....
     "message": "....."
}

it should be:

"clickSign": {
     .....
     "html": "....."
}

Sorry about that inconsistency with the property names.. it is a bit confusing.

Ok, so the bigger question though is - why isn't the framework doing what you need? That seems very weird as it should all just work for you.

Any chance that I could get a URL to look at your implementation running? (so I can play around with it to help determine what's happening) ?

If you don't want to post the URL to the forum, email me on enquiries@openvideoads.org

At this stage, I think I need to see something running on your side to work out why it's not working for you...

Paul

Reply

Hmm, interesting... then I guess I have not done enough in my ActionScript. All I ever did was to call _vastController.enableNonLinearAdDisplay(). In fact, my code is something like this:

_vastCtrl = new VASTController();
_vastCtrl.startStreamSafetyMargin = 500;
_vastCtrl.endStreamSafetyMargin = 300;
_vastCtrl.initialise(vastConf, false, null);

// manage controlBar hiding / showing
if(!_vastCtrl.hasStageDimensions()) {
_vastCtrl.stageDimensions = new StageDimensions(_player.guiMngr.controlBarHeight + 5, 5);
}
_vastCtrl.addEventListener(SeekerBarEvent.TOGGLE, onToggleSeekerBar);

_vastCtrl.enableNonLinearAdDisplay(new DisplayProperties(this, _player.width, _player.height, _vastCtrl.stageDimensions.noControlsPaddingBottom, -1, -1));

_vastCtrl.addEventListener(LinearAdDisplayEvent.STARTED, onLinearAdStarted);
_vastCtrl.addEventListener(LinearAdDisplayEvent.COMPLETE, onLinearAdComplete);
_vastCtrl.addEventListener(LinearAdDisplayEvent.CLICK_THROUGH, onLinearAdClickThrough);

// manage time as clips' playback
_player.evtMngr.addEventListener(SephPlayerEvent.PLAY_TIME_UPDATED, onPlayTimeUpdatedHandler, false, 0, true);

// manage player events
_player.evtMngr.addEventListener(SephPlayerEvent.CLICK_THROUGH, onPlayerClickedThroughHandler, false, 0, true);
_player.evtMngr.addEventListener(SephPlayerEvent.GO_FULL_SCREEN, onGoFullScreenHandler, false, 0, true);
_player.evtMngr.addEventListener(SephPlayerEvent.GO_NORMAL_SCREEN, onGoNormalScreenHandler, false, 0, true);
_player.evtMngr.addEventListener(SephPlayerEvent.MUTE, onPlayerMuteHandler, false, 0, true);
_player.evtMngr.addEventListener(SephPlayerEvent.UNMUTE, onPlayerUnmuteHandler, false, 0, true);
_player.evtMngr.addEventListener(SephPlayerEvent.PLAY, onPlayerPlayHandler, false, 0, true);
_player.evtMngr.addEventListener(SephPlayerEvent.PAUSE, onPlayerPauseHandler, false, 0, true);
_player.evtMngr.addEventListener(SephPlayerEvent.RESIZE, onPlayerResizeHandler, false, 0, true);

_vastCtrl.addEventListener(TemplateEvent.LOADED, onTemplateLoaded, false, 0, true);
_vastCtrl.addEventListener(TemplateEvent.LOAD_FAILED, onTemplateLoadError, false, 0, true);
_vastCtrl.load();

(in the handler functions, I did nothing much regarding AdNotice or ClickSign - actually I didn't know what else I could do)

Well, but I think for now I'll take some time and look back at my code first before asking for more advices.. I've troubled you enough for the day I guess (:D). If things still won't sink in after a while, I'm sure I'll email you the URL to the test page of my OVA plugin!

Oh and Paul, allow me to express my deep gratitudes for your help! I have a feeling my issue will soon be resolved, and even though it still doesn't work now, I feel much more confident knowing that I'm not alone :D

Reply

So the thing is, you are completely right - it shouldn't require anything else to get that notice showing properly...

I must admit, I'm a bit confused as to why your config isn't being used... and the default taken...

I do have one far fetched theory though.. how are you reading in the JSON config when you start up?

e.g. how is the "vastConf" variable being set?

I wonder if the JSON parser you are using is having a problem with the content of that "message" variable when parsing it in... ?

The only way the default could be taken is if the "message" value is null...

Paul

Reply

Oh oh oh... now that you mentioned it.. I don't remember using any special mechanism to parse the JSON data and put it to the Flash environment. All I did was to use ExternalInterface to load my OVA plugin into my player, and while doing so, also passing the whole JSON object from JavaScript to Flash.

In my player, this is basically how I load the config:

// this.config is the raw Config passed into Flash from a JavaScript function registered with
// ExternalInterface.addCallback()

var vastConf:Config = new Config(this.config, null);
_vastCtrl.initialise(vastConf, false, null);

In doing so, I could manage loading and running Ads normally, so I never questioned the way I load my JSON configuration!

Now that when I look at that piece of code, I notice I did NOT put any ConfigLoadListener in either line. I assumed my config, being generated in JavaScript, could be loaded into and parsed instantly by Flash, without me having to listen to the Config Load Complete event (which is only needed when loading config from an external text / xml file? :D)

After submitting this post, I will try to edit my code so that it listens to the Config Load Complete event first, then do all the initialization. I'll let you know the result later!

Oh and another thing: I am aware of using Adobe's AS3lib JSON.decode() stuff to parse a JSON String into an equivalent AS3 Object; but the thing is, I could not make it work well in Internet Explorer. I can create the JSON object, use JSON.stringify() to turn it into a String, then pass it to Flash for use with JSON.decode(). This works great with Firefox and Google Chrome, but I always get an "Unexpected end of input" error in IE. Anyway... that's another topic isn't it? :)

Reply

Hi Paul,

I already did as I said in the previous post, but it didn't work either.

I think my problem is here, precisely: the OVA framework recognizes and parses my config properly, but it fails to display the Ad Notice message in an html-formatted manner.

You know, I could get the Ad Notice do display my custom message (great!), but then it doesn't understand the font-family, the color, and the html tags that I put in, meanwhile I can still alter the backgroundColor, the padding, etc. of the region. Oh and it does understand "&lt;" as "<"!

Really weird...

Reply

Gosh, so we've made no progress :(

(posting this reply across multiple posts to get around the SPAM filter which seems broken at the moment)

Ok, can you post the debug that comes up when your OVA instance initialises. Specifically the debug messages around the ad notice.

With your config running with OVA for JW5, I see the following debug messages:

08:02:47 GMT+0000: Creating region with ID adNotice
08:02:47 GMT+0000: Arranging text (Main content will run in _countdown_ seconds. ) to sit at X:5 Y:5 height:64 width:100
08:02:47 GMT+0000: Set region HTML to <p class="adNoticeText" align="center">Main content will run in _countdown_ seconds.</p>
08:02:47 GMT+0000: Region width is defined as a number 660 for region adNotice
08:02:47 GMT+0000: Arranging text (Main content will run in _countdown_ seconds. ) to sit at X:5 Y:5 height:19 width:650
08:02:47 GMT+0000: Region height is defined as a number 30 for region adNotice
08:02:47 GMT+0000: Arranging text (Main content will run in _countdown_ seconds. ) to sit at X:5 Y:5 height:19 width:650
08:02:47 GMT+0000: Vertical alignment set to 366 for region adNotice
08:02:47 GMT+0000: Horizontal alignment set to 45 for region adNotice
08:02:47 GMT+0000: Arranging text (Main content will run in _countdown_ seconds. ) to sit at X:5 Y:5 height:19 width:650
08:02:47 GMT+0000: Pushing new view onto the stack.
Reply

I've got to say, I'm 100% convinced that this is a JSON parsing issue. It has to be something to do with the way that the HTML tags are being formatted when being passed as a String into the AdNoticeConfig object.

The key debug line for me is:

08:02:47 GMT+0000: Set region HTML to <p class="adNoticeText" align="center">Main content will run in _countdown_ seconds.</p>

I'd love to know what your debug says in that line... if it's the same, then I'll be really shocked/confused :O

Reply

On the Ad Click through message - does your VAST linear ad have a click through URL specified on it in the OpenX response - that could explain why you aren't seeing the click through message? No click through is set if their isn't a click through URL...

For example, set your debug to include "vast_template" as a debug level and look at the debug. You should see something like this in your VAST response:

<VideoClicks>
<ClickThrough>
<URL id="destination">
<![CDATA[http://openx.openvideoads.org/openx-2.8.2/www/delivery/ck.php?oaparams=2__bannerid=23__zoneid=5__cb=f4aa154252__oadest=http%3A%2F%2Fwww.countrylifebutter.co.uk]]>
</URL>
</ClickThrough>
</VideoClicks>

Just wondering if that's the issue...

Paul.

Reply

Hi Paul,

I'm so sorry about the late reply. And also, wish you a very happy new year!

As for our on-going discussion over my issues, here's the VAST response I got, specifically for the "Click-through" segment:

<VideoClicks> <ClickThrough> <URL id="destination"><![CDATA[http://127.0.0.1/openx/www/delivery/ck.php?oaparams=2__bannerid=3__zoneid=2__cb=b541952c58__oadest=http%3A%2F%2Fhtc.com]]></URL> </ClickThrough> </VideoClicks>

As for the problems regarding "AdNotice", I have found out where I was wrong! It turns out the string I passed into the "message" config was parsed directly "as is", meaning, if I put in "&lt;", it then interprets into an actual "<" bracket. It seems like my JSON Parser just doesn't treat these special html characters any different than ordinary strings. Only when they got passed into Flash TextField are they "decoded" properly!

So, that solves the AdNotice issue. Thank you for your kind and informative advices! :)

By the way there's this little thing I'd love to be clear.. This involves using another font-family in my AdNotice messages. Do you think it would be possible? (Since I tried setting font-family in the "style" config but in vain)

Reply

Ok, so you have a click through URL in there - that's good.

It should just enable.

Here are a couple of things to try to help work out what's happening:

1. Turn on the "mouse_events" debug level - e.g. set the debug to:

"levels": "fatal, config, vast_template, display_events, mouse_events"

2. Play the ad, mouse over the screen - if the click notice region is active, you should see the following debug appear:

18:15:26 GMT+0000: ClickableMouseOverOverlayView: MOUSE OVER!
18:15:27 GMT+0000: ClickableMouseOverOverlayView: MOUSE OUT!

3. You should also see this debug line appear if you have the "display_events" debug level set:

18:15:26 GMT+0000: Enabling linear ad mouse over region

Do you see these things?

Paul

Reply

Hi Paul,

Since you mentioned the mouse_events, I realized I hadn't listened to MOUSE_OVER and MOUSE_OUT events in my OVA plugin (well, what a shame).

So, here's what I added to my OVA Plugin:

protected function onPlayerMouseOverHandler(event:Event):void {
_vastCtrl.enableVisualLinearAdClickThroughCue(this.getCurrentActiveSlot());
}

protected function onPlayerMouseOutHandler(event:Event):void {
_vastCtrl.disableVisualLinearAdClickThroughCue();
}

After I did that, I could finally see my ClickSign show up :) However, it only shows up before the TVC is played. I do receive this debug information:

16:15:20 GMT+0700: ClickableMouseOverOverlayView: MOUSE OVER!
16:15:20 GMT+0700: Enabling linear ad mouse over region
16:15:30 GMT+0700: Disabling linear ad mouse over region
16:15:30 GMT+0700: ClickableMouseOverOverlayView: MOUSE OUT!

After I click "play", my debug looks like this:

16:15:55 GMT+0700: Disabling linear ad mouse over region
16:15:55 GMT+0700: Enabling linear ad mouse over region
16:15:55 GMT+0700: Disabling linear ad mouse over region
16:15:55 GMT+0700: Enabling linear ad mouse over region

Those respond to my MOUSE_OVER and MOUSE_OUT events, but there's no more of the "ClickableMouseOverOverlayView" things... I wonder if I listened to the wrong events somewhere...

Reply

Hey, so first of all, remove that onPlayerMouseOverHandler() code that you inserted. That's going to screw things up. The VAST framework sets up the mouse listeners itself - you don't need to do that, so just remove that new code.

If you don't have your own mouse listeners in there, what do you see debug wise when you mouse over during the ad? Nothing I assume.

The reason you are starting to see the click sign appear with your new code is that you are forcing it to show.

What's strange is that you have "disabling, enabling, disabling, enabling" all happening at the same time in your debug. But saying that, the last line says "enabling" so the mouse over region should be active.

It's very difficult to debug this for you blind given I can't actually see anything running to get a better handle on what's happening...

Can you also turn on "tracking_events" and "tracking_table" in your debug config... then cut and paste the tracking table from the debug so I can see it - it will look something like:

09:51:02 GMT+0000: Clearing the old tracking table attached to stream null
09:51:02 GMT+0000: Tracking point recorded in table (0:0, pre-roll0) at 0 milliseconds with event label BA (child:false)
09:51:02 GMT+0000: Tracking point recorded in table (0:0, pre-roll0) at 2500 milliseconds with event label 1Q (child:false)
09:51:03 GMT+0000: Tracking point recorded in table (0:0, pre-roll0) at 5000 milliseconds with event label HW (child:false)
09:51:03 GMT+0000: Tracking point recorded in table (0:0, pre-roll0) at 7500 milliseconds with event label 3Q (child:false)
09:51:03 GMT+0000: Tracking point recorded in table (0:0, pre-roll0) at 0 milliseconds with event label SN (child:false)
09:51:03 GMT+0000: Tracking point recorded in table (0:0, pre-roll0) at 9700 milliseconds with event label HN (child:false)
09:51:03 GMT+0000: Tracking point recorded in table (0:0, pre-roll0) at 9700 milliseconds with event label EA (child:false)

Paul

Reply

Hi Paul,

I'm sorry to wake up this thread again after such a long time, I've been quite up to my ears these past few months. I make this post mainly to confirm that I've somehow fixed all the issues regarding "clickSign" and "adNotice". Apparently there was something wrong with my custom OVA plugin so it didn't catch the events properly.

Thank you for your kind support and once again, thank you all for such a great framework!

Khang

Post new comment

  • Allowed HTML tags: <code> <blockquote> <em> <strong> <strike> <ul> <li> <ol>
  • You may post code using <code>...</code> .
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options