Tutorial: Scrolling Track Titles

In process of making a "minimalist" theme.. had the idea to put the currently playing track on screen.. but some titles were too long.. So I decided to attempt something I've never done before! A scrolling display! How was it done? Read on...

1. Make a base image i.e. 2. Make a 2nd image i.e. 3. Make a text object and assign it the DXPlayer ability - Clip Name

4. Parent the 2nd image to the base image 5. Parent the text object to the 2nd image 6. Get exact width of 2nd image (in this case it's 238 pixels) 7. Insert the following code into your text object:

'Called when the script is executed Sub Object_OnScriptEnter Object.SetTimer 1, 1 Object.Left = 2 'Aligns the text object 2pixels in from parent image End Sub

Sub Object_OnTimer1 If Object.Left + Object.Width <= 236 Then ' Checks when the end of text is lined up with right edge of parent image - 2 Object.SetTimer 4, 2500 ' Pause timer Object.KillTimer 1 Else Object.Left = Object.Left - 1 ' if still not at right edge - carry on moving left End If End Sub

Sub Object_OnTimer3 Object.SetTimer 1, 1 Object.KillTimer 3 End Sub

Sub Object_OnTimer4 Object.SetTimer 2, 1 Object.KillTimer 4 End Sub

Sub Object_OnTimer2 If Object.Left => 2 Then ' Checks the text is back at starting position, 2 pixels in from left edge of parent image Object.SetTimer 3, 2500 Object.KillTimer 2 Else Object.Left = Object.Left + 1 End If End Sub

'Called when the script is terminated Sub Object_OnScriptExit Object.KillTimer 1 End Sub