Jump to content

problem loading swf from mysql... please help


alexguz79

Recommended Posts

hey everybody....

 

this is it..

 

im trying to load an swf file stored in my database with this code:

 

<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="555" height="500">

              <param name="movie" value="<?=$row['swf_evento']?>" />

              <param name="quality" value="high" />

              <embed src="<?=$row['swf_evento']?>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="555" height="500"></embed>

            </object>

 

the thing is... on the site i just get the binary code..... can somebody hellp me with this

you need to make a secondary file that is the psedo .swf file

your part right there becomes


<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="555" height="500">
              <param name="movie" value="movie.php?id=<?php echo $movie_id;?>" />
              <param name="quality" value="high" />
              <embed src="<?=$row['swf_evento']?>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="555" height="500"></embed>
            </object>

Then make a new file called movie.php that is sorta like

<?php
connectSQL();
if(is_int($_GET['id'])){
$q = "Select swf_evento as data from `table` where Movie_ID = ".mysql_real_escape_string($_GET['id']);
$r = mysql_query($q) or die(mysql_error()."<br /><br />".$q);
header("content-type: application/x-shockwave-flash");
list($data) = mysql_fetch_assoc($r);
echo $data;
?>

That should be the general idea to it  this isn't working code out pseudo out php.

thats what i see too

 

this is the code

 

<?php

connectSQL();

if(is_int($_GET['id'])){

$q = "Select swf_evento as data from `perfect` where id = ".mysql_real_escape_string($_GET['id']);

$r = mysql_query($q) or die(mysql_error().$q);

header("content-type: application/x-shockwave-flash");

list($data) = mysql_fetch_assoc($r);

echo $data;

?>

you don't close the if

<?php
connectSQL();
if(is_int($_GET['id'])){
$q = "Select swf_evento as data from `perfect` where id = ".mysql_real_escape_string($_GET['id']);
$r = mysql_query($q) or die(mysql_error().$q);
header("content-type: application/x-shockwave-flash");
list($data) = mysql_fetch_assoc($r);
echo $data;
}
?>

im using both... firefo and explorer.....

 

i thing we're getting there.... now my page recognize is a swf that has to display.... the thing is... it's not displaying the swf on the database...

 

again... here's the code... million thanx in advance

 

this is where should display the swf file

----------------------------

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="555" height="500">

              <param name="movie" value="picture_movie.php?id=<?php echo $id;?>">

              <param name="quality" value="high">

              <embed src="picture_movie.php?id=<?php echo $id;?>" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="555" height="500"></embed>

        </object>

----------------------------

 

this is the file picture_movie.php

----------------------------

<?php

require_once('config_picture.php');

if(is_int($_GET['id'])){

$q = "Select swf_evento as data from `perfect` where id = ".mysql_real_escape_string($_GET['id']);

$r = mysql_query($q) or die(mysql_error().$q);

header("content-type: application/x-shockwave-flash");

list($data) = mysql_fetch_assoc($r);

echo $data;

}

?>

----------------------------

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.