Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ad.createAdMob [Undefined] #4

Open
joseandro opened this issue Aug 11, 2011 · 0 comments
Open

Ad.createAdMob [Undefined] #4

joseandro opened this issue Aug 11, 2011 · 0 comments

Comments

@joseandro
Copy link

Hi guys,

I am having troubles instancing/using this module.
I am getting the error: "Result of expression 'Ad.createAdMob' [undefined] is not a functino. at app.js (line 24)"
With this code:

// This is a test harness for your module
// You should do something interesting in this harness 
// to test out the module and to provide instructions 
// to users on how to use it by example.


// open a single window
var win = Ti.UI.createWindow({
  backgroundColor: '#0000ff'
});

var Ad = require('jp.masuidrive.ti.admob');
var admob = Ad.createAdMob({
    test: true,
    publisher: "Your Publisher ID", // required
    top: ( 460 - 48 ) / 2,
    left: 0,
    width: 320, // required
    height: 48, // required
    backgroundColor: "#ffffff",
    adBackgroundColor: "#ffffff",
    primaryTextColor: "#000000",
    secondaryTextColor: "#000000",
    refresh: 30.0
});

admob.addEventListener('error', function(error) {
    alert(error.message);
    win.remove(admob);
});

win.add(admob);
win.open();

Do you have any idea of what is happening?
I have cleaned the build folder, compiled many times in many different ways, but nothing solved the problem.

My best.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant