a convoluted workaround would be to use a proxy SWF to load the target SWF as a child movieclip. the proxy could then report the child movieclip's dimensions to JavaScript via ExternalInterface.
but that's an awful lot of overhead: the SWF would effectively be loaded twice, Flash Player has twice as much work (and CPU cycles), and ExternalInterface requires even more overhead. it isn't elegant but it would work. - philip On Thu, Oct 9, 2008 at 1:54 PM, gumphfy <[EMAIL PROTECTED]> wrote: > > Thanks, but I was really hoping for a JS or an AJAX solution, since my > (free) host has file-access disabled. > I've used getimagesize() before to get the dimensions, but that's not > an option. > > Thanks anyway. > Any other way to solve this? > > On Oct 9, 10:24 pm, "Philip Hutchison" <[EMAIL PROTECTED]> wrote: > > you can use PHP to get the SWF's size dimensions before embedding the SWF > to > > your HTML page. > > > > http://www.sephiroth.it/swfreader.php > > > > - philip > > > > > > > > On Thu, Oct 9, 2008 at 12:17 PM, gumphfy <[EMAIL PROTECTED]> wrote: > > > > > How can I detect the dimensions (width&height) of a flash file, and > > > then use those values with SWFObject? > > > > > I've tried somehting like: > > > > > function getDimensions() { > > > var obj = document.getElementById('movie'); > > > var w = obj.TGetProperty('/',8); > > > var h = obj.TGetProperty('/',9); > > > } > > > > > swfobject.embedSWF("flash.php?id='.$id.'", "movie", + w, h, + "9.0.0", > > > "expressInstall.swf"); > > > > > I have absolutely no knowledge of javascript what-so-ever, but > > > searching around the web resulted in the above. > > > That doesn't work however. > > > > > So how do I make it work? > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "SWFObject" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/swfobject?hl=en -~----------~----~----~----~------~----~------~--~---
