Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts

    How to refresh contents loaded in .swf file in web page?

    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>

  • #2
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    I bet it has to do with improper linking, can you trace that the correct filenames that are generated by Flash?

    Also try putting the full URL in the xml to be 100% sure.
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.

  • #3
    New to the CF scene
    Join Date
    Mar 2009
    Posts
    2
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by jeremywilken View Post
    I bet it has to do with improper linking, can you trace that the correct filenames that are generated by Flash?

    Also try putting the full URL in the xml to be 100% sure.
    -The links can be accessed easily so there're no improper linking.What is full URL?? Do you want me to use the physical url instead??

  • #4
    New to the CF scene
    Join Date
    May 2009
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    nestenius

    I am also facing the same problem. I am reading the contents of an xml file and updating the flash according to that. But the when I embed this flash file into an aspx page the flash contents are not getting updated even though the xml file is being updated. I have tried clearing the cache but still the problem exists. Can you please help me if you have found a solution to this problem?

    Thanks,
    shara321

  • #5
    Senior Coder gnomeontherun's Avatar
    Join Date
    Sep 2007
    Location
    Houston
    Posts
    2,846
    Thanks
    10
    Thanked 238 Times in 229 Posts
    Well so far without any actionscript code I can't really help. There are a lot of potential problems with it, and my suggestion is to make sure 1) that the file names are loaded by tracing them after load and then 2) making sure an update function is being called.

    If you can post more information I might be able to be more helpful.
    jeremy - gnomeontherun
    Educated questions often get educated answers, and simple questions often get simple answers.


  •  

    Tags for this Thread

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •