Exported SWF dimensions

Discuss the presentation application
Post Reply
fabio.vitali
Posts: 1
Joined: Thu Jan 03, 2008 12:49 pm

Exported SWF dimensions

Post 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
User avatar
acknak
Moderator
Posts: 22756
Joined: Mon Oct 08, 2007 1:25 am
Location: USA:NJ:E3

Re: Exported SWF dimensions

Post by acknak »

Sorry you never got an answer to your question--have you found any solution yet?
AOO4/LO5 • Linux • Fedora 23
fabrix.xm
Posts: 1
Joined: Fri Feb 29, 2008 10:58 am

Re: Exported SWF dimensions

Post 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 :) )
Post Reply