tipps for animation script?

hi everybody

i've got a problem with my animation. i created a png with 18 frames, which works fine for a normal animation in a loop with 100ms per frame.

but now i'd need to show some frames longer than others, so i guess i'll need to make a scripted animation, but i don't have a clue how that works...

could you help/tell me how such a script is made?

actually i want to show every frame for 100ms exept for frames 1, 7 and 13, which should be shown for 5000 ms.

thanks a lot!
3,043 views 3 replies
Reply #1 Top
while you're waiting for the scripting help:


duplicate frames 1, 7 & 13 49 more times so you have 50 frames each - run the animation at your 100ms
Reply #2 Top
i thought of that too, but since every frame is 1000 pixels wide it is imposbile to do so...corel draw cant make documents with a width greater than 30'000 pixels

but i made another animation for the time, now lets see if there is a possibility to delay animations...
Reply #3 Top
I think this might work for you, aspa. Be sure static is unchecked, and scripted is checked in the animation tab. Also, change the 'numofFrames' variable to your total amount of frames.

Code: vbscript
  1. Dim t, numofFrames
  2. Sub Object_OnScriptEnter
  3. 'Set timer, current frame and variables
  4. object.settimer 1,100
  5. object.currentframe = 0
  6. t = 0
  7. numofFrames = 50
  8. End Sub
  9. Sub Object_OnTimer1
  10. 'If animation reaches the end, kill timer
  11. If t = numofFrames Then
  12. object.KillTimer 1
  13. 'Else add one to frames count
  14. Else
  15. t = t + 1
  16. End If
  17. 'Set current frame
  18. object.currentframe = t
  19. 'If on specific frame, kill timer
  20. 'Set delay timer
  21. Select Case t
  22. Case 1,7,13,49
  23. object.killtimer 1
  24. object.settimer 2,5000
  25. End Select
  26. End Sub
  27. Sub Object_OnTimer2
  28. object.killtimer 2
  29. object.settimer 1,100
  30. End Sub