PDA

View Full Version : changing the document height & width


mrand01
10-06-2005, 05:16 PM
it seems like I should just be able to do:

fl.getDocumentDOM().height = myNumber;

but I can't when myNumber is not an integer. Is there any way to round numbers in JSFL? I need to round a number like 222.3 to 222 so I can accomplish this...

tobyw_1969
10-06-2005, 07:31 PM
the Javascript command for rounding is the same as AS so you can do this..

round_me.jsfl...

var h=223.4567
var height=Math.round(h);
fl.trace("rounded height:" + height);