Skip to content

Instantly share code, notes, and snippets.

@foofoodog
Created November 27, 2010 17:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save foofoodog/718114 to your computer and use it in GitHub Desktop.
Save foofoodog/718114 to your computer and use it in GitHub Desktop.
GraphicsWindow.Title = "http://www.gotostcroix.com/live/harborcam.php"
url = "http://images.earthcam.com/affiliates/mmstcroix.jpg"
GraphicsWindow.Width = 640
GraphicsWindow.Height = 480
delay = 5000
oldImg = Shapes.AddImage(ImageList.LoadImage(url))
counter = 1 ' have to change url or silverlight caches the image
While "True"
newImg = Shapes.AddImage(ImageList.LoadImage(url + "?nc=" + counter))
Shapes.Move(newImg, 0, GraphicsWindow.Height + ImageList.GetHeightOfImage(newImg))
Program.Delay(delay - delay / 5)
Shapes.Animate(oldImg,0, -GraphicsWindow.Height, delay / 10)
Shapes.Animate(newImg, 0, 0, delay / 10)
Program.Delay(delay / 10)
Shapes.Remove(oldImg)
oldImg = newImg
counter = counter + 1
EndWhile
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment