Click to See Complete Forum and Search --> : Coding Help


moneyfresh
01-06-2008, 11:34 PM
Hi i need sum help i have figured out how to embed flash onto my website. Now i just need sum help making it align correctly heres the code that i got working with in a block

<?php
if ( !defined('BLOCK_FILE') ) {
Header("Location: ../index.php");
die();
}
$content = "<object style="WIDTH: 100px; HEIGHT: 100px; " classid=\"clsid:d27cdb6e-ae6d-11cf-96b8-444553540000\"";
$content .= " codebase=\"http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0\"";
$content .= " id=\"coffeexml\" align=\"middle\">";
$content .= "<param name=\"movie\" value=\"myform.swf\"/>";
$content .= "<param name=\"quality\" value=\"high\" />";
$content .= "<param name=\"FlashVars\" VALUE=\"xmlfile=myform.xml&w=360&h=400\"/>";
$content .= "<param name=\"scale\" value=\"noscale\" />";
$content .= "<param name=\"salign\" value=\"lt\" />";
$content .= "<param name=\"bgcolor\" value=\"#ffffff\" />";
$content .= "<embed style="WIDTH: 100px; HEIGHT: 100px; " src=\"myform.swf\" FlashVars=\"xmlfile=myform.xml&w=360&h=400\" quality=\"high\" bgcolor=\"#ffffff\"
$content .= " name=\"coffeexml\" scale=\"noscale\" salign=\"lt\" align=\"middle\" type=\"application/x-shockwave-flash\"";
$content .= " pluginspage=\"http://www.macromedia.com/go/getflashplayer\" />";
$content .= " </object>";
?>

What i want to add to that is to align it to the center i can put my website up again for anymore investigation on how to get it running. Thanks

http://www.withoutareason.bloodservers.com/

sneakyimp
01-08-2008, 12:49 AM
put it inside a div tag with style="text-align:center;"

NogDog
01-08-2008, 01:17 AM
You can just assign a left and right margin value of "auto" in your object tag's style attribute:

style="WIDTH: 100px; HEIGHT: 100px; margin: 0 auto;"