Click to See Complete Forum and Search --> : Centering a Large Width Flash .SWF
ShiftMedia
04-14-2008, 10:11 PM
Hey everyone. I have a problem I'm trying to get solved and was curious if this is fixable in CSS. I have a Large flash applet that is 2000px wide and 600px hide. The content in it is the size I want it so variable width is not an option. I'm trying to align the page in the direct CENTER of the .swf and can't find a way to make it happen. Regardless of what I do, the .swf starts at the left of the page and this causes it to be offcentered.
I'm trying to do this so it fits properly on almost all monitor resolutions. Any ideas?
Two-Toe Tom
04-14-2008, 10:35 PM
maybe u can use some javascript programming to get the user's screen size, then adjust css relative positioning accordingly?
nicholaspaul
04-15-2008, 07:35 AM
Are you trying to cut off the left and right sides of the swf if it doesn't fit on the monitor?
2000px is pretty wide, and most people don't have screens that wide. Remember that there are still a lot of 12, 14 and 15" screens around, and probably always will be. Plus that swf has to be pretty hefty in size!
Is there any way to reduce the size of the swf to make it more compatible with more viewers?
ShiftMedia
04-15-2008, 04:58 PM
Well, what I want to do is just cut off the SWF if it doesn't fit. So in a sense, the parts you can't see will still be running, you just won't need to see it because of your resolution. I can't figure out how to do this in CSS.
D-Frag
04-15-2008, 09:16 PM
you might wanna try www.flashgods.com to help you out, cuz i have no freaking idea
DesignVHL
04-15-2008, 09:42 PM
Not sure how you tried to set your file up...but here is what I would try:
create a container div:
<div id="flash_movie"></div>
Then the css for that div would be:
#flash_movie {
margin: 0px auto;
text-align:center;
width: 2000px;
height: 600px;
}
Instead of just dropping the swf file in as an Object though, I would use swfobject to place it in the div...its pretty simple and the best way to put flash on a website (according to what I have read and discussed w/ other designers)
Learn more here:
http://blog.deconcept.com/swfobject/
Hope that helps!
It IS possible that this isn't possible to do (at least not w/ css - you may need to use js)....techinically what would end up happening is that the scroll bar would need to end up scrolled in the center, along with your movie....which seems weird, and I don't even know if that is possible.
I'd hit Flashkit though. Don't know much about flashgods but flashkit has been around since the begining of flash and they rock! I can almost always find a solution (or find out it won't work that way) over there....