Is there any javascript function available to auto resize swf

A

Anz

Can any one know the javascript function to auto resize the swf when
resizing its pop up window.
I need to auto resize the swf when i resize my popup window in which
the swf is displayed.
Is there any javascript function available to perform this
requirement ?
 
S

Stevo

Anz said:
Can any one know the javascript function to auto resize the swf when
resizing its pop up window.
I need to auto resize the swf when i resize my popup window in which
the swf is displayed.
Is there any javascript function available to perform this
requirement ?

Just set it's width and height both to "100%" and it'll resize
automatically to it's container size (a div or the whole page). You can
even retrieve that information inside the Flash by getting the stage size.
 
A

Anz

Just set it's width and height both to "100%" and it'll resize
automatically to it's container size (a div or the whole page). You can
even retrieve that information inside the Flash by getting the stage size.

Thanks for the reply , but it doesn't fix the problem, when i did so,
the height of the swf is reduced considerably
 
S

Stevo

Anz said:
Thanks for the reply , but it doesn't fix the problem, when i did so,
the height of the swf is reduced considerably

That sounds like you've got a fixed aspect ratio. This is to avoid the
SWF looking squashed. If you play around with resizing the window width
and height you should find that you find the sweet-spot where it fits
perfectly. At that point you've set your browser to the same aspect
ratio as the swf. I don't know Flash myself, I just get SWF files from
people who do, and I know that you can have a fixed aspect ratio. I
think you'll have more success on an Adobe forum than here.
 
A

Anz

Thank u Stevo
i am just loading the flash from its location with the help of html
tags and php code, as like

<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/
swflash.cab#version=7,0,19,0" width="100%" height="100%">
<param name="movie" value="<?=$this->baseUrl?>/public/data/
startintro/<?=$this->start_intro?>?<?=time()?>">
<param name="quality" value="high">
<embed src="<?=$this->baseUrl?>/public/data/startintro/<?=
$this->start_intro?>?<?=time()?>" quality="high" pluginspage="http://
www.macromedia.com/go/getflashplayer" type="application/x-shockwave-
flash" width="100%" height="100%">
</object>


and I too don't know Flash myself. As u said, if i am getting the
fixed aspect ratio, how can I change that ?,
Is this due to any problem with the browser ? , i am using Firefox
 
S

Stevo

Anz said:
Thank u Stevo
I too don't know Flash myself. As u said, if i am getting the
fixed aspect ratio, how can I change that ?,
Is this due to any problem with the browser ? , i am using Firefox

It's a property of the SWF itself. You'd have to get some Flash
developer to re-save it with the fixed aspect ratio turned off. I assume
(but don't know) that it would be a check-box somewhere in Flash. I just
googled it and see a few threads discussing it. Perhaps it can be
overridden from your tag somehow.

http://www.google.com/search?q=flash+swf+aspect+ratio
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,822
Latest member
israfaceZa

Latest Threads

Top