Forum Discussion

EngoTom's avatar
EngoTom
Visitor
15 years ago

Advertisment image sizes

Does anyone know what the ad image sizes are for the banner ads?

sd_img and hd_img

Does the HD image scale to SD if I use the same image?

Couldn't find it in the docs

THX

Tom
  • It's in the docs, but:

    728x90 for HD and 540x60 for SD.

    As with other graphics on the TV screen, RGB values should be between 16 and 235 for each color (ie black is 16,16,16 and white is 235,235,235)
  • I never could get the banners to work in mine...

    could it be because of the size patrick?
  • Ad banners only work with roPosterScreens that are set to "flat-category":


    screen = CreateObject("roPosterScreen")
    screen.SetListStyle("flat-category")
    screen.SetAdURL("<YourUrl>")


    --Kevin
  • Kevin when i do exactly as you have put here i just get a error

    Current Function:
    011: Function preShowPosterScreen(breadA=invalid, breadB=invalid) As Object
    012:
    013: if validateParam(breadA, "roString", "preShowPosterScreen", true) = fal
    se return -1
    014: if validateParam(breadB, "roString", "preShowPosterScreen", true) = fal
    se return -1
    015:
    016: port=CreateObject("roMessagePort")
    017: screen = CreateObject("roPosterScreen")
    018: screen.SetMessagePort(port)
    019: if breadA<>invalid and breadB<>invalid then
    020: screen.SetBreadcrumbText(breadA, breadB)
    021: end if
    022:
    023: screen.SetListStyle("flat-category")
    024: screen.SetAdURL("http://www.puresilvabannermaker.com/bannermaker/backgr
    oundthumbs/scale_summersun5.jpg")
    025: return screen
    026:
    027: End Function
    /tmp/plugin/FGAAAAOTEovi/pkg:/source/appPosterScreen.brs(24): runtime error f4:
    Member function not found in BrightScript Component or interface.

    024: screen.SetAdURL("http://www.puresilvabannermaker.com/bannermaker/backgr
    oundthumbs/scale_summersun5.jpg")


    I just grabbed a random banner of the web for testing and this is what happened.
  • If you take a look at the Component Reference document, SetAdURL() expects 2 parameters, one to an SD banner and one to an HD banner. You're only passing it one of those. It also calls out the sizes for both:

    Void SetAdURL(String sdAdURL, String hdAdURL)
     Set the URL of the banner ad image to be displayed on the poster screen. This is currently only valid for the “flat-category” style of poster screen. Banner ad sizes are as follows:
    Banner Ad HD = 728x90 Banner Ad SD = 540x60
  • Thanks Chris, so if the image is wrong as well they wont appear?

    I will change that in a few minutes.

    edit: never mind i got it, thanks Chris. now will get the right size banners in there
  • destruk's avatar
    destruk
    Streaming Star
    Two strings are required. You have one set of quotes around both, rather than individually. Also Void isn't an allowed keyword in the instance, you would use your component followed by a period like every other property in the SDK. (usually screen.something) It also doesn't go into your XML - the setadurl line goes into your script itself that is compiled and executed. And finally, please don't reply to threads that are more than a year old - make a new thread.