Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
babuhari123
Visitor

How to ShowbusyAnimation?

Hi ,

Can any one tell me how to display ShowBusyAnimation when screen is loading

my problem is when ian requesting server url to load poasterscreen for next page in pagination its taking time to load new data for that i need to disply busy animation in between time how can we do

please tell me............

Thanks in advance
0 Kudos
3 REPLIES 3
destruk
Streaming Star

Re: How to ShowbusyAnimation?


busydialog=CreateObject("roOneLineDialog")
busydialog.SetMessagePort(screen.GetmessagePort())
busydialog.SetTitle("All I do is think and blink.") 'credit from "I dream of Jeannie"
busydialog.ShowBusyAnimation()
busydialog.Show()


When you're done, use busydialog.Close()

If you are wanting to close the busy animation in a different routine, such as a secondary poster screen, the reference needs to be passed to it - for example -

sub....routine....code...
...blah.blah.blah...
busydialog=CreateObject("roOneLineDialog")
busydialog.SetMessagePort(screen.GetmessagePort())
busydialog.SetTitle("All I do is think and blink.") 'credit from "I dream of Jeannie"
busydialog.ShowBusyAnimation()
busydialog.Show()
ShowPosterScreen2(busydialog)
...rest of current subroutine code...
...end sub

Sub ShowPosterScreen2(busydialog=invalid) 'sets default value to invalid, which allows you to call the routine without the busydialog object required
If type(busydialog<>"Invalid") Then busydialog.close() ' best to stick this line in after the new content parsing is complete.
...sub code here...
End Sub
0 Kudos
babuhari123
Visitor

Re: How to ShowbusyAnimation?

Hi thanks for reply
but can u explain clearly how to use it that snippet posted you . i am Anabel to understand that code

Please..
0 Kudos
destruk
Streaming Star

Re: How to ShowbusyAnimation?

When you type this in does anything happen for you?

busydialog=CreateObject("roOneLineDialog") ' creates a dialog box
busydialog.SetMessagePort(screen.GetmessagePort()) 'sets a message port for the dialog box
busydialog.SetTitle("All I do is think and blink.") 'displays a line of text for the dialog box title
busydialog.ShowBusyAnimation() ' enables a spinning animation
busydialog.Show() ' makes the dialog box and busy animation display

busydialog.Close() ' makes the busy animation and dialog box 'go away'

I don't understand how to make it any more clearer. 🙂
You probably don't need a message port, since you're not monitoring any messages for it. And the title can be left blank too if you just want the spinning animation and nothing else.

busydialog=CreateObject("roOneLineDialog") ' creates a dialog box
busydialog.ShowBusyAnimation() ' enables a spinning animation
busydialog.Show() ' makes the dialog box and busy animation display

That should be the minimalist approach.
0 Kudos
Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.