SHARE
TWEET

Untitled

a guest Jan 25th, 2019 101 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. REM  *****  BASIC  *****
  2.  
  3. Dim Direction
  4.  
  5. Dim Pages(15) as Object
  6.  
  7. Sub Main
  8.     Dim Doc as Object
  9.     Dim oSlide as Object
  10.     Dim Present as Object
  11.     Dim Control as Object
  12.     Dim RectangleShape As Object
  13.     Dim Size As New com.sun.star.awt.Size
  14.    
  15.     Direction = 1
  16.    
  17.     oDoc = ThisComponent
  18.     Present = oDoc.Presentation
  19.    
  20.     Dim X
  21.     Dim Y
  22.     X = 1000
  23.     Y = 1000
  24.    
  25.     Size.Width = 500
  26.     Size.Height = 500
  27.    
  28.     Dim Page As Object
  29.     Page = oDoc.DrawPages(0)
  30.     Page.Change = 1
  31.     Page.Duration = 0.4
  32.     Page.TransitionDirection = False
  33.    
  34.     Pages(0) = Page
  35.    
  36.     Dim Offset
  37.     For Offset = 1 To 16
  38.         Dim I
  39.         For I = 1 To 27
  40.             Dim Point As New com.sun.star.awt.Point
  41.             Point.x = X * I
  42.             Point.y = Y * ((I + Offset) MOD 16)
  43.            
  44.             RectangleShape = oDoc.createInstance("com.sun.star.drawing.RectangleShape")
  45.             RectangleShape.Size = Size
  46.             RectangleShape.Position = Point
  47.            
  48.             Page.add(RectangleShape)
  49.         Next I
  50.        
  51.         If Offset < 16 Then
  52.             Page = oDoc.Drawpages.insertNewByIndex(Offset)
  53.             Page.Change = 1
  54.             Page.Duration = 0.4
  55.             Page.TransitionDirection = False
  56.             Page.Name = "Frame" + Offset
  57.            
  58.             Pages(Offset) = Page
  59.         End If
  60.     Next Offset
  61.    
  62.     Present.Start
  63.  
  64. End Sub
  65.  
  66. Sub ChangeDir
  67.     If Direction = 1 Then
  68.         Direction = 0
  69.     Else
  70.         Direction = 1
  71.     EndIf
  72.    
  73.     For Offset = 1 To 16
  74.         Pages(0).Duration = 0.8
  75.     Next Offset
  76. End Sub
  77.  
  78. Sub Listener_mousePressed(oMouseEvent) As Boolean
  79.     If Direction = 1 Then
  80.         Direction = 0
  81.     Else
  82.         Direction = 1
  83.     EndIf
  84.    
  85.     For Offset = 1 To 16
  86.         Pages(0).Duration = 0.8
  87.     Next Offset
  88. End Sub
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top