alexguz79 Posted March 24, 2008 Share Posted March 24, 2008 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 Quote Link to comment Share on other sites More sharing options...
teng84 Posted March 24, 2008 Share Posted March 24, 2008 what are the data that you get from your data base? I supposed its only the file name of your flash file Quote Link to comment Share on other sites More sharing options...
alexguz79 Posted March 24, 2008 Author Share Posted March 24, 2008 its an swf file.... ****.swf is stored in my database Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted March 24, 2008 Share Posted March 24, 2008 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. Quote Link to comment Share on other sites More sharing options...
alexguz79 Posted March 24, 2008 Author Share Posted March 24, 2008 that from cooldude didnt work eather... any ideas?? im stuck Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted March 24, 2008 Share Posted March 24, 2008 that from cooldude didnt work eather... any ideas?? im stuck It will work if the movie.php file is constructed properly. You should be able to point to movie.php?id=5 and get the 5th movie to play Quote Link to comment Share on other sites More sharing options...
alexguz79 Posted March 24, 2008 Author Share Posted March 24, 2008 this is the error i get with that: Parse error: syntax error, unexpected $end in /home/mytrende/public_html/picture_movie.php on line 9 and line 9 is the end of the code.... i dont get it Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted March 24, 2008 Share Posted March 24, 2008 I don't see an error on line 9 oh wait I don't see line 9! (Post your code) Quote Link to comment Share on other sites More sharing options...
alexguz79 Posted March 24, 2008 Author Share Posted March 24, 2008 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; ?> Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted March 24, 2008 Share Posted March 24, 2008 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; } ?> Quote Link to comment Share on other sites More sharing options...
ohdang888 Posted March 24, 2008 Share Posted March 24, 2008 are you using firefox? mozilla browsers don't use the classid or codebase. it messes them up. Quote Link to comment Share on other sites More sharing options...
alexguz79 Posted March 24, 2008 Author Share Posted March 24, 2008 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; } ?> ---------------------------- Quote Link to comment Share on other sites More sharing options...
alexguz79 Posted March 24, 2008 Author Share Posted March 24, 2008 anyone please Quote Link to comment Share on other sites More sharing options...
cooldude832 Posted March 24, 2008 Share Posted March 24, 2008 when picture_movie.php has a valid ID what does it do if you open it??? Not embeded, but on its own and view its source code. Also check what the header should be for a .swf file I just pulled that from what u had. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.