Jump to content
carcleo

Função chama swf

Recommended Posts

carcleo

Feliz Ano Novo a todos!

Pessoal,

Criei uma Função php para chamar filme swf.

<?php
function chama_swf($nome_swf, $endereco_swf, $modo, $comprimento, $largura)
{
?>
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="<?php echo $comprimento; ?>" height="<?php echo $largura; ?>">
 <param name="movie" value="<?php echo $endereco_swf; ?>">
 <param name="wmode" value="<?php echo $modo; ?>">
 <param name="quality" value="high">
 <embed src="<?php echo $endereco_swf; ?>" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="<?php echo $comprimento; ?>" height="<?php echo $largura; ?>"></embed>
</object>
<?php } ?>

E estou chamando a função assim:

<?php
 include "global/funcoes_php/chama_swf.php";
 chama_swf("banner.swf","img/","transparent",550,100);
?>

Porém, o filme não carrega. Apenas ocupa o espaço dele conforme as dimensões passadas por parâmetro. Como sei disso? Cliquei com o lado direito do mouse no local do site que ele deve estar inserido e vi as propriedades do swf.

Já observei endereço. Não achei erro.

Mas, o que pose estar errado na fução.

Share this post


Link to post
Share on other sites
carcleo

Achei.

O erro era aqui:

<param name="movie" value="<?php echo $endereco_swf; ?>">

O certo é assim:

<param name="movie" value="<?php echo $endereco_swf.$nome; ?>">

Inserindo também o nome do filme é claro né?

$nome

Obrigado!

Share this post


Link to post
Share on other sites

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

By using this site you accept our Terms of Use and Privacy Policy. 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.