Groups | Blog | Home
all groups > flash actionscript > may 2004 >

flash actionscript : printing a text from a text box


goFlashMX
5/14/2004 10:47:12 PM


I am trying to make a button that will allow the user to print out his notes from a textbox. Does anybody know how to do it?

Kevbo
8/17/2004 5:38:37 PM
goFlashMX

Two things, put the textbox (tBox) in a movieclip (named mClip) and attach
this code to your button.

on (release) {
print ("mClip","bmovie");
}

or if you can't put it in a movieclip, we have to do it the hard way, so try
this, forgive me if there are any bugs, I haven't tested it. Put this code in
the first frame of your movie.

createEmptyMovieClip("mClip",1);
mClip.createTextField("tBox",2,0,0,300,400); // 300,400 refer to the size of
the TField in the format width,height
mClip.tBox.text = firstTextBox.text;
// then, name your button instance whatever name you want
buttonName.onRelease = function () {
print ("mClip","bmovie");
}

And that should do it. Hope this helps.

Kevin Cathey
DigitalM Studios
AddThis Social Bookmark Button