Skip to content

Example configuration object

Scott Cummings edited this page Oct 31, 2013 · 7 revisions

The following is an example of a configuration object.

PBS.KIDS.storybook.config = {
background: {
	    color: "#ababab",
	    url: "images/circles-background.png"
    },
    audio: {
	enabled: true,
	path: "http://www.williammalone.com/public/",
	name: "001"	
},
book: {
	font: "Georgia",
	startOnPage: 24,
	pageWidth: 768,
	pageHeight: 1024,
	previousPageButton: {
		url: "images/prev-page-button.png",
		x: 1,
		y: 50,
		width: "50px",
		height: "50px"
	},
	nextPageButton: {
		url: "images/next-page-button.png",
		horizontalAlign: "RIGHT",
		x: 1,
		y: 50,
		width: "50px",
		height: "50px"
	},
	pageBackground: {
		color: "#fefefe"
	},
	oddPageBackground: {
		color: "#fdfdfd"
	},
	evenPageBackground: {
		color: "#f9f9f9"
	},
	pageTurnDuration: 1000,
	pageSlideDuration: 200
},
cover: {
	background: {
		url: "images/cover.jpg"
	},
	content: [
		{
			type: "TextArea",
			x: 0,
			y: 25,
			align: "center",
			color: "#222222",
			size: 48,
			font: "Droid Serif",
			text: "Example Storybook"
		},
		{
			type: "Sprite",
			x: 25,
			y: 80,
			numFrames: 10,
			frameDelay: 10,
			loop: true,
			url: "images/ball-roll.png"
		}
	]
},
pages: [
	{
		content: [
			{
				type: "TextArea",
				x: 10,
				y: 30,
				width: 80,
				align: "left",
				color: "#222222",
				size: 28,
				font: "Droid Serif",
				text: "<font='Reenie Beanie'><size=6>T</size></font>his storybook will give examples of the functionality of the Storybook Engine. See the configuration files in the config folder to see how the examples were implemented."
			},
			{
				type: "TextArea",
				x: 0,
				y: 95,
				align: "center",
				color: "#222222",
				size: 18,
				font: "Droid Serif",
				text: "Page 1"
			}
		]
	},
	{
		content: [
			{
				type: "TextArea",
				x: 10,
				y: 15,
				width: 80,
				align: "center",
				color: "#222222",
				size: 24,
				font: "Droid Serif",
				text: "This is an example Text Area."
			},
			{
				type: "TextArea",
				x: 0,
				y: 95,
				width: 100,
				align: "center",
				color: "#222222",
				size: 18,
				font: "Droid Serif",
				text: "Page 2"
			}
		]
	}
]
};
Clone this wiki locally