www.webdeveloper.com
Results 1 to 3 of 3

Thread: [RESOLVED] Browser issue with Flash file

  1. #1
    Join Date
    Oct 2008
    Location
    moreno valley, California ,usa
    Posts
    161

    resolved [RESOLVED] Browser issue with Flash file

    I have a flash file that "scales" differently depending on the browser. For IE I have to use one Flash file(intro.swf) while for all others, I use a different Flash file (intro2.swf) file. I think everything is fine because I test both files on my PC running Windows7 and the files play OK as I test them on my downloaded versions of Safari, Opera, FF;

    Here's the problem, I had a chance to view the page on a MAC and to my surprise and disappointment, intro2.swf was scaled wrong...way too small. The MAC Safari browser rendered it differently than Safari on my PC.

    I am using javascript to use browser detection; here's a outline of the code:

    function getBrowserName()
    {
    var name = "Unknown";
    if(navigator.userAgent.indexOf("MSIE")!=-1) {
    name = "MSIE";
    } else if(navigator.userAgent.indexOf("Firefox")!=-1) {
    name = "Firefox";
    } else if(navigator.userAgent.indexOf("Opera")!=-1) {
    name = "Opera";
    } else if(navigator.userAgent.indexOf("Chrome") != -1) {
    name = "Chrome"; }
    else if(navigator.userAgent.indexOf("Safari")!=-1) {
    name = "Safari";
    }
    return name;
    }
    var browserName = getBrowserName();
    var setobject=setFlashObject();
    function setFlashObject() {

    if(browserName == "MSIE")
    {
    .....play intro.swf....

    else if(browserName == "Firefox")
    {
    .....play intro2.swf...

    etc.
    you can see the actual page at:
    http://www.captsigerson.com

    the flash I'm refering to that scales wrong is the spinning banner in the middle.

    Anyone have a thought or suggestion?

    thanks,
    captsig
    Last edited by captsig; 01-14-2012 at 08:46 PM.

  2. #2
    Join Date
    Feb 2008
    Location
    NW Washington State
    Posts
    1,856
    First off, I don't see any Flash "scaling"... or are you talking about the spinning text in the center changing from small to large?
    Typically Flash "scaling" is an embedding parameter that resizes the entire .swf depending on which param is set:
    http://www.aleosoft.com/flashtutorial_autofit.html
    Second, why would you need a second .swf for those other browsers anyway?
    Testing on my machine...the way you have it set up now, the link does a correct display in IE, But in FF and Safari the text is small, as you say, but doesn't even show in Chrome.
    So from here, there is a lot more problems with your current solution than just the Mac issue.
    As a long time Flash and Web developer, I've never used different .swfs for different browsers. I'd be very curious to see swf version 1 in all the browsers... since from what I am seeing, version 2 doesn't work in any of the targeted browsers.
    You might find that your method of what you are calling "scaling" is not correct in the .swf itself... and the browsers are not at fault.
    Best wishes,
    Eye for Video
    www.cidigitalmedia.com

  3. #3
    Join Date
    Oct 2008
    Location
    moreno valley, California ,usa
    Posts
    161
    Yes,the spinning banner was the problem;but your comments made me think about things differently; I re-inserted the flash file using swfobject()...using only one version of the flash file and it appears to be playing correctly in all the browsers.

    Thanks for your response.
    captsig

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles