Home Forums General XMetaL Discussion Read Flash (SWF) dimensions Reply To: Read Flash (SWF) dimensions

Derek Read

Reply to: Read Flash (SWF) dimensions

I think this example (attached as example2.zip) may get you closer to what you want.

1. Unzip all files to a new empty folder.
2. Open test.xml
3. See that an SWF is rendered (the same lorem.swf as before).

In Tags On view you can click just inside an opening or closing tag to trigger a custom form called swfBrowser.xft to launch (it needs to be just inside, but not on the control itself because Shockwave eats clicks that hit it directly).

The same form is launched when you insert an element using the Element List (in either Tags On view or Normal view).

I think the form does the logical thing. It tries to keep the @width and @height from the XML if the selection is already inside an element that has href/width/height set, but if you browse for a new file it uses the TGetProperty() method to extract the width and height from the SWF itself, which you can then alter if you like before clicking the OK button to either update an existing or insert a new one.

It also tries to do some fancy stuff like display the full path to the SWF file in the dialog for the user but fix that up to be relative in the XML source.

I am seeing the odd rendering behaviors with the other stuff we've tried (as you described previously) but not with this example. The MCR has been simplified in example2.zip. It seems that merely calling TGetProperty() in the MCR triggers the odd behaviors though I'm not sure and I don't know why that would be but also when I embed IE (instead of embedding the control directly as before) these issues seem to go away (so it could also be that Shockwave really wants to be inside IE which is likely the only place it is ever tested by Adobe).