swffit (formerly know as FitFlash) is a smart script that resizes your flash movie automatically if your browser window size is smaller or greater than your flash minimum desired size keeping it accessible independent of screen resolution.

Download swffit (released 03/27/2008) - SWFObject 2.0 Download FitFlash 2.5 (released 01/23/2008) - SWFObject 1.5

Comments

I hope you enjoy!
I hope you enjoy FitFlash and help me spreading it !!
Subscribe to the RSS feed to keep in touch of new updates..
Thanks for visiting !
#1
by: Miller Medeiros - 09/24/2007 - 22:17
A Great Script
I´ve been using fitflash since it´s early versions, and this tool is just amazing. No more headaches to insert the flash content into a full page.
This script complement the essential toolkit of swfObject and swfAddress, and help the developer saving essential time.
#2
by: Ruy Adorno - 09/26/2007 - 17:52
the third man
Thanks!!! this script is really fine, leave me the di euri. :D
#3
by: Jonathas Sampaio - 09/27/2007 - 05:05
Name
Really great script..

You may consider changing the name to SWFFit or so.. if it get's too popular Adobe might ask you to change it. It happened to SWFObject (before FlashObject).
#4
by: simurai - 09/28/2007 - 17:18
Great work
Great work, you are a person who deserves the technological respect.
#5
by: Vinícius Diogo - 10/01/2007 - 19:52
Thank you
Works perfectly, solved a problem for me that i hadn\'t even begun fixing. I will use that time to animate some flying monkeys.
#6
by: Richie - 10/05/2007 - 23:23
PARABÉNS PELO ÓTIMO TRABALHO!
Valeu cara! Eu tinha desenvolvido soluções baseada em gambiarras e você realmente mandou muito bem, me livrou de uma grande dor de cabeça.

Muito obrigado! Depois posto aqui o site que fiz usando seu script.
#7
by: Marcílio - 10/09/2007 - 10:44
Excellent, thank you
Just a tiny little thing though, if you resize to width less than the box widt and keep the height max the vertical scroll is there. Is there anyway to fix that?
Still super.
#8
by: Clarence - 10/13/2007 - 08:19
Re: Excellent, thank you
Clarence,
i never realized that it occurs.. in IE the vertical scroll appears but inactive (i don't think its a bug). in Firefox the scroll appears and is active (its a bug)..
i will try to figure out why it happens and fix it.. it could take some time cause right now im really busy..
subscribe to the RSS feed to keep in touch of new updates..
thanks for commenting..
#9
by: Miller Medeiros - 10/15/2007 - 10:59
Seems that it's a firefox bug.. (browser bug)
i've done some tests and seems that the vertical scroll "problem" in firefox is a bug of the browser.. the browser calculates 100% height for the body tag as the size of the window + scroll height and there seems no way to solve it besides using the CSS property "overflow-y" but it causes another bug that i think it's much more critic.. i'll try some other solutions but im start to thinking that has no way to solve it without causing other bugs..

if you want to make a site that has only horizontal scroll just ad this to your css code [ body{overflow-y: hidden !important;} ].. i've tried to change the "overflow-y" according to the window size but it made flash disappear in some firefox versions and caused another minor bugs such as if the "window size" =< (minHeight - scroll bar height) it wont make scrollbar or change the flash size to a number greater than minHeight making unnecessary scroll appear..

im really thinking there's no way to solve it.. and i don't think it is a big problem as the content keep accessible and that is the main objective of FitFlash.. keep content accessible independent of screen resolution / window size..
#10
by: Miller Medeiros - 10/16/2007 - 12:28
AC_RunActiveContent.js
Have you ever tried to adapt your code to work with the default flash code detector?
#11
by: Christian - 10/18/2007 - 10:51
License
Is the license MIT License?
#12
by: tanaka - 10/18/2007 - 20:11
Re: AC_RunActiveContent.js and Re: License
Re: AC_RunActiveContent.js

i never tried to adapt the code to default flash code detector.. but i've tested with different kinds of flash embeding and worked well..

Re: License

Yes, you can use it without any restriction.. and it's totally free.. but i would appreciate if you keep my credits and help me spreading it.. thanks
#13
by: Miller Medeiros - 10/19/2007 - 14:58
Re:Re:License
Thank you.
But it did not use it this time.

Fitflash.js is (1) ok.
I want add function (2) and (3).

(1)[hold set min size] --- resize --> browser big
(2)browser small <-- resize --- [hold set max size]
(3)[hold set min size] <-- resize --> [hold set max size]

I expect extension of the further function.
#14
by: tanaka - 10/22/2007 - 00:39
Re:Re:Re:License
Tanaka,
when i have some time i will implement those functionalities.. i never did it before cause i never thought that it would be useful.. i will probably just add 2 new parameters to the FitFlash function to set max width and max height and make them optional..
thanks for helping FitFlash become better..
#15
by: Miller Medeiros - 10/22/2007 - 07:11
Great work, thanks.
#16
by: Tilo - 10/23/2007 - 07:45
New Version Released !! - version 2.3
now you can set a maximum size for the flash movie.. i would like to thank Tanaka for asking about this functionality..
if you want only to set a max size (like function 2 of Tanaka) set the minimum width and height to 1..
#17
by: Miller Medeiros - 10/28/2007 - 20:06
Nice script. But having a problem aligning my SWF to the center. "div align center" does not work. Is there a param setting I can add to do this?
#18
by: Aruna - 11/05/2007 - 05:07
Aruna,

i don't know whats your problem - if you want to align the swf with maximum size to the center or just to align the flash content when flash has 100% width / height..

If your problem is just about centralize the flash content at 100% wid/hei you only have to use (inside flash) the "Stage.align" property (see flash help for parameters)..

If you want to centralize the Swf in the browser after it reaches the maximum size probably i will need to edit FitFlash code cause i think that only using css isn't possible because each time (100%, minimum size, max size) the swf have different properties..

I'm using FitFlash for more than 1 year and never needed the "max size" functionality.. probably you can reach the desired result just using the default method (only minimum size) and "Stage.align"..

I will figure a way to centralize the swf in the maximum size example but it will take some time.. thanks for your suggestion..
#19
by: Miller Medeiros - 11/05/2007 - 08:09
Fitflash and the new SWFObject 2.0...
Hi there!
I have problems making this work with the new SWFObject v2.0 beta6 (http://code.google.com/p/swfobject/). It seems like for SWFObject 2.0 to work 100% height and width you have to have it set at 100%... But then flashfit isn't working correctly...

Niklas
#20
by: Niklas - 11/13/2007 - 07:32
Re: Fitflash and the new SWFObject 2.0...
Niklas,

i've tested FitFlash with the swfObject 2 beta6 now and the only thing i noticed is that only in firefox vertical scroll appears without need.. (you have to set width and height to 100% in the tag object..)

im very busy this month and i dont know when i will have time to fix it.. or if i'm gonna fix it.. since swfObject 2 is only at beta version and is supposed the have lots of bugs...

i will probably wait a non beta version of swfObject 2 to fix it.. maybe this bug will disappear in the next versions..
#21
by: Miller Medeiros - 11/13/2007 - 17:33
Thank you
This is fantastic! I've been looking for something like this for ages!
#22
by: Andy - 11/19/2007 - 03:57
New Version Released !! - version 2.4
now by default when you set a maximum size for your flash movie it will be centered in the browser window.. if you don't want it to be centered you can just pass another parameter setting the centered to 'false'..
i also made a new example page of those functionalities..
thanks for everybody that helped with the improvement ideas..
#23
by: Miller Medeiros - 11/21/2007 - 09:48
Problems with Safari & MAC
I'm using FitFlash v. 2.4 and SWFObject v. 1.5. I got reports that my site didn´t work on MAC's and Safari - it was only a blank page. I found the problem (some of my coding wasn't 100%) and now it works on the MAC here at work but - one person has reported the weirdest problem. When he gets an e-mail from me with my profile at the bottom which includes a link to my website he can only hear the backgroundmusic and see a blank page. But when he writes the URL directly in Safari it works - que!!!??? All this on a MAC-system. I'm by no means sure if this has anything to do with FitFlash but I've posted about this problem on the SWFObject-forum as well. Have anyone heard of this problem before? He was using the standard e-mail program on the MAC.

All the best, Niklas
The site:
www.widecircle.se
#24
by: Niklas - 11/23/2007 - 05:48
Re: Problems with Safari & MAC
Niklas, i've only seen this problem using Safari for Windows offline.. When you open a URL that isn't local it work well.. this problem isn't related to FitFlash.. it's related to the way the flash movie is being embedded.. i don't know if its a problem with the way safari renders the flash movie when offline..

I've never seen this problem happening online.. send to your friend the link for the example page ( http://fitflash.millermedeiros.com/example.html ) and see if it still happening.. also send link to other flash pages and see if they work..

Cheers..
#25
by: Miller Medeiros - 11/23/2007 - 08:17
thank you
thank you... that was exactly what i was looking for...
#26
by: bernard - 11/24/2007 - 15:27
Setting Height/Width dynamically
Hi,

It would be even cooler to have the possibility to use Flash Fit to set the swf container width/height dynamically through a JS function call!
#27
by: Nick - 11/29/2007 - 08:49
Re: Setting Height/Width dynamically
Nick,

i didn't understood what you meant with "possibility to use Flash Fit to set the swf container width/height dynamically through a JS function call!"...

you can call FitFlash function as many times as you want and pass new values..

you want to use FitFlash just to resize the flash and don't want it to be 100% wid/hei ?? cause the initial idea of FitFlash was just to use in flash sites that has 100% wid/hei..

i don't know what you need.. but maybe you can try using something like that: http://www.mustardlab.com/developer/flash/objectresize/ or just search in google for "resize flash" and test other techniques..

cheers..
#28
by: Miller Medeiros - 11/29/2007 - 11:26
Thanks
Thanks for your prompt answer Miller,

It was a complete misunderstanding on my part and FlashFit fitted my needs perfectly!

Thanks again!
#29
by: Nick - 11/29/2007 - 12:45
bug in Mac firefox
Hey,

This script has been working well, however I'm nearing the end of a project and I've just found a bug that seems to appear in Mac Firefox v 2.0.0.11 (don't know about earlier versions)

It works fine in the windows Firefox v 2.0.0.11

I'm using swfObject and I've uploaded two pages for you guys to try out. The page with the error still loads the flash file and the swf loads the animation plays, it accesses a database and populates itself. But you can't see ANYTHING until you click on the page first? If you dont click you never see anything?

WITH MAC FF ERROR: http://www.goodkarmadrive.org/index2.html
WITHOUT MAC FF ERROR: http://www.goodkarmadrive.org/index3.html
#30
by: luke sturgeon - 12/06/2007 - 09:32
re: bug in Mac firefox
in the earlier versions it worked well.. you've tried opening other flash pages? like the FitFlash example page? i don't know what should be happening.. and i don't have a mac here to test.. i will see what can i do..

test the flash with 100% wid/hei but without using FitFlash and see if it works..

if the example page doesn't work well please leave a reply here so i can check whats the problem or maybe find another solution.. - if the example page works fine just copy and paste and change only what you need..
#31
by: Miller Medeiros - 12/06/2007 - 10:42
Mate you are awlsome, it took me a while to figure out how to use it, maybe you could put an idiots guy to using it or something lol but its great dude

thanks a lot
#32
by: Chris Maguire - 01/02/2008 - 13:29
Hello, I am having one problem with this script. It works wonderfully for my layout but when I use it, my swf will not load and XML content files. Is there a solution for this?

Thank you!
#33
by: Kla Haeck - 01/03/2008 - 09:23
When getting less width than the movie it jumps to the right?!
Not getting it to work properly... When I resize my window to less than the moviesize (1050pixels in my case) the movie jumps to the right?

What causes this and can this be corrected.
#34
by: eMMinet - 01/09/2008 - 15:51
RE: When getting less width than the movie it jumps to the right?!
I allredy worked it out, had something to do with my way of centering...

It works now!

Great script Miller!
#35
by: eMMinet - 01/09/2008 - 16:00
New Version Released !! - version 2.5
[en] **Fixed** a bug that made flash to sometimes don't load.
[pt-br] **Corrigido** bug que fazia o flash algumas vezes não ser carregado.

PS: I don't know if it was totally solved but i couldn't replicate the bug anymore.. so i think it was..
obs: não tenho certeza se o problema foi completamente corrigido mas não consegui reproduzi-lo novamente.. então acho que deve ter sido..
#36
by: Miller Medeiros - 01/22/2008 - 19:19
Fine in FF doesn\'t resize in IE
great job! works like a dream with swfobject in FF but for some reason it wont resize in IE, I\'ve fiddled around the size options and centered but still no luck. Below is my code after metatags, any ideas or help much appreciated...

script type=\"text/javascript\" src=\"swfobject.js\">
script type=\"text/javascript\" src=\"fitflash.js\">
head>
body>
div id=\"homepage\">
You need to upgrade your Flash Player
/div>
script type=\"text/javascript\">
var so = new SWFObject(\"homepage.swf\", \"homepage\",\"100%\", \"100%\", \"6\");
so.write(\"homepage\");
FitFlash(\'homepage\')
#37
by: Eugene - 02/12/2008 - 06:53
re: FAIL
Eugene,

the problem is that your flash movie has the same ID of the DIV.. it causes conflict..

use different IDs for the DIV and the flash movie..

the simplest way to avoid problems is to use the example page that comes inside the "fitflash.zip" file and just change the values you need..

cheers..
#38
by: Miller Medeiros - 02/13/2008 - 09:13
DIV over Flash-Movie
Hi guys,

does anyone of you know if an dhow it is possible to create a div-container which lies over the flashfitted flash-movie and doens't vanish?!? when movie is loaded?

Thanx a lot.
#39
by: Wolle - 02/15/2008 - 07:42
Good job. I'll be trying this out soon. :)
#40
by: jive - 02/18/2008 - 06:47
I dont understand
Hello Miller

I've download FitFlash because that's just what I needed. I dont understand english so good. Do you have a spanish version for the instructions?
Thank you!!!!!
#41
by: Sylvia - 02/23/2008 - 04:42
Thanks!
A very nice time-saver!!! Muito obrigado :)
#42
by: Javier - 02/24/2008 - 15:05
Re: I dont understand
Sylvia, i don't have a spanish version of the instructions.. sorry.. try to modify the example pages and see what you can do.. if you still can't understand send me another msg - can be in spanish - i understand but don't know how to answer well.. lol..

Sylvia, yo no tengo una versión de las instrucciones en español. use la pagina de ejemplo como base e modifique solamente o que necesitas.. caso tenga dudas torna a llamarme.. puede ser en español - yo comprendo pero no sé como responder correctamente..
Lo siento por no hablar español bien.. Saludos
#43
by: Miller Medeiros - 02/25/2008 - 19:26
re: DIV over Flash-Movie
set the DIV 'z-index' to a high level and set the 'position' to 'absolute' (using css) then you set the flash 'wmode' to 'transparent' or 'opaque' like: "so.addParam("wmode", "transparent");"..
it should work.. cheers and good luck..
#44
by: Miller Medeiros - 02/25/2008 - 19:30
loosing mouse wheel after focus
is there a way not to loose the mouse wheel function after clicking into the sfw (focus)? Using swfObject.js with fitflash.js....

Thanks.
#45
by: kta - 03/11/2008 - 18:16
Re: loosing mouse wheel after focus
i don't know how to solve this problem.. try searching for "mouse wheel after click flash" or "mouse wheel after focus flash" in google.. this problem isn't related to fitflash.. it's related to the way the browser deals objects.. if you focus an object the mouse wheel will act only inside that object..

good luck!
#46
by: Miller Medeiros - 03/16/2008 - 21:49
Max height of a swf?
For some reason swfs start misbehaving after they are resized to over/around 4000px.

Text and images display fine but shapes(done in flash) just dont display after that height, they just get cut off like they are being masked. Would love to know whats going on and how to get around it if anyone knows, surely if its a limit in place by Adobe it would be the same for all objects? I cant find any info on it anywhere!!
#47
by: George Coltart - 03/17/2008 - 11:53
re: Max height of a swf?
the guys from Fantasy Interactive ( http://www.fantasy-interactive.com/ ) found a solution for this problem..

http://www.thinkswedish.com/blog/fi/886/The_Flash_height_problem_and_how_to_solve_it

i've seen this when they posted by coincidence.. i just had to search their blog for "flash height"..

you have some very nice works George.. i've seen some of them before at Hi-Res (http://www.hi-res.net/) website.. keep your good work!

cheers..
#48
by: Miller Medeiros - 03/18/2008 - 12:57
Resize 100% on one axis
Is that possible? To have 100% only on one axis?
#49
by: Justin Hammond - 03/18/2008 - 17:23
Re: Resize 100% on one axis
yes, it's possible..

if you want to have a swf file with 100% width (with a minimum width of 780px) and 450px fixed height you have to set a maxHeight size = minHeight size..

it will be like this:
FitFlash ("my_flash", 780, 450, null, 450);

ps: i've set the "maxWidth" as 'null' to the flash don't have a maximum width size.. it will be always '=>' (equal or greater than) 780px..

i've added some tips in the "overview page" to help other people that may want to do the same thing.. thanks for helping me to improve this page..

good luck..
#50
by: Miller Medeiros - 03/19/2008 - 12:37
Tips
I've added a box with "tips" on the 'overview page' inside the "How do i use it?" section explaining some useful stuff..
#51
by: Miller Medeiros - 03/19/2008 - 20:13
Help... por favor
Hello:

I tried to use your script. It works to an extend. I get to see my swf file but somehow it doesn't show full screen. The browser shows blank columns left and right. I don't know what else I can try. Por favor, help!!!

Aaron
Ps: http://www.crafteddreams.net/staging/sample_css
#52
by: aaron - 03/20/2008 - 00:03
I clicked on your link to download and it says that its unavailable. I hope that you haven't removed this. I have been searching for a solution and I think this may be it. Thanks for your great contribution. I really hope that I will be able to download this in the near future.
#53
by: Brian - 03/22/2008 - 22:37
re: Help... por favor / re: download link
Aaron,

try to copy the example page and only change what you need.. probably your html file has something wrong.. i couldn't see the page..

good luck!

----
Brian,

I've deleted the file by mistake.. It's available for download again since day 24..
#54
by: Miller Medeiros - 03/27/2008 - 19:00
** new version and new name ** - swffit 1.0
I've released a new version and changed the name from 'FitFlash' to 'swffit' to avoid legal/trademark problems..

swffit will only work with SWFObject 2.0 and the code was optimized also.

-- pt/br --

Nova versão disponível para download. Mudei o nome de 'FitFlash' para 'swffit' para evitar problemas com a Adobe..

o swffit funcionará apenas com o SWFObject 2.0 e o código também foi otimizado.
#55
by: Miller Medeiros - 03/27/2008 - 20:09
Great work!
Hey this is exactly what I needed, and its simple and qucik, cheers for all your work!
#56
by: Andy Pearce - 03/29/2008 - 09:26
express install
hello, great script .. one question :
The express install from swfobject 2.0 :
I wrote this

swfobject.useExpressInstall('flash/expressinstall.swf');

and gave me a swfobject.useExpressInstall is not a function.

any ideas?
#57
by: madaerodog - 04/01/2008 - 04:11
swfobject 2.0
Also it seems a bit different from swfobject 2.0 latest version posted here :
http://code.google.com/p/swfobject/
#58
by: madaerodog - 04/01/2008 - 04:28
solved
swfobject.embedSWF("flash/main.swf", "main_flash", "100%", "100%", "9.0.0", "flash/expressInstall.swf");

figured it out .
#59
by: madaerodog - 04/01/2008 - 04:51
Centering problem
I tried using swffit at: http://jewishdestiny.com/swffit.php

And to make the example more easily testable, I restricted the size to 500x500.

As you can see- it isn't centering in the page :(.

Also, I'm not so sure it's stretching when it should?

Thanks,
David
#60
by: David Komer - 04/01/2008 - 05:14
Re: Centering problem
the problem is that you're setting a ID and NAME to the swfmovie different of the one that you're passing at the swffit function.. you should remove the "attributes.id" and "attributes.name" or change the "myContent" value to "MainLoader".

if you want to center the flash content i suggest adding [ params.salign = "c"; ] i also recommend setting a max-size for the flash movie that way the flash content will stop stretching after reach the maximum size..

/*
attributes.id = "MainLoader";
attributes.name = "MainLoader";

// if you set a new ID to the flash you should use the same ID at the swffit function..

swffit("MainLoader", 500, 500);
*/

good luck
#61
by: Miller Medeiros - 04/01/2008 - 14:23
Re: swfobject 2.0
it's the same version.. i've downloaded the swfobject 2.0 after the day 03/22 and it was uploaded to google code at 03/14..
#62
by: Miller Medeiros - 04/01/2008 - 14:35
IE 8 Dosent work
It seems to work fine when i imulate IE7 but it dosent work in IE8. I know IE 8 is in Beta mode still but when do you thin you might have a fix for it?

#63
by: Chet Victor - 04/02/2008 - 00:52
Centering fixed
Great, your solution works! :)

Thanks,
David
#64
by: David Komer - 04/02/2008 - 04:52
great script..if i knew how to use it
ok..i'm dumb it's my fault...
but what the heck am i supposed to change in the example?
my html is index.html embedding index.swf...
can i have some clear instructions for dummies please?
change what and where( example html)
add which file to my hosting directory? (swfobject.js , swffit.js)
cheers
#65
by: nik f. - 04/02/2008 - 07:12
great script..if i knew how to use it
Include the swffit.js Javascript file, then just call one simple
javascript function."

Helooo.jaaaava script...!!!! told you i'm dumb.. ;)

cheers
#66
by: nik f. - 04/02/2008 - 07:16
Great work!
Great work, it should be included in the SWFObject main source!

Btw, the online example doesn't work (swf is linked wrong)
#67
by: Niklas Bivald - 04/04/2008 - 04:56
Re: IE 8 Doesnt work
it will work in IE8 when they release a non-Beta version.. because I could spend a lot of time fixing a bug that in the final version probably doesn't exist..
#68
by: Miller Medeiros - 04/04/2008 - 10:30
re: Great work!
Niklas,

the only reason that i think it shouldn't be included in the SWFObject main source is that the most people don't need this functionality and it will increase the file size without a need..

i like a lot the concept of add-ons.. (installing only the things you need..)

here the example page is working well.. i don't know what could happened.. maybe it was a temporary problem in the server (don't know)

thanks for you msg.. cheers..
#69
by: Miller Medeiros - 04/04/2008 - 10:52
Me
Hey ....
I was wondering the best way to go about have one .swf on top of another .. the top .swf works with swffit .. and scrolls :) .. and the bottom .swf does not scroll or is effected by the browser scrollbar (like a css fixed background) - i want it for a dynamic background slideshow :)

Many thanks, keep up the good work

Best,
Paul
#70
by: Paul - 04/05/2008 - 08:20
Re: Me
Paul,

if you want to put one SWF on top of another you have to set the "wmode" of the background SWF to "opaque" or "transparent" and set the "z-index" of the one that will be on top to a higher level.. and just set fitflash to one of them..

good luck!
#71
by: Miller Medeiros - 04/09/2008 - 10:52
May not work for me
HI

I tryed with the example file. Changed the width and height to match my flash and when I resize dowbn the browser it works perfectly. BUT when the browser is big like in a 24\" screen the flash strains and make bad look.

Some solution to this?


#72
by: Rui Ganga - 04/11/2008 - 06:28
Re: May not work for me
try setting the Stage.scaleMode = "noScale" inside flash or setting the SwfObject param { scale:"noscale" } - see the swfobject documentation to learn how to define params..
#73
by: Miller Medeiros - 04/11/2008 - 12:10
Hi,

While using Safari 3.0.4 on a Mac I notice that the SWF tries to load twice and then cancels one of the 2 loads causing the page to show the alert down in the status bar "Cancelled opening the page."

This doesn't affect the functionality of swffit in any way, but I was wondering if you may know of how to avoid the double SWF loads.

Thanks,
Jason
#74
by: Jason Schifferer - 04/15/2008 - 10:18
Jason,

i don't know how to solve this problem.. have you tested without swffit ? because the only thing swffit does is setting some css attributes to the html, object and body tag.. and it also verify the browser window size.. it doesn't load the flash movie - swfobject does it..
#75
by: Miller Medeiros - 04/15/2008 - 13:25
Thanks for the quick response,

I did narrow it down to swffit as the source of the issue, I believe.
The same issue happens with the examples on your site.

I think I found the solution although it seems bizarre.
If I comment out the line:
gEBI(ft).style.position = 'absolute';
the double loading of the SWF no longer is a problem.

I'm not sure what that line is there to accomplish
but taking it out didn't seem to hurt it in:
IE 6 and FireFox 2 on the PC
and Safari 3 and FireFox 2 on the Mac

Anyway I'll stick with the missing line for now,
I'll let you know if it causes any issues.

Thanks for the great script!
Jason

#76
by: Jason Schifferer - 04/15/2008 - 17:14
Jason,

the line [ gEBI(ft).style.position = 'absolute'; ] changes the position of the flash movie to absolute.. so it can resize even if the html width/height is smaller than the flash movie size... firefox have some issues with this..

i have been very busy these days and i didn't tested if it can be removed..

thanks
#77
by: Miller Medeiros - 04/25/2008 - 06:26
SWFFIT AS3 Support
Hey!,

Thx for the great great script, it's wonderfull!
What i was wondering; is there also a swffit AS3 script?

Thanks in advantage!

Timo
#78
by: Timo - 04/28/2008 - 05:17
re: SWFFIT AS3 Support
Hi Timo,

In AS3 you would call:
ExternalInterface.call("swffit","my_flash",650,600);

swffit will do the rest.
#79
by: Jason Schifferer - 04/28/2008 - 17:51
change white BG to match html bg color
First of all...awesome script.

Is there any way to match the white bg when you resize a the swf to the html bg is anything other than white
#80
by: Mark - 05/01/2008 - 04:46
swf object using fit flash set to transparent
is it possible to set the swf file using swf fit to be set as transparent?
#81
by: Mark Parayno - 05/02/2008 - 22:24
Manipulating when not necessary
Been trying out your swffit script. Works great.

I've noticed that the script always manipulates a SWF (requests it twice) even if the SWF's size doesn't need manipulating. For example, if my SWF is embedded at 100%/100% (using SWFObject 2), I assign a fixed pixel width/height as the minimum values for my SWF using swffit, and the browser window opens at a size that's *larger* than these minimum values (so that 100% is used), the SWF is requested again anyway.

What I'm getting at is this. If the SWF is embedded at 100%/100% already, it shouldn't need to be 'resized' by swffit unless the browser window is too small. This would prevent the SWF from being requested twice on window load.
#82
by: TD - 05/16/2008 - 10:24
SWFAddress conflict
I'm trying to use swffit with swfobject swfaddress, but whenever I include the swfaddress.js script, it seems to break swffit. At least on safari mac (sorry I didn't test on others yet) if I include swfaddress.js, I don't get any scroll bars no matter how small the browser window is. If I change nothing else but do not include the swfaddress script, things work just fine.

Any thoughts? At this point, I've given up because I'm not sufficiently knowledgeable about js to fix the problem, so I'm hacking the history.js files to work with swfobject, since they don't appear to conflict with swffit. Sure would be nice if SWFObject, SWFAddress, SWFFit and the BrowserManager could all play nice together. Have you considered something like a SWFObjectContrib project to possibly start down that path? I think SWFFit is a great thing, and would love it if these complementary technologies could be tested more throughly together.
#83
by: graphex - 05/19/2008 - 23:28
Can this be done?
Can you try this link

http://homesite.obeo.com/Viewer/Default.aspx?tourid=440931

then click on the second icon (double arrow) for virtual tour and then click on the fourth button for Full Screen. This allows for the entire browser enviroment to \"disappear\". Is there a way to do this with your tool? Thanks...
#84
by: hans guth - 05/22/2008 - 15:59
SWFAddress conflict
Hi swffit is great but I have also had the same conflicts with SWFAddress as graphex (above). Just wondering if anybody has found a workaround for this?
#85
by: j - 05/26/2008 - 04:02
FullScreen
Olá!
Segui as instruções e consegui colocar o scroll sem problemas. Valeu mesmo!
Agora queria saber se tem como colocar o parametro allowfullscreen (botao no .swf) e menu (clicar com o botao direito do mouse)

swfobject.embedSWF("flash_gallery.swf", "my_flash", "750", "550", "9.0.0");
swffit("my_flash",750,550);


desde já agradeço pela atenção
#86
by: Edu - 05/27/2008 - 19:01
re: SWFAddress conflict
i've never had any problem with SWFAddress. maybe it's related to something in your html..

sorry for the delay but i was on vacation.. good luck.
#87
by: Miller Medeiros - 05/28/2008 - 11:37
re: swf object using fit flash set to transparent
var flashvars = {};
var params = {wmode:"transparent"};
swfobject.embedSWF("yourmovie.swf", "yourmovie", "100%", "100%", "8", "", flashvars, params);

read the swfoobject documentation for more options: http://code.google.com/p/swfobject/wiki/documentation
#88
by: Miller Medeiros - 05/28/2008 - 11:42
re: Can this be done? / re: FullScreen
yes it's possible..

read this article: http://www.adobe.com/devnet/flashplayer/articles/full_screen_mode.html

and the swfobject documentation:
http://code.google.com/p/swfobject/wiki/documentation

good luck!

Edu, na documentaçao do swfobject tem os params 'menu' (true/false) e 'allowfullscreen' é só ver na documentação como que coloca parametros no swfobject.

abraço.
#89
by: Miller Medeiros - 05/28/2008 - 11:46
Firefox minimum height bug?
This is a fantastic script!

I have had a recent problem though, and I'm not sure when or how it cropped up, because it only recently started occurring.

In Firefox, when changing the minimum height, it's bumping the value up
from the assigned value for some reason. Here's an example and the source files:

http://www.kawarime.com/test3/test3.html
http://www.kawarime.com/test3/test3.zip

Surprisingly, this problem doesn't exist in Firefox in a local setting, only via a web server.

Any idea?
#90
by: Brian Rouleau - 05/28/2008 - 19:23
re: Firefox minimum height bug?
i don't know whats the problem.. here the stage height after pressing the button is equal to 2000.. i don't know what problem is happening to you and why..

good luck..
#91
by: Miller Medeiros - 05/29/2008 - 13:31
Thanks
Thanks for looking at it, hopefully it's something only isolated to me.
#92
by: Brian Rouleau - 05/29/2008 - 19:39
action scrtipt 2 component
is there a problem with as2 orginal component ?

Because my problem is;

when i useing as2 orginal component (datagrid,textarea...) then i click to swf area and mouse scroll track cant scroll page. if i click to scroll bar then mouse can scroll with scroll track wheel. what is the focus problem with as2 orginal component ? i tested without as2 componet and result no problem with scroll.
#93
by: alasedor - 05/30/2008 - 18:30
SWFFit vs SWFAddress
have the same issue tha was described by graphex

if include swfaddress.js swffit stops working

please any comments?
i am using the latest swfaddress v 2.1

thanx
#94
by: Eugene - 06/02/2008 - 15:01
Booya!!
This has made my day! I implemented a hack for this ages made up of various solutions but it never really ever did the job. Thank you so much for your work on this!

Woohoo!!!!
#95
by: farser - 06/19/2008 - 17:43
clueless.... help me lol
it looks great and sounds great but I have no idea where to put this.... I am not a coder I only do the animation side of things in flash but I would like know.

#96
by: jj - 06/20/2008 - 06:36
still clueless but here is what i have and it does not work for me



swfobject.embedSWF("shrink_new2.swf", "my_flash", "800", "91", "8.0.0");
swffit("my_flash",800,91);
#97
by: jj - 06/20/2008 - 07:36
re: SWFFit vs SWFAddress
i've been really busy these days.. when i find some time i will try to fix this problem..
#98
by: Miller Medeiros - 06/23/2008 - 20:17
Re: clueless.... help me lol
Copy the example page that comes with the swffit.zip file and just change what you need, this is the easiest way to avoid bugs. Be sure that the path to your swf and js files are ok..

good luck
#99
by: Miller Medeiros - 06/23/2008 - 20:21
problems IE7 using scroll=auto
hi miller,
great script - thanks!
just one thing: i'm using <body scroll="auto"> in the index.html to avoid the "empty" scrollbar in IE. this is working great, but the swf isn't resize to the whole borwser width - looks like the 10 or sth pixels where the scrollbar is supposed to be, are empty ...!?

do u know this issue?
if not, maybe you could have a look ...

regards ... phil
#100
by: Philipp Kyeck - 06/24/2008 - 06:41
re: problems IE7 using scroll=auto
I've edited the example page and it worked well..

I don't recommend using the .. You should use html{overflow:auto;} instead..

try to edit the example page that comes with the swffit.zip file.. maybe something in your html isn't right..

good luck..
#101
by: Miller Medeiros - 06/25/2008 - 18:49
re: re: SWFFit vs SWFAddress
the problem wasn't related to SWFFit.. it is related to SWFAddress 2.1
and SWFObject 2.0..

to SWFAddress 2.1 work with SWFObject 2.0 you need to set an ID to the
SWF file like below..

var flashvars = {};
var params = {};
var attributes = {id: "flash"};
swfobject.embedSWF("myswf.swf", "holder", "550", "400", "8.0.0",
"expressInstall.swf", flashvars, params, attributes);
swffit('flash');

when you do that everything works just fine !! (SWFAddress and SWFFit)

ps: you have to use the same ID that you have set to the flash movie in
the swffit function..

ps2: sorry for the huge delay but I was traveling for about 1 month and
I've been very busy since I came back.
#102
by: Miller Medeiros - 06/29/2008 - 07:34
SWFFit vs SWFAddress
I've just tried this and can't get SWFAddress to work.
Could you provide a working example for download?
cheers!
#103
by: pomac - 07/01/2008 - 19:20
Solution: White 'flash' when loading SWF file into HTML page.
I struggled with this issue for a while and then I finally solved the problem. My HTML background color is black (#000000) and so is my FLA/SWF file's background; however, when I would view the page (using SWFfit and SWFobject in the HTML), there would always be a brief flash of white before the SWF started to load/play. Here is the code that fixed the problem (note: change the two #000000 to the background color of your page/stage, and the YOURswfID and YOURswfFILE.swf to your Flash file ID and filename, and put this within the HEAD tags of your HTML page):




var flashvars = {};
var params = {bgcolor: "#000000"};
var attributes = {id: "YOURswfID"};
swfobject.embedSWF("YOURswfFILE.swf", "YOURswfID", "990", "450", "9.0.0","expressInstall.swf", flashvars, params, attributes);
swffit("YOURswfID",990,450,990,450);


body{
background-color: #000000;
}


Enjoy!
Gregor
#104
by: Andrew von Gregor - 07/04/2008 - 16:08

Post a Comment

Name

E-mail (Will not appear online)

Homepage

Title

Comment

To prevent automated Bots form spamming, please enter the text you see in the image below in the appropriate input box. Your comment will only be submitted if the strings match. Please ensure that your browser supports and accepts cookies, or your comment cannot be verified correctly.

phrase
Please type what is written in the image.

Powered by Comment Script