Click to See Complete Forum and Search --> : Auto Resize
imladris
04-27-2005, 09:30 PM
I HAVE NOTICED THAT ON SOME WEBSITES THE SIZE OF THE SWF AUTOMATICALLY RESIZES TO FIT IN THE BROWSER WINDOW.
THE SITE I HAVE CREATED IS 900 PIXELS WIDE AND 700 PIXELS WIDE, WHICH WORKS FINE ON MY PC, BUT ON THOSE WITH LOWER RESOLUTION IS USELESS.
CAN ANYONE TELL ME HOW TO ACHEIVE THIS AUTO RESIZING.
I AM IMPORTING THE FILES INTO FRONTPAGE 2000 BEFORE PUBLISHING TO THE WEB.
AN EXAMPLE THE MAIN INTERFACE CAN BE FOUND AT www.martyn.guitarman.ukonline.co.uk
THANKS
MARTYN
docree
04-27-2005, 09:57 PM
Set your width in the page's code to %.
Such as 99% by 99%. It does not always give the best
results, but works none the less.
My Caps Lock key was broken, once, too.
Hey guys, I'm back on my meds. Whoo-Hoo! j/k
DocRee
gusmus
04-28-2005, 03:25 AM
Here is the section of code you need to change. As Docree pointed out, it doesn't always give the best results but it works. If you compare the " Width & Height " sections of the code with the original code KM generates you will notice that the sizes have been changed to "%" instead of "px".
As the size of your SWF is large "900 X 700 px", you should have no problems but be careful when using anything smaller than 600 X 400 px as it can lead to distortion on larger monitors.
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id=index width=100% height=100%codebase="http://active.macromedia.com/flash2/cabs/swflash.cab#version=4,0,0,0">
<param name="movie" value="index.swf" />
<param name="quality" value="high" />
<param name="play" value="true" />
<param name="loop" value="true" />
<param name="bgcolor" value="#ffffff" />
<embed src="index.swf" width=100% height=100% bgcolor="#ffffff" quality="high" loop="true"
If you want your swf to be full screen then I wonder why you are embedding into "Frontpage", The KM generated html will do the jobe just as well.
imladris
04-28-2005, 06:00 AM
Dear Gusmus
I've always avoided the changing of the code because it appears to be in Japennese hehehe
However, i took your good adive and changed the width and height values to 100% using the hmtl editor in Frontpage. It did exactly what I was trying to acheive. Now the poor sods with low resolution will need a magnifying glass hehe
Thanks matey!!!!!
gusmus
04-28-2005, 07:14 PM
Glad it helped,,, but dump the frontpage and html your stuff,, frontpage makes huge files full of gobbldeygook just to do the same job.
hule2
10-01-2005, 12:09 PM
Hi Dudes!
Replacing fixed width/height to percents (I used 99%) works fine...
with Internet Explorer. In Mozilla Firefox the SWF is displayed
in thumbnail size, even smaller than the original "creation" size.
I know the Slideshow I did there looks very poor (replaced for 5hItty..
got censored ) ... I was busy on other things, so its just a placeholder
for the final animation.
Getting rid of Mocrisoft Products (Gusmus is absolutely right) like
M$ Office (alt=OpenOffice.org - fine javabased free stuff) or
Frontpage (better learn some HTML and edit manually) I donŽt want
to use and recommend Exploder anymore...
So any Ideas to make this autosizing work on Mozilla/Firefox?
By the way: I my case the HTML is opened in a JS-popup,
maybe thats the cause for this malfunction(?) ?
YouŽll find the flash-popup under Menuentry "Die Story"
clicking on the Image or on the foot phrase "Band-History en detail...."
Here is the site : http://www.piccadilly.musicpage.de
w.brants
10-01-2005, 12:27 PM
When you want to display your swf using a percentage, always check how it looks in different window sizes. Most of the times it isn't a good idea. Bitmaps look worse, shapes may be off by a pixel due to rounding issues, dynamic text may be hard to read.
It usually works better if you want to cover the whole stage to access the width and height properties of the stage and place and scale your objects dynamicly using scripting or center the content.
tmoore935
10-01-2005, 12:27 PM
Hi Dudes!
YouŽll find the flash-popup under Menuentry "Die Story"
clicking on the Image or on the foot phrase "Band-History en detail...."
Here is the site : http://www.piccadilly.musicpage.de
Is this a german rock band or what?
docree
10-01-2005, 01:40 PM
Some links to get started in the right direction...
Check out the scale mode...
OBJECT and EMBED tag attributes (http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_12701)
IE: <param name="scale" Value="exactfit">
Tech note: size limited in FireFox... (http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=91d5f5d7)
This may be the cause and offers a work around.
hule2
10-01-2005, 09:29 PM
EXACT FIT!
100% Hit by Doc Ree.
Found my Info.
Thanks so much.
@ w.brants: You rock, but in this case all thoughs are wasted time...
but, thanks for watchin/helpin anyway.
@ tmoore935 : I really LOVE not just like your style... and your kind of music..
--That subject is a REVIVAL site of an 70s Cover Band (CCR etc.)
@ docree : YOU DID it ... in this case, where "nothing else matters", btw one of my favs songs by metallica, i followed your linx and GOT HAPPY!
:mrpimp:
IT WORKS! Thats all...
Fine work, guys.
stefan
docree
10-01-2005, 10:16 PM
Remember guys [and girls], you need the tags for both EMBED and OBJECT for it to work...
It's where many projects go sour.
Now that I've seen that tech note,
I need to check my sites that are going size crazy in FF.
Thanks, Stefan.
A round of applause for Brants, Tmoore, and the rest of the gang.
Oh the tangled web we weave.
flashkit.com
Copyright WebMediaBrands Inc., All Rights Reserved.