Skip to main content
September 20, 2009
Question

Embeded SWF often is not loading in Firefox

  • September 20, 2009
  • 2 replies
  • 2939 views

I get the datas for my swf-file from a php file: input.php (see code below).

The player code in the index.php is :

<div id="projectcontainer">   
<script type="text/javascript">
AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0 ,19,0','width','730','height','550','title','Ritzen','src','player','quality','high','pluginspage','http://www.macromedia.com/go/getflashplayer','movie','player' ); //end AC code
</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0 ,19,0" width="730" height="550" title="NameTitle">
      <param name="movie" value="player.swf" />
      <param name="quality" value="high" />
      <embed src="player.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="730" height="550"></embed>
    </object></noscript>
</div>



Now happens that the flash-movie sometimes is not loading. Status bar: "Transferring data from www.etc.com ...".

Then after some time of refreshing it does load.Status bar: "Read www.etc.com"

It only happens in Firefox (Mac and PC).

Thanx for any further help

<?PHP

$link = mysql_connect("host","user","password");
mysql_select_db("db");

$query = 'SELECT * FROM home WHERE extension = "image/jpeg" OR extension = "flash/flv" OR extension = "flash/swf"';
$results = mysql_query($query);

echo "<rss version=\"2.0\">\n";
echo "\t<channel>\n";
echo "\t\t<title></title>\n";
echo "\t\t<link></link>\n";
echo "\t\t<description>etc.com</description>\n";
echo "\t\t<language>nl</language>\n";
echo "\t\t<docs>http://blogs.law.harvard.edu/tech/rss</docs>\n";
echo "\t\t<generator>etc</generator>\n";
echo "\t\t<managingEditor>info@etc.com</managingEditor>\n";
echo "\t\t<webMaster>webmaster@etc.com</webMaster>\n";


while($line = mysql_fetch_assoc($results)) {
     echo "\t\t<item>\n";
     echo "\t\t\t<idder>" . $line["id"] . "</idder>\n";
     echo "\t\t\t<title>" . $line["title"] . "</title>\n";
    echo "\t\t\t<link>content.php?id=" . $line['id'] . "&expandable=" . $line['menuLink'] . "</link>\n";
    echo "\t\t\t<content>" . $line['nieuws_content'] . "</content>\n";
    echo "\t\t\t<sizeTxt>" . $line['sizeTxt'] . "</sizeTxt>\n";
     echo "\t\t\t<enclosure url='images/" . $line['file_home'] . "' type='" . $line['extension'] . "' />\n"; 
     echo "\t\t</item>\n";
}

echo "\t</channel>\n";
echo "</rss>";

mysql_close($link);

?>

This topic has been closed for replies.

2 replies

September 22, 2009

This seems to work more often: but still not ALWAYS in Firefox (like you click 50 times and it works then it does not show one time, then you click 5 times it works then it does not show etc). Here is the link http://www.ritzen-design-consult.nl/player.swf

<?php

header("Content-type: text/xml");

$host = "host";
$user = "username";
$pass = "password";
$database = "db";

$linkID = mysql_connect($host, $user, $pass) or die("Could not connect to host.");
mysql_select_db($database, $linkID) or die("Could not find database.");

$query = "SELECT * FROM home WHERE extension = 'image/jpeg' OR extension = 'flash/flv' OR extension = 'flash/swf'";
$resultID = mysql_query($query, $linkID) or die("Data not found.");

$xml_output = "<?xml version=\"1.0\"?>\n";
$xml_output = "<rss version=\"2.0\">\n";
$xml_output .= "<channel>\n";

for($x = 0 ; $x < mysql_num_rows($resultID) ; $x++){
    $row = mysql_fetch_assoc($resultID);
    $xml_output .= "\t<item>\n";
    $xml_output .= "\t\t<idder>" . $row['id'] . "</idder>\n";
    $xml_output .= "\t\t<title>" . $row['title'] . "</title>\n";
    $xml_output .= "\t\t<link>content.php?id=" . $row['id'] . "&expandable=" . $row['menuLink'] . "</link>\n";
    $xml_output .= "\t\t<content>" . $row['nieuws_content'] . "</content>\n";
    $xml_output .= "\t\t<sizeTxt>" . $row['sizeTxt'] . "</sizeTxt>\n";
    $xml_output .= "\t\t<enclosure url='images/" . $row['file_home'] . "' type='" . $row['extension'] . "' />\n";
    $xml_output .= "\t</item>\n";
}

$xml_output .= "</channel>";
$xml_output .= "</rss>";

echo $xml_output;

?>

David_Powers
Inspiring
September 20, 2009

I don't know if it's the cause of the problem, but you should be sending an XML header before the RSS feed.

$results = mysql_query($query);

header('Content-type: text/xml');

echo "<rss version=\"2.0\">\n";
September 20, 2009

Thanks for answering.

I put the header, but still it does sometimes not load and only in Firefox. Very strange!

September 20, 2009

I put the .xml file which I got with the flash-movie originally below. How should I make the PHP-data integration otherwise? And is it not strange that it is a rss something also it is just a flash-movie with data integrated from a php file? It does not work without the rss. . When I put this xml then the flash-movie works, when I put the data-integration it sometimes does not show in Firefox..

<?xml version="1.0" ?>
<rss version="2.0">
     <channel>
    
          <item>
               <idder>0207</idder>
               <title>project benaming</title>
               <link>http://www.test.com</link>
               <enclosure url='images/video.flv' type='flash/flv' />
          </item>
          <item>
               <idder>0207</idder>
               <title>project benaming</title>
               <enclosure url='images/video.flv' type='flash/flv'/>
          </item>
          <item>
               <idder>0207</idder>
               <title>news items</title>
               <link>test.com</link>
               <enclosure url='images/news_02.swf' type='flash/swf' />
          </item>
     </channel>
</rss>