Skip to content

Instantly share code, notes, and snippets.

@dasher
Created June 29, 2010 21:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dasher/457877 to your computer and use it in GitHub Desktop.
Save dasher/457877 to your computer and use it in GitHub Desktop.
// this sets the background color of the master UIView (when there are no windows/tab groups on it)
Titanium.UI.setBackgroundColor('#000');
//
// create root window
var win = Titanium.UI.createWindow({
backgroundColor:'#F00',
left: 0,
top: 0,
zIndex: 0
});
// Create an AdProvider - this allows a single provider to be used for multiple ads
// AdManager allows you to mix & map different Ad Providers
var adProvider = Titanium.AdManager.createProvider({
type: "Smaata", // Extendable - allows dynamic location of new ad providers
properties:{
devMode: false,
publisherID: "xxx",
adSpaceID: "yyy"
}
});
// Create the Ad itself
var displayAd = adProvider.createAd({
left:0,
bottom:5,
width:Titanium.Platform.displayCaps.platformWidth,
zIndex:1,
refreshInterval:30,
keywords: "Holiday, Europe"
});
// Add it to the window Graph
win.add(displayAd);
win.open();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment