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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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;

?>

Link to comment
Share on other sites

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;
}
?>

Link to comment
Share on other sites

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;

}

?>

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.