Page 1 of 1
Exported SWF dimensions
Posted: Thu Jan 03, 2008 12:52 pm
by fabio.vitali
I have to export a PPT presentation in SWF format. Opening and exporting it through OOo causes a strange behaviour: with PPT page format identical, the exported SWF has sometimes different dimensions (_width and _height).
I need to load the SWF in a Flash application that "play" the slideshow, and I need all the presentations have the same dimensions. Can someone explane me the way in witch the JOD converter calculates the SWF width and height?
thanks, Fabio Vitali
Re: Exported SWF dimensions
Posted: Sun Jan 13, 2008 11:51 pm
by acknak
Sorry you never got an answer to your question--have you found any solution yet?
Re: Exported SWF dimensions
Posted: Fri Feb 29, 2008 5:40 pm
by fabrix.xm
acknak wrote:Sorry you never got an answer to your question--have you found any solution yet?
i've got the same problem some time ago.
Seems that OOo export the swf with a stage of 720x576px, but places also object "off stage".
When you ask _widht and _weight of a movieclip, flash returns the bounding-box of the movieclip.
The solution I've used is to calculate the size to resize to in proportion to the default width of 720x576
something like:
Code: Select all
var OOSWF_WIDTH = 720
var OOSWF_HEIGHT = 576
function setOOoDim(mc, nw,nh) {
sw = ( nw / OOSWF_WIDTH) * 100.0;
sh = ( nh / OOSWF_HEIGHT) * 100.0;
mc._xscale = sh;
mc._yscale = sw;
}
"mc" is the movieclip with the OOo slide show
eg:
setOOoDim ( mcSlide, 100,55);
scale the "mcSlide" to have the slides to 100x55px
(
note i don't have flash here right now, I can't test the code
)