Click to See Complete Forum and Search --> : Scale Parameter not working in SWFObject


fortehweb
10-13-2008, 06:30 AM
For some reason the SWFObject is not altering my SWF to fit the size of the box on load of the page. I have tried 'showall' and 'showAll' but neither is selected by default. If I right-click the flash I can select the scale but I would like the scale to fit the box by default.


<div id="vvid">
<div id="vvidnoflash">There should be a rolling demo here. If it does not display you may not have a recent version of <a href="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash">Adobe Flash</a> installed.</div>

<script type="text/javascript">
var so = new SWFObject("vrollingdemo.swf", "vrollingdemo", "250", "166", "8", "#FFFFFF");
so.addParam('scale','showall');
so.addParam('loop','true');
so.addParam('wmode','transparent');
so.addParam('allowfullscreen','true');
so.write("vvidnoflash");
</script>

</div>

Eye for Video
10-13-2008, 12:17 PM
Unless I'm misunderstanding what you want, have to tried to just skip (don't use) the
so.addParam('scale','showall');
Set the size that you want on the html page in here:
var so = new SWFObject("vrollingdemo.swf", "vrollingdemo", "250", "166", "8", "#FFFFFF");
EfV

fortehweb
10-14-2008, 04:32 AM
Unless I'm misunderstanding what you want, have to tried to just skip (don't use) the
so.addParam('scale','showall');
Set the size that you want on the html page in here:
var so = new SWFObject("vrollingdemo.swf", "vrollingdemo", "250", "166", "8", "#FFFFFF");
EfV

Thanks for the suggestion, removing the parameter entirely doesnt seem to make a difference, it still displays the .SWF full-size but the view is constrained by the size of the 'box' (250x166) so I only see a small section of the whole .SWF/video.

The .SWF is an exported slideshow from some software, if it comes to it I may have to import the .SWF into Flash and extract the Bitmaps and create a new slideshow from scratch using a .SWF + .FLV.

I tried the code with the same parameters on another .SWF and .FLV I have and it scales the video to fit the 'box' accordingly without problems.

I'm at a loss as to why it doesnt work.

Eye for Video
10-14-2008, 09:41 AM
Bummer! Normally swfobject will display the swf at the dimensions set in the var. I've resized up and down just using that. It must have something to do with the third party software used to create the slide show.
Were the dimension of the slide show set large so the viewer could go full screen with it?
Here are a list of scale parameters I found on the Adobe site, try these:
scale - Possible values: showall, noborder, exactfit.

default (Show all) makes the entire movie visible in the specified area without distortion, while maintaining the original aspect ratio of the movie. Borders may appear on two sides of the movie.

noorder scales the movie to fill the specified area, without distortion but possibly with some cropping, while maintaining the original aspect ratio of the movie.

exactfit makes the entire movie visible in the specified area without trying to preserve the original aspect ratio. Distortion may occur.

http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_12701&sliceId=1
Best of luck,
EfV

fortehweb
10-16-2008, 06:14 AM
Bummer! Normally swfobject will display the swf at the dimensions set in the var. I've resized up and down just using that. It must have something to do with the third party software used to create the slide show.
Were the dimension of the slide show set large so the viewer could go full screen with it?
Here are a list of scale parameters I found on the Adobe site, try these:


http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_12701&sliceId=1
Best of luck,
EfV

Thanks for the suggestions dude. I appreciate you doing the leg work. Alas, I couldnt get it to work properly so I had to go round the long way and re-create the slideshow in Flash from scratch. I think it must have been something to do with the lame slideshow software that created the file in the first place. *sigh*

Thanks again.