var textfield:TextField = new TextField();
var myformat:TextFormat = new TextFormat();
var clip:MovieClip = new MovieClip;
var transManager:TransitionManager = new TransitionManager(clip);
var XPos:uint = 24;
var YPos:uint = 12;
var offSet:uint = 24;
john_btn.addEventListener(MouseEvent.CLICK, funcJohn);
jimmy_btn.addEventListener(MouseEvent.CLICK, funcJimmy);
function formatLetters()
{
myformat.color = 0x000000;
myformat.font = "Tahoma";
myformat.size = 36;
myformat.bold = true;
textfield.setTextFormat(myformat);
textfield.background = true;
textfield.backgroundColor = 0xFFFFFF;
textfield.border = true;
textfield.autoSize = TextFieldAutoSize.LEFT;
clip.addChild(textfield);
clip.x = XPos;
clip.y = YPos;
clip.bold = true;
}
function funcJohn(evt:MouseEvent)
{
formatLetters();
textfield.appendText("John");
parent.addChild(clip);
transManager.startTransition ({type:Photo, direction:Transition.IN, duration:.3, easing:None.easeNone});
transManager.startTransition ({type:Zoom, direction:Transition.IN, duration:.3, easing:Regular.easeOut});
removeChild(clip);
}
function funcJimmy(evt:MouseEvent)
{
formatLetters();
textfield.appendText("Jimmy");
parent.addChild(clip);
transManager.startTransition ({type:Photo, direction:Transition.IN, duration:.3, easing:None.easeNone});
transManager.startTransition ({type:Zoom, direction:Transition.IN, duration:.3, easing:Regular.easeOut});
removeChild(clip);
}