all groups > flash actionscript > december 2005 >
You're in the

flash actionscript

group:

printing dynamic text


printing dynamic text talnagar
12/14/2005 9:44:55 PM
flash actionscript:
hi,

I'm trying to pring a dynamic text box,
but it only prints the text that appears on stage at the moment.
how do I get over this problem?

thanks for anyone who can help

Re: printing dynamic text SatishkumarB
12/15/2005 12:12:14 PM
You need to create a new movie clip/textarea outside the stage with a bigger
size to display the entire text and set its text to the current contents and
then add this mc to addpage. I got this some time back through google search to
fix one of my client's problem on printing dynamic text,

Thanks & Regards,
Anuradha Satish
yourDeveloper.in
Re: printing dynamic text MOLOKO
12/15/2005 12:22:07 PM
[quoted text, click to view]
dynamically create a 'printable' movieclip offstage, create a textfield
inside it, copy the formatting of the original textfield (using
getTextFormat), set the textfield's autoSize property to "center", copy
the contents of the original textfield in, then print that movieclip.
job done.

--
MOLOKO
Macromedia Certified Flash MX 2004 Developer
Macromedia Certified Flash MX Developer
------------------------------------------------
::remove _underwear_ to reply::
'There ain't no devil - it's just God when he's drunk' Tom Waits
------------------------------------------------
GCM/CS/IT/MC d-- S++:- a- C++ U--- P+ L++ !E W+++$ N++ O? K+ w+++$ !O M+
Re: printing dynamic text talnagar
12/16/2005 9:55:42 AM
hy,
thanks for the answer.
i understand what i should do but since i'm a newbe to action script i started
getting a little mixed up..
if you have a second to help me clear some things up u'll thank you.

i have the original text with the instance name "mainContent",
the movie clip outside stage is "print" and inside it the dynamic text "text".

to use the gettextformat() to get the text from "mainContent" to "text" how
should i use the script?

Re: printing dynamic text MOLOKO
12/16/2005 10:02:56 AM
[quoted text, click to view]

text isn't a good instance name for a textfield since 'text' is a
property in flash. let's call it 'text_txt' instead. so, from the same
timeline as mainContent:
var copied_fmt = this.mainContent.getTextFormat();
this.print.text_txt.setNewTextFormat(copied_fmt)
this.print.text_txt.setTextFormat(copied_fmt)
this.print.text_txt.text = this.mainContent.text;


--
MOLOKO
Macromedia Certified Flash MX 2004 Developer
Macromedia Certified Flash MX Developer
------------------------------------------------
::remove _underwear_ to reply::
'There ain't no devil - it's just God when he's drunk' Tom Waits
------------------------------------------------
GCM/CS/IT/MC d-- S++:- a- C++ U--- P+ L++ !E W+++$ N++ O? K+ w+++$ !O M+
AddThis Social Bookmark Button