Hi,
I'm wondering if anyone knows how the image dimensions are automaically calculated and inserted into the image dialog box? I want to do the same thing for flash, but can't figure out how to do it. I know how to get the dimensions using php, just can't get them back into the javascript.
I thought maybe knowing how it works for the image function would help?
Any suggestions at all would be greatly appreciated!
Thanks heaps,
jes
I'm wondering if anyone knows how the image dimensions are automaically calculated and inserted into the image dialog box? I want to do the same thing for flash, but can't figure out how to do it. I know how to get the dimensions using php, just can't get them back into the javascript.
I thought maybe knowing how it works for the image function would help?
Any suggestions at all would be greatly appreciated!
Thanks heaps,
jes
RE: Flash Dimensions - Calculate *Please!*
RE: Flash Dimensions - Calculate *Please!*
$format = GetImageSize($file); // $file is your swf file
$wh = explode(' ', $format[3]);
$swfwidth = preg_replace('/[^0-9]/', '', $wh[0]);
$swfheight = preg_replace('/[^0-9]/', '', $wh[1]);
Then give the width and height to the fck_flash.html
this.parent.document.getElementById('txtWidth').value = '<?PHP echo $swfwidth; ?>';
this.parent.document.getElementById('txtHeight').value = '<?PHP echo $swfheight; ?>';
Sven
RE: Flash Dimensions - Calculate *Please!*
Thanks for you response! That works perfectly for a predefined swf file, however now I am having difficulty getting the url that is selected when the user hits "browse server" to give to the php to figure out the dimensions.....
If anyone has any ideas on that one I would really appreciate it!
Thanks,
Jes
RE: Flash Dimensions - Calculate *Please!*
It's ok, I have it sorted now
Re: Flash Dimensions - Calculate *Please!*
Where to put these codes?