Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var thumbs = [];
- thumbs[0] = {image: './pages/thumbs/images/parijs.png', name: '0'};
- thumbs[1] = {image: './pages/thumbs/images/woonboot.png', name: '1'};
- thumbs[2] = {image: './pages/thumbs/images/egypte.png', name: '2'};
- thumbs[3] = {image: './pages/thumbs/images/pichu.png', name: '3'};
- thumbs[4] = {image: './pages/thumbs/images/londen.png', name: '4'};
- thumbs[5] = {image: './pages/thumbs/images/myanmar.png', name: '5'};
- thumbs[6] = {image: './pages/thumbs/images/athene.png', name: '6'};
- thumbs[7] = {image: './pages/thumbs/images/thailand.png', name: '7'};
- thumbs[8] = {image: './pages/thumbs/images/china.png', name: '8'};
- thumbs[9] = {image: './pages/thumbs/images/india.png', name: '9'};
- thumbs[10] = {image: './pages/thumbs/images/antartica.png', name: '10'};
- thumbs[11] = {image: './pages/thumbs/images/moskou.png', name: '11'};
- thumbs[12] = {image: './pages/thumbs/images/rome.png', name: '12'};
- thumbs[13] = {image: './pages/thumbs/images/barcelona.png', name: '13'};
- thumbs[14] = {image: './pages/thumbs/images/sydney.png', name: '14'};
- thumbs[15] = {image: './pages/thumbs/images/turkije.png', name: '15'};
- thumbs[16] = {image: './pages/thumbs/images/dubai.png', name: '16'};
- thumbs[17] = {image: './pages/thumbs/images/duitsland.png', name: '17'};
- thumbs[18] = {image: './pages/thumbs/images/sahara.png', name: '18'};
- thumbs[19] = {image: './pages/thumbs/images/amerika.png', name: '19'};
- thumbs[20] = {image: './pages/thumbs/images/scandinavie.png', name: '20'};
- thumbs[21] = {image: './pages/thumbs/images/holland.png', name: '21'};
- thumbs[22] = {image: './pages/thumbs/images/italie.png', name: '22'};
- var win1 = Titanium.UI.createWindow({
- backgroundImage: pages[0],
- orientationModes : [
- Titanium.UI.LANDSCAPE_LEFT,
- Titanium.UI.LANDSCAPE_RIGHT
- ]
- });
- var pageBut = Titanium.UI.createImageView({
- image: "./UIelements/pageBut.png",
- width: 56,
- height: 46,
- bottom: 0,
- left: 150
- });
- var scrollView = Titanium.UI.createScrollView({
- contentWidth: '3200',
- contentHeight: 140,
- backgroundImage: "./UIelements/pagesOver-bg.png",
- width: 1024,
- height: 150,
- bottom: -150,
- showVerticalScrollIndicator:false,
- showHorizontalScrollIndicator:false,
- zIndex: 8,
- opacity: 1
- });
- function open_page(e) {
- //win1.backgroundImage = pages[j];
- Ti.API.info("Yay je hebt op " + imgv.id + " geklikt");
- }
- var viewArr = [];
- for(var j=0;j<thumbs.length;j++) {
- var imgv = Titanium.UI.createImageView({
- image: thumbs[j].image,
- id: thumbs[j].name,
- bottom: 25,
- left: -3050 + viewArr.length * 290
- });
- imgv.addEventListener('click', open_page);
- scrollView.add(viewArr);
- viewArr.push(imgv);
- }
- win1.add(pageBut);
- win1.add(scrollView);
- win1.open();
Add Comment
Please, Sign In to add comment