brianpsmith81
asked on
Dynamically edit embedded Flash with vb.net
Hello, I am attempting to display my Picasa Web Albums on my website using the embedded slideshow and Google's API service. I have them both working separately, but can't figure out how to dynamically reset the "flashvars" property of the embed tag.
I copied the embed tag straight from one of my Picasa Web Albums and it looks like this:
<embed type="application/x-shockw ave-flash" src="http://picasaweb.google.com/s/c/bin/slideshow.swf"
flashvars="host=picasaweb. google.com &captions= 1&noautopl ay=1&RGB=0 x000000&fe ed=http%3A %2F%2Fpica saweb.goog le.com%2Fd ata%2Ffeed %2Fapi%2Fu ser%2F____ _______%2F albumid%2F 5090922892 156473745% 3Fkind%3Dp hoto%26alt %3Drss"
width="800" height="533" ID="embeddedslideshow" runat="server" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>
I also have a dropdownlist which is populated by the API (see code). The value of the dropdownlist is the albumID which is the variable I want to dynamically change in the embed tag whenever a new album is selected from the dropdownlist. I get an error ("'flashvars' is not a member of 'System.Web.UI.HtmlControl s.HtmlGene ricControl '.") if I try to reference the flashvars attribute, is there a way around this or a asp.net server control I can use instead? Thanks!
I copied the embed tag straight from one of my Picasa Web Albums and it looks like this:
<embed type="application/x-shockw
flashvars="host=picasaweb.
width="800" height="533" ID="embeddedslideshow" runat="server" pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>
I also have a dropdownlist which is populated by the API (see code). The value of the dropdownlist is the albumID which is the variable I want to dynamically change in the embed tag whenever a new album is selected from the dropdownlist. I get an error ("'flashvars' is not a member of 'System.Web.UI.HtmlControl
Dim myPicasa As New PicasaService("PicasaBPS")
myPicasa.setUserCredentials("myusername@gmail.com", "mypassword")
Dim username As String = "________"
Dim query As New AlbumQuery(PicasaQuery.CreatePicasaUri(username))
Dim feed As PicasaFeed = myPicasa.Query(query)
For Each entry As PicasaEntry In feed.Entries
Dim albumID As String = Replace(entry.FeedUri.ToString, "http://picasaweb.google.com/data/feed/api/user/_________/albumid/", "")
albumID = Left(albumID, 19)
Response.Write(albumID & " - ")
Dim albumTitle As String = entry.Title.Text
Response.Write(albumTitle & " - ")
Dim ac As New AlbumAccessor(entry)
Dim PhotoQty As String = ac.NumPhotos
Response.Write(ac.NumPhotos & "<br />")
Dim Album As String = albumTitle & " - " & PhotoQty
ddlPicasaAlbums.Items.Add(New ListItem(Album, albumID))
Next
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.