Implementing adchoice for VAST 3.0 Wrapper - vast

I'm trying to add adchoices for VAST 2.0 wrapper using jpeg image using nonlinear element under a creative element in VAST wrapper. I couldnt get it to working from 3 days. Can anybody help me in fixing below code, Below is my code. Thanks in advance.
<NonLinearAds>
<NonLinear height="200" width="300" minSuggestedDuration="00:00:30">
<StaticResource creativeType="image/png">
https://example.com/image.png
</StaticResource>
<NonLinearClickThrough>
https://example.com
</NonLinearClickThrough>
</NonLinear>
</NonLinearAds>
Update:
I'm trying to use icons to display adchoices which are supported in VAST3.0/4.0
here is the below example tag i'm using. According to vast 3.0 documentation here https://www.iab.com/wp-content/uploads/2015/06/VASTv3_0.pdf under 2.4.3.2 section icons are supported by both inline and wrappers but my code is working with inline ads but not working with wrapper ads. Am i doing something wrong. Please help me thanks in advance.
<VAST version="3.0">
<Ad id="602833">
<Wrapper>
<AdSystem>Testing</AdSystem>
<VASTAdTagURI>
<![CDATA[https://vast.inline.url]]>
</VASTAdTagURI>
<Impression>http://myTrackingURL/wrapper/impression</Impression>
<Creatives>
<Creative>
<Linear>
<VideoClicks>
<ClickTracking>http://myTrackingURL/wrapper/click</ClickTracking>
</VideoClicks>
<Icons>
<Icon program="AdChoices" height="15" width="100" xPosition="10" yPosition="20">
<StaticResource creativeType="image/png">
<![CDATA[https://www.amarley.com/skin/frontend/smartwave/porto/images/mini_logo.png.pagespeed.ce.-Dk9UNhwz-.png]]>
</StaticResource>
<IconClicks>
<IconClickThrough>
<![CDATA[
http://example.com/more_info
]]>
</IconClickThrough>
</IconClicks>
</Icon>
</Icons>
</Linear>
</Creative>
</Creatives>
</Wrapper>
</Ad>
</VAST>
I'm using google vast inspector for testing https://developers.google.com/interactive-media-ads/docs/sdks/html5/vastinspector

Related

Android toolbar menu Xamarin Forms custom renderer [NOT RESOLVED]

I am new to custom renderers and can only do basic things like customizing entries, pickers etc. I am really trying to implement an android toolbar menu into my navbar on x.forms and I know I will need to do this through a custom renderer.
I just really do not know where to start. It has proven difficult to find what I need online so I am hoping someone could point me in the right direction.
What I want is something that looks like this:
Which simply drops down and presents a list of options. Thanks in advance.
If you don't need it on iOS then all you need to do is:
<ToolbarItem Title="title" Order="Secondary"/>
If you need it on iOS then even Custom Renderer won't help you.
As lvan said, if you want to implement this like picture, you just add ToolbarItem for ContentPage.
<ContentPage.ToolbarItems>
<ToolbarItem
Name="MenuItem1"
Order="Secondary"
Priority="0"
Text="Item 1" />
<ToolbarItem
Name="MenuItem2"
Order="Secondary"
Priority="1"
Text="Item 2" />
</ContentPage.ToolbarItems>
You don't need to custom render.
You can take a look the following article for more info.
https://xamarinhelp.com/xamarin-forms-toolbar/

palettes of icons in Google Earth (Mac)

(Cross posted from the GE support groups - now defunct?)
Having trouble using the gs:x extensions to use palettes of icons in an icon
group.
I have loaded the appropriate xmlns:gx="http://www.google.com/kml/ext/2.2"
into the kml header but get the message "Unknown type gs:x
on my Macintosh under GE Google Earth 6.0.3.2197
I suspect this has not been implemented on the Mac version - anybody
with experience on this?
Final code was as follows and it fails on the first gx:s line.
It also fails in the same way if I use the now deprecated x (rather than gx:x)
Also, as shown it follows the kml documentation but I think all terminating terms should be of the form /gx:x rather than gx:x/
as shown in the KML reference. Making that change does not help as it never gets to that point anyway.
The header was copied from a GE placemark copied and pasted into the
editor.
Any help appreciated.
Bob J.
<?xml version="1.0" encoding="UTF-8"?>
<kml xmlns="http://www.opengis.net/kml/2.2"
xmlns:gx="http://www.google.com/kml/ext/2.2"
xmlns:kml="http://www.opengis.net/kml/2.2"
xmlns:atom="http://www.w3.org/2005/Atom">
<Document>
<StyleMap id="s_Ic_SP">
<Pair><key>normal</key><styleUrl>#sn_Ic_SP</styleUrl></Pair>
<Pair><key>highlight</key><styleUrl>#sh_Ic_SP</styleUrl></Pair>
</StyleMap>
<Style id="sn_Ic_SP">
<IconStyle>
<scale>1.8</scale>
<Icon>
<href>Icons/Traps.png</href>
<gx:x>0<gx:x/><gx:y>128<gx:y/> <gx:w>64<gx:w/><gx:h>64<gx:h/>
</Icon>
<hotSpot x="32" y="1" xunits="pixels" yunits="pixels"/>
</IconStyle>
<BalloonStyle>
<displayMode>default</displayMode><bgColor>ff00d0ff</bgColor>
<text><![CDATA[<font face="Comic Sans MS" /><table
bgcolor="#ff8000" cellspacing="3" width="160">
<tr bgcolor="#ffff80"><td><b>Sponsor $[name]</b><br/><br/>$
[description]</td></tr></table>]]></text>
</BalloonStyle>
<LabelStyle>
<scale>0.9</scale><color>ff00ffff</color>
</LabelStyle>
<LineStyle><color>ff00ffff</color><width>2.0</width></LineStyle>
<ListStyle>
<ItemIcon>
<href>Icons/Traps.png</href>
<gx:x>0<gx:x/><gx:y>128<gx:y/> <gx:w>64<gx:w/><gx:h>64<gx:h/>
</ItemIcon>
</ListStyle>
</Style>
etc.
Oooops
Seems my problem was a syntax problem
The gx:x set do work correctly. However, they are not operational inside the ItemIcon group as shown in my example. In fact they are ignored in that group.
Thanks for your tolerance of my stupidity
Bob J.

Is it possible to make a marquee using picture?

Im trying to make a layout with a picture which appears to be moving like a marquee? Is it possible? Please help.. thanks...
Yes, you can:
<marquee scrolldelay="100" bgcolor="grey">
<img src="img.png"/>
</marquee>
jsFiddle here
Edit: it works in all modern browers, and even in ie6,7,8
if you just want a moving image....this should suffice :
<marquee behavior="scroll" direction="left"><img src="/pix/smile.gif" width="100" height="100" alt="smile" /></marquee>
Useful link

Flex 4: How to center a component that is larger than its container?

I am using Flex 4 Spark Components for this one.
I have a custom component that is larger than a certain container, and I need it to be centered in that container. Best using only MXML, styles and properties
This does not work as expected:
<s:BorderContainer x="300" y="300" width="200" height="200">
<s:Button label="Not centered" horizontalCenter="0" verticalCenter="0" width="300" height="250"/>
</s:BorderContainer>
Thanks!
Got it.
I noticed that using the whole Application as the Container in the example, the Component would center itself even when larger than the Stage. I cannot use another Application, so I used the next inherited class: SkinnableContainer, instead of BorderContainer, in the above example. It works properly

How to use .svg files in a webpage?

I want to know how can one actually use a .svg file In a web page?
See svgweb quickstart and the svgweb project homepage for something that works in all browsers including IE (requires flash plugin).
There are many ways to include an existing svg file:
<img src="your.svg"/>
<object data="your.svg"/>
<iframe src="your.svg"/>
<embed src="your.svg"/>
<div style="background:url(your.svg)">...</div>
If all you want to do is to place an SVG image such as a logo or static diagram, you just need to be careful to provide a fallback for older versions of Internet Explorer (i.e. versions 8 and earlier).
The best and simplest method I've found is to use a .png or .jpg for your fallback, placed using a normal img tag. You then wrap the img tag in an object tag, using the data attribute to place the SVG.
<object data="/path-to/your-svg-image.svg" type="image/svg+xml">
<img src="/path-to/your-fallback-image.png" />
</object>
The img fallback is only loaded and used if the browser doesn't understand SVG.
I recommend putting the svg inline into your document (html5 technique). Just open your SVG file, copy the SVG tag and everything insideof it and then paste it into your html document.
<html>
<body>
<svg></svg>
</body>
</html>
It has the advantage that this allows you to use css to style it, like changing the fill color or applying filters to it like blur. Another advantage is that you save one http request for fetching the svg file if it is inside of your document.
If you want for example to change its position using css, then you have to put the css inside of a style attribute. Styles that are in an external css file will not get applied in most browser as this is a security restriction. For example:
<svg id="mySVG" style="position: absolute; top: 200px; left: 200px;"></svg>
This technique is supported by all browsers except IE8 and below as well as the android 2.3 browser and below.
Read the chapter inline SVG for further details:
css-tricks.com Using SVG
developer.mozilla.org SVG In HTML Introduction
If you dont want to put it inline in your page then the best alternative seems to be the object tag and avoid using the embed tag.
Read this for further details about object vs embed vs img tag:
How to Add Scalable Vector Graphics to Your Web Page
http://www.w3schools.com/svg/svg_inhtml.asp
The best example:
<embed src="rect.svg" width="300" height="100"
type="image/svg+xml"
pluginspage="http://www.adobe.com/svg/viewer/install/" />
Caspar's approach is the proper one. However, I would move the fallback to the CSS, since you probably want to apply some styles to the svg file itself...
<object data="/path-to/your-svg-image.svg" type="image/svg+xml" class="logo"> </object>
CSS
.no-svg .logo {
width: 99px;
height: 99px;
background-image: url(/path-to/your-png-image.png);
}`
Raphaël—JavaScript Library. Nice javascript library that is using svg, and gives you a large range of effects!
Also supports most browsers, including IE
I'd like to agree with the answer from "code-zoop". Although this technically doesn't answer your question, it might also be a solution: enter the relevant data straight into the HTML. Either directly as an svg element, or by using Raphaël-JS.
From w3c-schools:
SVG is all suported in In Firefox, Internet Explorer 9, Google Chrome,
Opera, and Safari you can
<html>
<body>
<svg xmlns="http://www.w3.org/2000/svg" version="1.1">
<circle cx="100" cy="50" r="40" stroke="black"
stroke-width="2" fill="red"/>
</svg>
</body>
</html>
(end of quote)
And to think even more outside the box, depending on how you want to use it, you can also put your 1-color graphics in a webfont. (see for example iconmoon.io )

Resources