Hello, thanks for reply :-)
Well, what I'm trying to do is:
Have one movieclip whith some input fields like Name, Telephone, Email and one TextArea or if best another inputfield (multiline in this case) where I can write what I need.
Then, using the code I'm posting (not that one, he doesn't work :-) ), I want to print the first textfields and all the content of the TextArea. But the TextArea must be splited in several pages, depending of the amount of text he has.
This is my not working code
_root.folha.imprimir.onPress = function() {
// texto_orc is the instance name of the TextArea, who is inside movieclip _root.folha
_root.folha.texto_orc.setSize(285, r.folha.texto_orc.maxVPosition*12);
trace(_root.folha.texto_orc.maxVPosition*12+(212.5));
};
//
_root.folha.imprimir.onRelease = function() {
var print_:PrintJob = new PrintJob();
// Here I'm trying to define the number of pages I need, folowing this think
// var paginas:Number = (_root.folha.texto_orc.maxVPosition*12+(212.5)/593);
// I'm trying to know how many lines the TextArea has, then multipling it for 12 pixel (8 for each line of text plus 4 for leading), // + 212.5 whitch is the space I need to print all the other textfields / 593 (the page size)
var paginas:Number = (_root.folha.texto_orc.maxVPosition*12+(212.5)/593);
trace(paginas);
for (var i = 0; i<paginas; i++) {
if (print_.start()) {
if (print_.addPage(paginas, {xMin:0, xMax:419, yMin:0, yMax:593}, null, 1)) {
}
}
}
if (paginas>0) {
print_.send();
}
delete print_;
};