Flash in PHP?:S?

Discussion in 'Web Design & Coding' started by 03bigMark03, Mar 5, 2003.

  1. 03bigMark03

    03bigMark03 Guest

    Hi guys, I need some help with PHP.

    I have asked at several sites and have asked coding friends but I have so far not received any help. I was wondering how I could insert a flash logo into the PHP language. That would be great if you know how to do this.

    PS, the content management system that is used on my site is called Post Nuke (similar to PHPNUKE). The site is also based at http://www.mark-buxton.co.uk (of course!).
     
  2. Geffy

    Geffy Moderator Folding Team

    Messages:
    7,805
    Location:
    United Kingdom
    just do as normal HTML or

    <?php echo "<html><body><img src=flash_img.fla></body></html>"; ?>
     
  3. X-Istence

    X-Istence * Political User

    Messages:
    6,498
    Location:
    USA
    Flash gets embedded differently, but yes that is the way to go about it.
     
  4. Paul_Don

    Paul_Don Guest

    <?php echo "<html><body>

    <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
    codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"
    ID=Untitled WIDTH=200 HEIGHT=200>
    <PARAM NAME=movie VALUE="flash.swf">
    <PARAM NAME=quality VALUE=high>
    <PARAM NAME=loop VALUE=false>
    <EMBED src="flash.swf" loop=false quality=high
    WIDTH=200 HEIGHT=200 TYPE="application/x-shockwave-flash"
    PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash">
    </EMBED>
    </OBJECT>

    </body></html>"; ?>


    that should sort ya
     
  5. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    Pretty useless to use PHP in this case IMO since there's nothing dynamic. This is enough:
    Code:
    <OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
    codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0"
    ID=Untitled WIDTH=200 HEIGHT=200>
    <PARAM NAME=movie VALUE="flash.swf">
    <PARAM NAME=quality VALUE=high>
    <PARAM NAME=loop VALUE=false>
    <EMBED src="flash.swf" loop=false quality=high
    WIDTH=200 HEIGHT=200 TYPE="application/x-shockwave-flash"
    PLUGINSPAGE="http://www.macromedia.com/shockwave/download/index.cgi? P1_Prod_Version=ShockwaveFlash">
    </EMBED>
    </OBJECT>
    
     
  6. 03bigMark03

    03bigMark03 Guest

    It don't work, Help.

    The image bit is header.gif

    /*****************************************************************************************/
    /* Theme Header Start */
    /*****************************************************************************************/

    function themeheader() {
    global $thename, $bgcolor1, $bgcolor2, $bgcolor3, $bgcolor4, $index;
    $sitename = pnConfigGetVar('sitename');

    echo"<body bgcolor=\"818181\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">\n"
    ."<div align=\"center\"><br>\n"
    ."<table width=\"775\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"
    ."<tr>\n"
    ."<td><img src=\"themes/Pixame_Style/images/header.gif\" width=\"775\" height=\"34\"></td>\n"
    ."</tr>\n"
    ."</table>\n"
     
  7. 03bigMark03

    03bigMark03 Guest

    *

    Sorry about the lack of information there. Now you see the code above? That's part of the theme.php file and the
    is were the image is displayed. I have tried to insert flash code in here but I got some error messages (parse errors, can't remember them). So if you guys can determin the correct code for this theme.php file for flash that would be great help.
     
  8. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    When you paste in the flash code you must escape all the quotes. This means that you must replace all the " in the flash code with \" first. Just like it's done in the original code.
     
  9. 03bigMark03

    03bigMark03 Guest

    Help

    Cool. Sound's as though it's the right idea. I'm quit new to PHP (hence postnuke) but if you could provide and example of replacing thoughs thingies in my code that would be great.
     
  10. Zedric

    Zedric NTFS Guru Folding Team

    Messages:
    4,006
    Location:
    Sweden
    Aaww ffs. Oh, alright. Here ya go.

    Code:
    echo"<body bgcolor=\"818181\" leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\">\n"
    ."<div align=\"center\"><br>\n"
    ."<table width=\"775\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"
    ."<tr>\n"
    ."<td><OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\"
    codebase=\"http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0\"
    ID=Untitled WIDTH=200 HEIGHT=200>\n"
    ."<PARAM NAME=movie VALUE=\"flash.swf\">\n"
    ."<PARAM NAME=quality VALUE=high>\n"
    ."<PARAM NAME=loop VALUE=false>\n"
    ."<EMBED src=\"flash.swf\" loop=false quality=high
    WIDTH=200 HEIGHT=200 TYPE=\"application/x-shockwave-flash\"
    PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi? P1_Prod_Version=ShockwaveFlash\">\n"
    ."</EMBED>\n"
    ."</OBJECT>\n"
    ."</td>\n"
    ."</tr>\n"
    ."</table>\n"
    
    No guarantees on functionality.
    Make sure that :D is turned into : and D first!
     
  11. 03bigMark03

    03bigMark03 Guest

    Almost Done

    Ok here is the code I have so far...

    ."<tr>\n"
    ."<td><OBJECT classid=\"clsid27CDB6E-AE6D-11cf-96B8-444553540000\"
    codebase=\"http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0\">\n"
    ."<PARAM NAME=movie VALUE=\"http://www.potton-delph.com/mark/internetstuff/themes/Pixame_Style/images/netstuff.swf\">\n"
    ."<PARAM NAME=quality VALUE=high>\n"
    ."<PARAM NAME=loop VALUE=false>\n"
    ."<EMBED src=\"flash.swf\" loop=false quality=high
    WIDTH=200 HEIGHT=200 TYPE=\"application/x-shockwave-flash\"
    PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi? P1_Prod_Version=ShockwaveFlash
    \">\n"
    ."</EMBED>\n"
    ."</OBJECT>\n"
    ."</td>\n"
    ."</tr>\n"
    ."</table>\n"
    ."<table width=\"775\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">\n"
    ."<tr> \n"


    It almost works but the logo does not display. What am I doing wrong?
     
  12. 03bigMark03

    03bigMark03 Guest

    Ok. I have sorted out all the code and it should work theoretically, but it doesn’t. Why not?

    Sorted that out, now matches flash file name. But still it does not display