+ Reply to Thread
Results 1 to 9 of 9

Thread: Flash & Firefox scaling problems

  1. #1
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    10,069

    Default

    Hi all.
    This ones been bugging me for a few months now and I've finaly found a work around.
    Basically if I publish a Flash site from Macromedia Flash to HTML such that the resultant swf file resizes to fill the whole browser window, it works fine in IE, Netscape & Opera. However in Firefox the swf file fills only 30% of the available browser window (which is usually too small to read)

    Example: Try viewing this file in IE, Netscape or Opera. It should scale to fit the browswer window (whilst retaining the correct proportions). Now view it in Firefox. It only fills 1/3rd of the browser window.

    When a an HTML file is generated by Flash it adds the following html code:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    NOTE the 'XHTML 1.0' bit. This is the code that causes the problem within Firefox.

    There are 2 workarounds.

    Woraround 1: change the above to:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    This works fine if your site is purely a Flash site, but isn't really puka coding as it should contain the link to the dtd file (whatever that is)

    Woraround2: Change the above to:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">

    Which is correct html wise but unfortunately reintroduces the original scaling problem back into Firefox !!!!!

    The solution here is to create a css file (you can use notepad, and just save as .css instead of .txt), even if you don't use them in your Flash movies. The file should contain the following:

    html, body {
    width: 100%;
    height: 100%;
    margin: 0px;
    padding: 0px;
    }

    I saved this as 'false.css'

    Now add the complete text to your HTML file:

    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <link href="false.css" rel="stylesheet" type="text/css">

    and post the false.css file in the same directory.

    Now Firefox will scale the embedded swf file to fill the browser window.

    You can test this here

    One problem that I have found however that the above now introduces a margin along the top of the window in Opera. Could someone confirm this for me?

    Hope this helps someone.

    Egg
    Egg
    Valued Contributer
    Dell Vostro 200 / Intel Core Duo CPU E7200 @ 2.53 GHz / RAM 4 GB / ATI Radeon HD 2600 XT Dual Monitor / Vista Business

  2. #2
    Join Date
    Dec 2000
    Location
    Out behind the henweigh...
    Posts
    5,156

    Default

    Hey Egg,

    you might want to try "marginheight=0 marginwidth=0 topmargin=0 leftmargin=0" in the body of the document itself.

  3. #3
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    10,069

    Default

    Doesn't work John
    I always imported the following into my html files:
    <LEFTMARGIN=0 TOPMARGIN=0 MARGINWIDTH=0 MARGINHEIGHT=0 padding=0>
    Which worked for IE, Netscape & Opera. But unfortunately doesn't work for Firefox. Not only this but Firefox won't update (refresh) files containing Flash swf files.
    Egg
    Egg
    Valued Contributer
    Dell Vostro 200 / Intel Core Duo CPU E7200 @ 2.53 GHz / RAM 4 GB / ATI Radeon HD 2600 XT Dual Monitor / Vista Business

  4. #4
    Join Date
    Dec 2000
    Location
    Out behind the henweigh...
    Posts
    5,156

    Default

    Hi Egg,

    That really sux... I will have to look into this more. I knew that the docmentation for firefox was way behind for firefox, now it looks like it is just plain buggy... let me see what I can find tonight.

  5. #5
    Join Date
    Jul 2005
    Location
    italy
    Posts
    3

    Default

    hi everyone http://www.talkgraphics.com/images/smilies/smile.gif

    i tried the solution posted with ff 1.0.4, but had no results: any other idea?

    thanks http://www.talkgraphics.com/images/smilies/smile.gif

    (for the mods: i hope i didn't break any rule upping a several months old thread)

  6. #6
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    10,069

    Default

    Rebelia

    No problem replying to an old thread. What happens if you just remove the following from the script:
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

    This is the method I tend to use more often now, as it's a pain including all the css links etc each time you republish a site. It works fine for me.

    Let me know if you're still having problems.

    Egg
    Egg
    Valued Contributer
    Dell Vostro 200 / Intel Core Duo CPU E7200 @ 2.53 GHz / RAM 4 GB / ATI Radeon HD 2600 XT Dual Monitor / Vista Business

  7. #7
    Join Date
    Jul 2005
    Location
    italy
    Posts
    3

    Default

    that it works, uff!

    the trouble is that i can't take it off http://www.talkgraphics.com/images/smilies/frown.gif
    the customer i'm working for wants a valid code and the possibility to check it through the link to the w3c validator :

    i guess i will ask him to choose: the file working OR the validation (awfully i'm working on a layout that is not mine, so i can't modify it to fix the trouble in some other way)

    thanks for your help http://www.talkgraphics.com/images/smilies/smile.gif

  8. #8
    Join Date
    Aug 2000
    Location
    Harwich, Essex, England
    Posts
    10,069

    Default

    rebelia
    Okay. First can you tell me what you see if you click HERE

    In Firefox, do you see that the full browser real estate is being used?

    I've just upgraded to Firefox 1.0.4 and it views at full browser window to me.

    Perhaps if you can send the URL you're having trouble with. If you don't want to post it here, email me at e.bramhillNOSPAM.btopenworld.com [just take out the NOSPAM])

    Egg
    Egg
    Valued Contributer
    Dell Vostro 200 / Intel Core Duo CPU E7200 @ 2.53 GHz / RAM 4 GB / ATI Radeon HD 2600 XT Dual Monitor / Vista Business

  9. #9
    Join Date
    Jul 2005
    Location
    italy
    Posts
    3

    Default

    i can see a movie filling all the browser window (but i've seen you're using the embed attribute); i'm sending you the files by mail http://www.talkgraphics.com/images/smilies/smile.gif

+ Reply to Thread

Similar Threads

  1. Replies: 28
    Last Post: 03 September 2009, 06:42 PM
  2. Flash PNG export
    By sgiff in forum Xara Flash
    Replies: 2
    Last Post: 17 July 2007, 01:51 AM
  3. Flash Nav Bar Problems . . .
    By boccaboy in forum Site Design and Publishing (non-Xara)
    Replies: 3
    Last Post: 01 June 2004, 02:02 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts