HighDots Forums  

Center flash video player on page

Macromedia Dreamweaver Macromedia Dreamweaver Discussions (macromedia.dreamweaver)


Discuss Center flash video player on page in the Macromedia Dreamweaver forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ryonker
 
Posts: n/a

Default Center flash video player on page - 06-10-2008 , 08:42 PM






Hi everyone,

I have a webpage that I inserted a flash video file on the page. The player is
320x240 and is the only thing that will appear on the page. I want to center
the player inside the div that it is in. I have tried setting the div margins
in CSS and it looks correct when I do this but when I preview the page it still
appears on the left side of the div. Is there a way that I can center this that
I am missing? Here is a link to the page to look at.
http://www.ebcardiac.com/Video/index.html

Thanks,
Robert


Reply With Quote
  #2  
Old   
TC2112
 
Posts: n/a

Default Re: Center flash video player on page - 06-10-2008 , 09:42 PM






Hello,

Replace the H1 tag around the flash video with a div tag. (The H1 is
essentially useless here)
Assign the div a class. I named it "centerflash" for this example.

<div class="centerflash">
<script type="text/javascript">
AC_FL_RunContent(
'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0','width','342','height ','291','id','FLVPlayer','class','videoPlayer','sr c','FLVPlayer_Progressive','flashvars','&MM_Compon entVersion=1&skinName=Halo_Skin_3&streamName=minIn vasiveVideo&autoPlay=true&autoRewind=true','qualit y','high','scale','noscale','name','FLVPlayer','sa lign','lt','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movi e','FLVPlayer_Progressive'
); //end AC code
</script><embed width="342" height="291"
type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash"
salign="lt" name="FLVPlayer" scale="noscale" quality="high"
flashvars="&MM_ComponentVersion=1&skinName=Halo_Sk in_3&streamName=minInvasiveVideo&autoPlay=true&aut oRewind=true"
src="FLVPlayer_Progressive.swf" class="videoPlayer"/>
<noscript>
<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"
width="342" height="291" class="videoPlayer" id="FLVPlayer">
<param name="movie" value="FLVPlayer_Progressive.swf" />
<param name="salign" value="lt" />
<param name="quality" value="high" />
<param name="scale" value="noscale" />
<param name="FlashVars"
value="&MM_ComponentVersion=1&skinName=Halo_Skin_3 &streamName=minInvasiveVideo&autoPlay=true&autoRew ind=true"
/>
<embed src="FLVPlayer_Progressive.swf"
flashvars="&MM_ComponentVersion=1&skinName=Halo_Sk in_3&streamName=minInvasiveVideo&autoPlay=true&aut oRewind=true"
quality="high" scale="noscale" width="342" height="291" name="FLVPlayer"
salign="LT" type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash"
/>
</object>
</noscript>
</div>

Add this to your CSS:

..centerflash {
width: 342px;
margin: 0px auto;
}


Take care,
Tim

"ryonker" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Hi everyone,

I have a webpage that I inserted a flash video file on the page. The
player is
320x240 and is the only thing that will appear on the page. I want to
center
the player inside the div that it is in. I have tried setting the div
margins
in CSS and it looks correct when I do this but when I preview the page it
still
appears on the left side of the div. Is there a way that I can center this
that
I am missing? Here is a link to the page to look at.
http://www.ebcardiac.com/Video/index.html

Thanks,
Robert




Reply With Quote
  #3  
Old   
TC2112
 
Posts: n/a

Default Re: Center flash video player on page - 06-10-2008 , 09:42 PM



Hello,

Replace the H1 tag around the flash video with a div tag. (The H1 is
essentially useless here)
Assign the div a class. I named it "centerflash" for this example.

<div class="centerflash">
<script type="text/javascript">
AC_FL_RunContent(
'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0','width','342','height ','291','id','FLVPlayer','class','videoPlayer','sr c','FLVPlayer_Progressive','flashvars','&MM_Compon entVersion=1&skinName=Halo_Skin_3&streamName=minIn vasiveVideo&autoPlay=true&autoRewind=true','qualit y','high','scale','noscale','name','FLVPlayer','sa lign','lt','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movi e','FLVPlayer_Progressive'
); //end AC code
</script><embed width="342" height="291"
type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash"
salign="lt" name="FLVPlayer" scale="noscale" quality="high"
flashvars="&MM_ComponentVersion=1&skinName=Halo_Sk in_3&streamName=minInvasiveVideo&autoPlay=true&aut oRewind=true"
src="FLVPlayer_Progressive.swf" class="videoPlayer"/>
<noscript>
<object classid="clsid27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0"
width="342" height="291" class="videoPlayer" id="FLVPlayer">
<param name="movie" value="FLVPlayer_Progressive.swf" />
<param name="salign" value="lt" />
<param name="quality" value="high" />
<param name="scale" value="noscale" />
<param name="FlashVars"
value="&MM_ComponentVersion=1&skinName=Halo_Skin_3 &streamName=minInvasiveVideo&autoPlay=true&autoRew ind=true"
/>
<embed src="FLVPlayer_Progressive.swf"
flashvars="&MM_ComponentVersion=1&skinName=Halo_Sk in_3&streamName=minInvasiveVideo&autoPlay=true&aut oRewind=true"
quality="high" scale="noscale" width="342" height="291" name="FLVPlayer"
salign="LT" type="application/x-shockwave-flash"
pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash"
/>
</object>
</noscript>
</div>

Add this to your CSS:

..centerflash {
width: 342px;
margin: 0px auto;
}


Take care,
Tim

"ryonker" <webforumsuser (AT) macromedia (DOT) com> wrote

Quote:
Hi everyone,

I have a webpage that I inserted a flash video file on the page. The
player is
320x240 and is the only thing that will appear on the page. I want to
center
the player inside the div that it is in. I have tried setting the div
margins
in CSS and it looks correct when I do this but when I preview the page it
still
appears on the left side of the div. Is there a way that I can center this
that
I am missing? Here is a link to the page to look at.
http://www.ebcardiac.com/Video/index.html

Thanks,
Robert




Reply With Quote
  #4  
Old   
ryonker
 
Posts: n/a

Default Re: Center flash video player on page - 06-11-2008 , 01:14 AM



Tim,

Thanks so much, this was fantastic. It worked like a charm. Everything is working just as I wanted it to. Thanks again for the help.

Robert

Reply With Quote
  #5  
Old   
ryonker
 
Posts: n/a

Default Re: Center flash video player on page - 06-11-2008 , 01:14 AM



Tim,

Thanks so much, this was fantastic. It worked like a charm. Everything is working just as I wanted it to. Thanks again for the help.

Robert

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.