Guest User

Untitled

a guest
Aug 18th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.06 KB | None | 0 0
  1. var tutorial = Titanium.UI.createButton({
  2.  
  3. background:'#000000',
  4. backgroundImage:'tutorial.png',
  5. height:'24',
  6. width:'173',
  7. top:40,
  8. left:85
  9.  
  10. });
  11.  
  12. win1.add(tutorial);
  13.  
  14. tutorial.addEventListener('click',function(e){
  15.  
  16.  
  17. var view1 = Titanium.UI.createView({
  18. top: 12,
  19. left: 10,
  20. width: '300',
  21. height: '220',
  22. backgroundColor:'#000',
  23. backgroundImage:'1.png',
  24. touchEnabled:true
  25. });
  26. var view2 = Titanium.UI.createView({
  27. top: 12,
  28. left: 10,
  29. width: '300',
  30. height: '220',
  31. backgroundColor:'#000',
  32. backgroundImage:'2.png',
  33. touchEnabled:true
  34. });
  35. var view3 = Titanium.UI.createView({
  36. top: 12,
  37. left: 10,
  38. width: '300',
  39. height: '220',
  40. backgroundColor:'#000',
  41. backgroundImage:'3.png',
  42. touchEnabled:true
  43. });
  44.  
  45. var view4 = Titanium.UI.createView({
  46. top: 12,
  47. left: 10,
  48. width: '300',
  49. height: '220',
  50. backgroundColor:'#000',
  51. backgroundImage:'4.png',
  52. touchEnabled:true
  53. });
  54.  
  55. var view5 = Titanium.UI.createView({
  56. top: 12,
  57. left: 10,
  58. width: '300',
  59. height: '220',
  60. backgroundColor:'#000',
  61. backgroundImage:'5.png',
  62. touchEnabled:true
  63. });
  64.  
  65. var scrollView1 = Titanium.UI.createScrollableView({
  66. views:[view1,view2,view3,view4,view5],
  67. top: 12,
  68. left: 10,
  69. width: '300',
  70. height: '220',
  71. touchEnabled:true,
  72. showPagingControl:false
  73. });
  74.  
  75. function doClick(e) {
  76. var rightbutton = e.view;
  77. };
  78.  
  79.  
  80. var right = Titanium.UI.createButton({
  81. image:'arrowright.png',
  82. left: 250,
  83. top:185,
  84. width: 30,
  85. height:30
  86. })
  87.  
  88. var left = Titanium.UI.createButton({
  89. image:'arrowleft.png',
  90. left: 20,
  91. top:185,
  92. width: 30,
  93. height:30
  94. })
  95.  
  96. right.addEventListener('click', function(e)
  97. {
  98. scrollView1 = e.view
  99. });
Add Comment
Please, Sign In to add comment