PDA

View Full Version : Printing content from a dynamic text field


gilgamesh
12-06-2001, 07:07 AM
I have a textbox (with a scroller) and want to implement a Print button which would obviously print the whole content of that textbox.
The textbox content is uploaded from text files with loadvariable, therefore, the print mechanism needs to be able to cope with different text lengths.
I found some litterature on how to print frames and so on, but nowhere I can find more details on such functionality.

Does anybody have any info on that topic ?

Thanks

Jean

Ricod
12-07-2001, 04:19 PM
Put an MC with a dynamic textfield outside your 'stage'. When u load yer text do a :
PrintDummy.Textfield = MyText;

The textfield should be as wide as u want it to appear on your paper, depending on the width of your bounding box.

Now here's the only problem :
The number of lines of your text. When it exceeds the height of your bounding box, the rest will not appear.

Workaround :
cut up your loaded text into smaller sections. Like Part1="MyFirstTextPart"&Part2="MySecondTextPart" etc.
Then load like this :
PrintDummy.TextField1 = Part1;
PrintDummy.TextField2 = Part2; etc. or use a for loop.

U will need to put each textfield into its own frame in the PrintDummy MC and label it as #p. Also put in a frame with a bounding box. Label that frame #b.

The printcommand :
getURL ("print:", "PrintDummy");

Also, check if its fully loaded before u print and that the client has at least flash player v4.020

Good luck !