Forums

[resolved] Add flash video to homepage and make it autoplay (6 posts)

  1. surfITin10
    Member
    Posted 1 year ago #

    Hello and thank you for your time and assistance,

    I have a flash video that I need to put onto the homepage of my WordPress site. I need the video to autoplay when the page is loaded.

    My homepage is rendered with index.php. I attempted to insert the flash code provided by Adobe into this page but that did not work. There is just a big empty white space where the video should be.

    I am unsure if I need a plugin or if I can use certain code to accomplish this. There seem to be a variety of posts about this but nothing really clear that I've found so far.

  2. batooo
    Member
    Posted 1 year ago #

    Oh, ill record video tutorial about this in 2 hours, check later.

  3. batooo
    Member
    Posted 1 year ago #

    First create new function.

    function flashembed($file, $width, $height) {
    $swfdir = "http://test.perfectwebtutorials.com//wp-content/themes/default/swf/"; // change to your url, where your swf files are
    echo "<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"
    codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0\" WIDTH=$width HEIGHT=$height>
    <PARAM NAME=movie VALUE=\"$swfdir/$file.swf\">
    <PARAM NAME=quality VALUE=high>
    <PARAM NAME=menu VALUE=false>
    <EMBED src=\"$swfdir/$file.swf\" quality=high WIDTH=$width HEIGHT=$height TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\" menu=\"false\"></EMBED>
    </OBJECT>";
    }

    Then call it anywhere where u cant to insert swf file.

    <?php flashembed(filename, 300, 150); ?>

    U are done.

    Video
    Source

  4. surfITin10
    Member
    Posted 1 year ago #

    Thank you for your help with the flash code! My video is now loading and playing, but it displays with extra white space on the top and bottom of the video in Safari and the video size is much smaller in Firefox. I'm not sure if I need additional parameters in the flash code itself to account for these display issues. I have worked with the CSS for the past hour and have not found a way to fix these issues. Do you have any idea what might be wrong?

    Thanks again!

  5. surfITin10
    Member
    Posted 1 year ago #

    Here is the site where you can see the flash and source:

    My Site

  6. surfITin10
    Member
    Posted 1 year ago #

Topic Closed

This topic has been closed to new replies.

About this Topic