Moscrif API Docs for: 2012q3
Show:

AdMob Class

Extends Object
Library: ads

The AdMob class encapsulated the Google Ads SDK, the latest generation in Google mobile advertising featuring refined ad formats. This class is available only on iOS or Android.

Methods

this

(
  • adId
  • bannerSize
)

Inherited from Object

Constructs new instance of AdMob object.

Parameters:

  • adId String

    AdMob publisher ID

  • bannerSize Symbol

    Banner size allows you to control banner ad size.

    • #default - typically 320x50
    • #medium - medium rectangle size for the tablets, typically 300x250
    • #full - full banner size for the tablets, typically 468x60
    • #leaderboard - leaderboard size for the tablets. Typically 728x90.
    • #skyscraper - skyscraper size for the tablets. Mediation only. AdMob/Google does not offer this size. Typically 120x600
    • #smartPortrait - an ad size that spans the full width of the application in portrait orientation. The height is typically 50 pixels on an iPhone/iPod UI, and 90 pixels tall on an iPad UI.
    • #smartLandscape - an ad size that spans the full width of the application in landscape orientation. The height is typically 32 pixels on an iPhone/iPod UI, and 90 pixels tall on an iPad UI.

call

(
  • thisObj
  • [p]
)
Object

Inherited from Object

Invokes the function in context of this set to thisObj.

Parameters:

  • thisObj Object
  • [p] Object optional

Returns:

Object:

clone

() Object

Inherited from Object

Makes copy of the object and returns it.

Returns:

Object: Copy of the object

debugShow

(
  • out=console
  • [p]
)
Array

Inherited from Object

Reports class name and list of property name/values of the object. Intended to use for debugging purposes.

Parameters:

  • out=console Stream

    Stream for output, the default is console.

  • [p] Object optional

Returns:

Array: list of members.

eval

(
  • what
  • [namespace]
)

Inherited from Object

Evaluates (interprets) what with context of this equal to the object. If namespace object is given then it is used as global namespace for evaluated code.

Parameters:

  • what String | Stream

    Code to evaluate.

  • [namespace] Object optional

    Object used as global namespace for evaluated code

Example:

var obj = new Object();
obj.number = 3;
obj.eval("number = number*number", obj);
obj.number; // 9

exists

(
  • tag
  • [deep=false]
)
Boolean

Inherited from Object

Checks property by its tag for existence.

Parameters:

  • tag Symbol

    Symbol of the property.

  • [deep=false] Boolean optional

    If deep == true then does deep lookup - in function itself and its chain of classes.

Returns:

hide

()

This method hides ad banner.

propertyAt

(
  • tag
)

Inherited from Object

Does lookup in the object for member/property by its tag. This is a direct equivalent of obj.tag construction. Be patient when using propertyAt in "property undefined handler". It can leads to "Stack overflow" exception, because propertyAt can call "property undefined handler". See also exists functions.

Parameters:

  • tag Symbol

remove

(
  • tag
)
Boolean

Inherited from Object

Removes property of the function by its tag (a.k.a. name).

Parameters:

  • tag Symbol

    Symbol of the property.

Returns:

show

(
  • x
  • y
  • [testing=false]
)

This method creates and shows ad banner at specified position on screen.

Parameters:

  • x Integer

    x coordinate of screen's position.

  • y Integer

    y coordinate of screen's position.

  • [testing=false] Boolean optional

    You have to set to true when testing.

Example:

var adMob = new AdMob("publisher-id");
adMob.show(0, 0);

toString

()

Inherited from Object

Returns string "[object Object]".

valueOf

() Object

Inherited from Object

Returns object itself.

Returns:

Object:

Properties

className

String

Inherited from Object:

Name of the class if object was created as instance of user defined class.

Example:

class Clazz
{
}

var instance = new Clazz();
var obj = { };

// obj has "undefined" className
assert obj.className == undefined;

// instance has "Clazz" className
assert instance.className == "Clazz";

length

Integer

Inherited from Object:

Total number of members this instance contains.