Topic: Help embedding flash movie

I've tried using SWFObject and the Satay method (sort of) to no avail. My flash movie is quite large but streaming. For some odd reason it won't play from a PHP page but when I just publish the plain ol' HTML from within Flash, the HTML file plays the movie just fine. And I realize that both of those previous sentences were not that easy to read.

So, here's what I'm trying to do. I've got a database referring to different training session, each having a reference to a flash movie. My code for embedding the flash movie looks like this:

<?php
$session = $cms->get_row("SELECT * FROM training WHERE training_id = '$id'");
if($session): ?>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="275" height="50" id="<?=$session->training_id?>">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="/training/<?=$session->training_video?>" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="/training/<?=$session->training_video?>" quality="high" bgcolor="#ffffff" width="275" height="50" name="<?=$session->training_name?>"  allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
<?php   
endif;

If I substitute the variables for an actual swf file and load the resulting code in an HTML file it plays fine. But when I run this dynamically in a PHP file, I gets no love. Help? Not a flash wiz by any means. Thanks.

Re: Help embedding flash movie

Do you have an example page where we could see this in action?

"Take up your cross before your crown" :: http://no-spec.com

Re: Help embedding flash movie

http://jlc.org/training/sessions.php/1

here's an example using the swfobject method. Nothing going.

Our host doesn't allow url rewriting, hence the sessions.php/1 bit.

Re: Help embedding flash movie

The SWF doesn't exist at the given path (I get an 'Oops, that page does not exist' message).  Could that be the problem?

"Take up your cross before your crown" :: http://no-spec.com

Re: Help embedding flash movie

that certainly would help but I was getting the same error on my local server where the file is located. Thanks for pointing it out.

well, i don't know why but embedding flash in a page with a url like session.php/1 just didn't seem to work. So instead I just posted it in a page that wasn't pulling the information about the file from the database and it's working ok now. http://jlc.org/training/consenttraining.php

Last edited by beno (2006-08-23 12:02:53)