nestenius
03-27-2009, 07:11 AM
I've a flash file which takes the input (such as songs path and picture path) from xml file and plays music and shows slide show in a flash banner. But the songs and pictures are not being refreshed even if I modify, add or delete the path.Even if i clear the browser cache, it doesn't work.
There are couple of problems which i'm facing right now:
1. The flash file loads the content, plays music and slide shows (means works fine) when I play the .fla file from Adobe Flash CS3 Professional. However, it doesn't update anything when I embed .swf file to my aspx page and run in the localhost.
2. The same .swf file runs fine when I run it independently ( without embedding to .aspx file)
I'm currently running the project on IIS7 in Vista. The mime types .swf and .flv are already there.
Here's the XML file snippet:
<maindata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SlideShow>
<Slide>
<Image>/Flash_Data/ArtistImages/Jake_ooOh.jpg</Image>
<Body>Den 11 oktober gästar festivalen Fryshusets två scener i Stockholm. Biljetterna finns ute nu. </Body>
<Link />
<Heading1 isactive="Yes">Rockstar Taste Of Chaos_Jan</Heading1>
</Slide>
</SlideShow>
<Songs>
<Song>
<SongID>5</SongID>
<ArtistImage>/Flash_Data/ArtistImages/Freja_32.jpg</ArtistImage>
<ArtistName>Freja</ArtistName>
<Mp3>/Flash_Data/Songs/It's_My_Radio_MASTER081209.mp3</Mp3>
<TotalUsers>0</TotalUsers>
<TotalStars>0</TotalStars>
<Rating>5</Rating>
<Plays>632</Plays>
<SongName isactive="Yes">Its My Radio</SongName>
</Song>
</Songs>
</maindata>
And here's how i embed the flash file to .aspx page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head id="Head1" runat="server">
<script language="javascript" type="text/javascript" src="javascripts/swfobject.js" ></script>
</head>
<body id="master_body" runat="server">
<form id="form1" runat="server">
<div id="banner1" class="banner">
<noscript>
<img src='Images/FiketBanner.jpg' alt='Flash Banner' />
</noscript>
</div>
<script language="javascript" type="text/javascript">
var so = new SWFObject("Images/fiket.swf", "mymovie", "1171", "289", "8", "#336699");
so.addParam("wmode", "transparent");
so.addVariable("xmlfile", "http://localhost/MyProject/Xml/MainFile.xml");
so.addVariable("reporturl", "http://localhost/MyProject/FlashData//Reportdata.aspx");
so.write("banner1");
</script>
</form>
</body>
</html>
There are couple of problems which i'm facing right now:
1. The flash file loads the content, plays music and slide shows (means works fine) when I play the .fla file from Adobe Flash CS3 Professional. However, it doesn't update anything when I embed .swf file to my aspx page and run in the localhost.
2. The same .swf file runs fine when I run it independently ( without embedding to .aspx file)
I'm currently running the project on IIS7 in Vista. The mime types .swf and .flv are already there.
Here's the XML file snippet:
<maindata xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<SlideShow>
<Slide>
<Image>/Flash_Data/ArtistImages/Jake_ooOh.jpg</Image>
<Body>Den 11 oktober gästar festivalen Fryshusets två scener i Stockholm. Biljetterna finns ute nu. </Body>
<Link />
<Heading1 isactive="Yes">Rockstar Taste Of Chaos_Jan</Heading1>
</Slide>
</SlideShow>
<Songs>
<Song>
<SongID>5</SongID>
<ArtistImage>/Flash_Data/ArtistImages/Freja_32.jpg</ArtistImage>
<ArtistName>Freja</ArtistName>
<Mp3>/Flash_Data/Songs/It's_My_Radio_MASTER081209.mp3</Mp3>
<TotalUsers>0</TotalUsers>
<TotalStars>0</TotalStars>
<Rating>5</Rating>
<Plays>632</Plays>
<SongName isactive="Yes">Its My Radio</SongName>
</Song>
</Songs>
</maindata>
And here's how i embed the flash file to .aspx page:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head id="Head1" runat="server">
<script language="javascript" type="text/javascript" src="javascripts/swfobject.js" ></script>
</head>
<body id="master_body" runat="server">
<form id="form1" runat="server">
<div id="banner1" class="banner">
<noscript>
<img src='Images/FiketBanner.jpg' alt='Flash Banner' />
</noscript>
</div>
<script language="javascript" type="text/javascript">
var so = new SWFObject("Images/fiket.swf", "mymovie", "1171", "289", "8", "#336699");
so.addParam("wmode", "transparent");
so.addVariable("xmlfile", "http://localhost/MyProject/Xml/MainFile.xml");
so.addVariable("reporturl", "http://localhost/MyProject/FlashData//Reportdata.aspx");
so.write("banner1");
</script>
</form>
</body>
</html>