NewbyDeveloper
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2015
11:39 AM
SlideShow Example Anywhere?
Hi
As part of an app I'm writing I want to show a slideshow of user pictures.
I can see the commands ifSlideshow mentioned - with setcontent - etc.
But an example would allow me to understand it.
Is there a simple example anywhere that uses this command?
Thanks
As part of an app I'm writing I want to show a slideshow of user pictures.
I can see the commands ifSlideshow mentioned - with setcontent - etc.
But an example would allow me to understand it.
Is there a simple example anywhere that uses this command?
Thanks
9 REPLIES 9
belltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2015
01:02 PM
Re: SlideShow Example Anywhere?
NewbyDeveloper
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2015
02:04 AM
Re: SlideShow Example Anywhere?
Many thanks - I will check that out.
NewbyDeveloper
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2015
04:08 AM
Re: SlideShow Example Anywhere?
Also...rather than a full blown slide show facility - is there a simple bit of code that will just take a url to a JPEG/JPG/PNG/GIF and display it on the screen until the user presses OK or back button?
belltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2015
10:40 AM
Re: SlideShow Example Anywhere?
Sub Main ()
displayImage ("http://www.welikeviral.com/files/2014/12/8325_8_site.jpeg")
End Sub
Function displayImage (imageUrl As String) As Void
port = CreateObject ("roMessagePort")
ui = CreateObject ("roImageCanvas")
ui.SetMessagePort (port)
ui.SetRequireAllImagesToDraw (True)
ui.SetLayer (1, {Url: imageUrl})
ui.Show ()
While True
msg = Wait (0, port)
If Type (msg) = "roImageCanvasEvent"
If msg.IsScreenClosed ()
Exit While
Else If msg.IsRemoteKeyPressed ()
key = msg.GetIndex ()
If key = 0 ' Back Button
ui.Close ()
Else If key = 6 ' OK Button
ui.Close ()
EndIf
EndIf
EndIf
End While
End Function
belltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-28-2015
11:27 AM
Re: SlideShow Example Anywhere?
Or this:
Sub Main ()
displaySlideShow ([{Url: "http://www.welikeviral.com/files/2014/12/8325_8_site.jpeg"}])
End Sub
Function displaySlideShow (contentList As Object) As Void
port = CreateObject ("roMessagePort")
ui = CreateObject ("roSlideShow")
ui.SetMessagePort (port)
ui.SetContentList (contentList)
ui.Show ()
While True
msg = Wait (0, port)
If Type (msg) = "roSlideShowEvent"
If msg.IsScreenClosed ()
Exit While
Else If msg.IsRemoteKeyPressed ()
key = msg.GetIndex ()
If key = 0 ' Back Button
ui.Close ()
Else If key = 6 ' OK Button
ui.Close ()
EndIf
EndIf
EndIf
End While
End Function
NewbyDeveloper
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-01-2015
05:25 AM
Re: SlideShow Example Anywhere?
Thanks so much.
NewbyDeveloper
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2015
12:37 AM
Re: SlideShow Example Anywhere?
Thanks again - another question...
With the ("roSlideShow") example - I see you passing across the url to the jpeg...
and I've looked at the documentation online - but non the wiser....
How do you pass across an array of files to let the slide show show all those images one after the other?
With the ("roSlideShow") example - I see you passing across the url to the jpeg...
and I've looked at the documentation online - but non the wiser....
How do you pass across an array of files to let the slide show show all those images one after the other?
belltown
Roku Guru
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-04-2015
01:07 AM
Re: SlideShow Example Anywhere?
"NewbyDeveloper" wrote:
Thanks again - another question...
With the ("roSlideShow") example - I see you passing across the url to the jpeg...
and I've looked at the documentation online - but non the wiser....
How do you pass across an array of files to let the slide show show all those images one after the other?
I'm actually passing an array of urls, hence the square brackets,[ ], around the url list.The list just happens to contain only one item, but could have been written like this, for example:
displaySlideShow ([
{Url: "http://www.welikeviral.com/files/2014/12/8325_8_site.jpeg"}
{Url: "http://www.welikeviral.com/files/2015/01/Hide-And-Seek-3.jpg"}
{Url: "http://www.welikeviral.com/files/2015/01/Hide-And-Seek-5.jpg"}
])
Or this:
contentList = []
contentList.Push ({Url: "http://www.welikeviral.com/files/2014/12/8325_8_site.jpeg"})
contentList.Push ({Url: "http://www.welikeviral.com/files/2015/01/Hide-And-Seek-3.jpg"})
contentList.Push ({Url: "http://www.welikeviral.com/files/2015/01/Hide-And-Seek-5.jpg"})
displaySlideShow (contentList)
NewbyDeveloper
Visitor
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-08-2015
08:49 AM
Re: SlideShow Example Anywhere?
That's brilliant. Thanks.