This content has been marked as final. Show 10 replies
If you post more information I might be able to help you. I would need example code of both the actionscript you are using and your text file (or what it is you want to parse).
Thanks for responding.
A brief survey of the operations:
On my site users perform searches (Flash-->PHP-->MySQL).
Results are most often html lists or texts.
They are displayed in scrollable dynamic text fields.
And, most often, result displayed is only a part of the total result.
The total result often exceeds the dimensions of a printed page.
At the moment, I send the variable value (the "total result") to a built-in movie clip named PRINTMC which contains a dynamic text field named printFld.
first frame label "#p" and printFld, stop();
second frame "#b" and a 600x800 bounding box
I have also built two other movie clips named PRINTMCTWO and PRINTMCTHREE identicals to PRINTMC and ready to receive, if necessary, the continuation of what will be printed on the first page.
Of course I only get printed, at the moment, the first part of the total result.
The part which fits the page.
The problem is:
How to parse myPrintStr (see attached code) to have it printed in full ?
hmmm this is a bit more complex than i thought. i'm not sure i can help!
Don't be sorry...
Hope one of the gurus around will help me to solve this problem which sounds as elementary for an expert !
Thank you! Thank you!
I got two tutorials from peachpit but I never saw this one...
I give it a try and give you some feeback about the results!
Originally posted by: Rob Dillon http://www.peachpit.com/articles/article.aspx?p=1019624&seqNum=8
I tried it.
But it still prints the first part of the text on one page.
I give you below the code in my print button.
I didn't understood very well the "keep adding pages to the print job"
May be my writing is wrong as I misplaced my if/else statement...
If you can find my error...
You need to use the code from the bottom of that 8th page. That's where all of the code is listed.
Yes, of course.
Did you try the code in a new file?
I doesn't work.
trace(maxScroll); is undefined which result in only one page printed.
The problem with the code is located in
var visibleRows:Number = textArea.viewableRows;
which should have been
var visibleRows:Number = (textArea.bottomScroll) - (textArea.scroll);
(my targets have different names but it doesn't change anything to the problem)
Yes, I did try the code in a new file and it worked fine. If you take your text and place it in a new movie using the code from the article, test the movie and then enlarge the window to see the whole text object that holds the copy to be printed. You will see that textfield is set to be a full page. If your text does not fill that space then you may have a problem with the way that Flash is reading your text, or you may not have enough text to fill that space. You can change the size of the textfield to force more pages.