PDA

View Full Version : scaling Flash with Firefox


Cowgirl32
10-31-2005, 04:51 PM
Happy Halloween everyone!!

I have a swf file that i have set to 100% of the page. It works fine with IE and netscape. In firefox it is really small up in the corner.

Does anyone one know how to get it to scale to the page size??

thephosphorbox
11-01-2005, 12:19 PM
Hmmmm maybe try putting the swf inside a table with a width and height set to 100% ?


<table border="0" width="100%" height="100%" cellspacing="0" cellpadding="0">
<tr>
<td>
<!-- insert flash here -->
</td>
</tr>
</table>


I think that should do it.

Cowgirl32
11-01-2005, 04:54 PM
So i have put it into a table and it works fine, but now it doesnt work in IE.

thephosphorbox
11-01-2005, 04:58 PM
IE - the backward browser :)

Let's see.... maybe try adding a width and height of 100% to the <td> tag within the table?

Cowgirl32
11-01-2005, 05:07 PM
THat is not working either. Here is the code that I have nmaybe i am missing something. I am so flustered!!! :(

<!-- this is the code that will work with firefox-->
<table>
<tr>
<td width="100%" height="100%">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="100%" height="100%">
<param name="movie" value="webTest02.swf">
<param name="quality" value="high">
<param name="wmode" value="transparent">
<embed src="webTest02.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" width="100%" height="100%"></embed>
</object>
</td>
</tr>
</table>

<!--this section of code will work in IE and Netscape(viewed like IE)-->
<!--<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="100%" height="100%">
<param name="movie" value="webTest02.swf">
<param name="quality" value="high">
<param name="wmode" value="transparent">
<embed src="webTest02.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent" width="100%" height="100%"></embed>
</object>-->

Any more suggestions? Thank you for the ones so far

thephosphorbox
11-01-2005, 06:39 PM
do you have this up on a webserver somewhere? or can you post the swf file so I can try to duplicate the behaviour?

Cowgirl32
11-01-2005, 06:49 PM
here is my swf file. It is just a basic file for testing purposes.

thephosphorbox
11-01-2005, 07:37 PM
Well after playing with it, I was able to reproduce the effect you were talking about. Unfortunately I don't have an answer for you right now, all I can share is what I've discovered.

It seems that Firefox (like all Mozilla based browsers) uses the <embed> tags as opposed to <object> tags to display Flash movies. And the way it's implemented in Firefox, it looks like percentage values for width and height for <embed> tags don't work. I was able to substitute pixel values for width and height and Firefox would scale the movie, but when using percentages, it did not work. Zero problems using <object> tags in IE.

Anyone else have any input on this?

Cowgirl32
11-01-2005, 08:06 PM
do you think that it would be possible to check the browser that they are using and then a couple different functions that would load the movie in? these functions would load the movie different ways, one for ie and one for firefox?

silverfish
11-01-2005, 09:32 PM
you might find this article (http://www.moddular.org/log/flash-vs-firefox) to be helpful

Cowgirl32
11-01-2005, 10:10 PM
Thank you Silverfish for pointing out the article. it did help it seems to work now.

thephosphorbox I thank you for lookin at my code.

This coide needs to be in the header and then just put in the flash file like you normally would do.


<style type="text/css">
<!--
body, html {
margin: 0;
padding: 0;
height: 100%;
width: 100%;
}
-->
</style>

you just have to make sure not to put in the px after the 0 in margin and padding. THe other example I was referenceing had a px after them. How confusing and silly.

Ruben
11-01-2005, 10:18 PM
Maybe you should read through this thread I started some time ago on the same subject (http://www.actionscript.org/forums/showthread.php3?t=50711), there's some helpfull information in it I recogn...

- Ruben

EDIT: PS. Thanks for the article silverfish! Very usefull.

silverfish
11-01-2005, 10:27 PM
you're welcome :-) I actually found the link to it here a few days ago. I couldn't find the thread again but I had bookmarked the article. So thanks to whomever originally posted it :-)

Ruben
11-01-2005, 10:37 PM
Hehe, yeah, hail!

;) - Ruben

ShadowOfSilence
10-15-2006, 11:50 PM
IE - the backward browser :)

Let's see.... maybe try adding a width and height of 100% to the <td> tag within the table?

No, it's not IE that is backwards... Like the person said; in IE and Netscape it works fine.... 2 out of 3, majority is best here.

red01
10-24-2006, 04:07 AM
.....