Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

flash not resizing in firefox

Posted on 2005-05-08
11
Medium Priority
?
1,312 Views
Last Modified: 2013-11-19
Hi all,

I'm embedding a flash file on my page and am using the scale='exact fit' parameter. This works in IE but not firefox, i.e. in firefox there is 'leftover' display box.

My embed code:

<OBJECT classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0' ID='1' WIDTH='500' HEIGHT='350'>

<PARAM NAME=movie VALUE='media/{$_GET['file']}'>
<PARAM NAME=loop VALUE='true'>
<PARAM NAME=quality VALUE=high>
<param name='SCALE' value='ExactFit'>
<EMBED src='media/{$_GET['file']}' loop=true quality=high WIDTH='500' HEIGHT='350' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'>
</EMBED>
</OBJECT>

any ideas why this is not working?

N.B. It seems to work fine in minimizing flash file to fit the screen but not scaling it up

Katie
0
Comment
Question by:katneej
  • 4
  • 3
  • 2
  • +2
11 Comments
 
LVL 4

Expert Comment

by:punkstar
ID: 13953530
when you publixh the movie, make sure that you make the dimensions as percentages (100% x 100%)...

in flash mx it is

file >> publsih settings >> HTML >> Dimensions = Percent

That should work perfectly then, considering you have have styled your webpage correctly.
0
 

Author Comment

by:katneej
ID: 13953616
Hi punkstar,

The trouble is that these are .swf files and have been created by third parties..i have no access to the .fla file and therefore cannot edit their dimensions
0
 
LVL 16

Expert Comment

by:Sohel Rana
ID: 13955073
>> i have no access to the .fla file and therefore cannot edit their dimensions

You can convert the swf file to .fla file by flash decompiler software, after that you can change the size of your flash file :

http://www.sothink.com/flashdecompiler/index.htm

rsdn
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:katneej
ID: 13955248
yes, but I have numerous amount of flash files to place on the site, i.e. it's a flash game website, and apart from being unethical it would be ridiculously cumbersome to do this for every game....the layout is fine in IE but not firefox, there must be a browser specific fix for this one
0
 
LVL 4

Expert Comment

by:biXen
ID: 13957517
CSS into the body tag margin-top, left, right and bottom just to be sure it's not something IE takes for granted and Firefox does not. Like:

body{
margin-top: 0px;
margin-left: 0px;
margin-right: 0px;
margin-bottom: 0px;
}

Also, try changing BOTH the object and embed tags in your code to read 100% instead of 500 and 350 for width and height.
0
 
LVL 4

Expert Comment

by:punkstar
ID: 13961706
hmmm...mite i suggest a layout change!?
0
 
LVL 1

Expert Comment

by:saddy1
ID: 13963537
Try SCALE='ExactFit' in the EMBED tag.

Side point: you might want to change the PHP so you're not using a $_GET parameter directly in the Flash file - i.e. the line: VALUE='media/{$_GET['file']}'

What happens if someone sets the GET parameter to something like:
' ><script>alert('you have been hacked')</script>
(this would be url encoded of course).

--saddy1--
0
 

Author Comment

by:katneej
ID: 13972449
How do you mean 'if someone changes the get parameter?' They could only do that by typing in the url with the above code..if they want an alert box surely thats their choice?

I will try embedding the scale parameter...
0
 
LVL 1

Expert Comment

by:saddy1
ID: 13972923
I got this from:

http://www.governmentsecurity.org/articles/PenetrationTestingforWebApplications.php

See under "Cross Site Scripting (XSS)"

"This can be abused in a number of ways, depending on the intentions of the attacker. A short piece of Javascript to submit a user's cookie to an arbitrary site could be placed into this URL. The request could then be hex-encoded and sent to another user, in the hope that they open the URL. Upon clicking the trusted link, the user's cookie would be submitted to the external site. If the original site relies on cookies alone for authentication, the user's account would be compromised. "

--saddy1--
0
 

Author Comment

by:katneej
ID: 13976866
Thanks for that saddy1, however I won't be using cookies...

This problem is still present though...I'll show you all an example..if you go to www.jammyjunction.com/games.php and select the game 'duck hunt' which is the 6th one down in the left column and play it in internet explorer and then firefox you will see the difference i mean...it expands in IE but not firefox...i've tried embedding the exact fit parameter in the embed section although i'm a little uncertain what you mean there:


<EMBED src='media/{$_GET['file']}' loop=true quality=high WIDTH='500' HEIGHT='350' TYPE='application/x-shockwave-flash' PLUGINSPAGE='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash'>

<param name='SCALE' value='ExactFit'>

</EMBED>
</OBJECT>  ??

I've also tried setting all the height and width settings to 100% but this just stretches the movie over the whole content div...any more ideas peeps?

Katie
0
 
LVL 1

Accepted Solution

by:
saddy1 earned 1500 total points
ID: 13979642
I meant
<EMBED SCALE='ExactFit' ...>

--saddy1--
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Color can increase conversions, create feelings of warmth or even incite people to get behind a cause. If you want your website to really impact site visitors, then it is vital to consider the impact color has on them.
This article was originally published on Monitis Blog, you can check it here . Today it’s fairly well known that high-performing websites and applications bring in more visitors, higher SEO, and ultimately more sales. By the same token, downtime…
The purpose of this video is to demonstrate how to reset a WordPress password if you are locked out and cannot reset the password. A typical use would be if you cannot access the email to which WordPress would send the password recovery email to…
The purpose of this video is to demonstrate how to add AdSense Ads to a WordPress Website, and how to set up WordPress to automatically place Ads in Sidebars. This will be demonstrated using a Windows 8 PC. Log into your AdSense account. : Cli…
Suggested Courses
Course of the Month20 days, 18 hours left to enroll

810 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question