Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

Embeded SWF often is not loading in Firefox

Guest
Sep 20, 2009 Sep 20, 2009

Copy link to clipboard

Copied

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);

?>

TOPICS
Server side applications

Views

2.9K
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Sep 20, 2009 Sep 20, 2009

Copy link to clipboard

Copied

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";

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 20, 2009 Sep 20, 2009

Copy link to clipboard

Copied

Thanks for answering.

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

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 20, 2009 Sep 20, 2009

Copy link to clipboard

Copied

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>

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Sep 22, 2009 Sep 22, 2009

Copy link to clipboard

Copied

LATEST

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;

?>

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines