By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,359 Members | 1,495 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,359 IT Pros & Developers. It's quick & easy.

Is there any javascript function available to auto resize swf

P: n/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 ?
Jun 27 '08 #1
Share this Question
Share on Google+
7 Replies


P: n/a
Anz wrote:
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.
Jun 27 '08 #2

P: n/a
Anz
On Jun 25, 4:00 pm, Stevo <n...@mail.invalidwrote:
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
Jun 27 '08 #3

P: n/a
Anz
On Jun 25, 4:18 pm, Anz <anzbmuham...@gmail.comwrote:
Thanks for the reply , but it doesn't fix the problem, when i did so,
the height of the swf is reduced considerably
Any other solution ?
Jun 27 '08 #4

P: n/a
Anz wrote:[quote]
On Jun 25, 4:00 pm, Stevo <n...@mail.invalidwrote:
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.
Jun 27 '08 #5

P: n/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

Expand|Select|Wrap|Line Numbers
  1. <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
  2. codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/
  3. swflash.cab#version=7,0,19,0" width="100%" height="100%">
  4. <param name="movie" value="<?=$this->baseUrl?>/public/data/
  5. startintro/<?=$this->start_intro?>?<?=time()?>">
  6. <param name="quality" value="high">
  7. <embed src="<?=$this->baseUrl?>/public/data/startintro/<?=
  8. $this->start_intro?>?<?=time()?>" quality="high" pluginspage="http://
  9. www.macromedia.com/go/getflashplayer" type="application/x-shockwave-
  10. flash" width="100%" height="100%">
  11. </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
Jun 27 '08 #6

P: n/a
Anz wrote:
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
Jun 27 '08 #7

P: n/a
Anz
On Jun 26, 10:23 am, Stevo <n...@mail.invalidwrote:
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

I am still with that problem ???
Jun 27 '08 #8

This discussion thread is closed

Replies have been disabled for this discussion.