Input text / embed problem

I’m working on a flash file that is a video clip and beneath the video, there’s an input text field where a user can get the code to embed the video in their page (youtube code). The problem is that when I have plain text in the text field it works, but when I try to use html code, I get an actionscript error and it doesn’t show up. This is my actionscript (leaving out the full url):

this.onMouseUp = function() {
if (Selection.getFocus() != “null”) {
setTimeout(setSelect, 10);
function setSelect() {
var firstChar:Number = Selection.getBeginIndex();
var lastChar:Number = Selection.getEndIndex();
if (firstChar == lastChar) {
var txtFld:TextField = eval(Selection.getFocus());
Selection.setSelection(0, txtFld.length);

center_txt.autoSize = “false”;
center_txt.text = “<object width=“425” height=“355”><param name=“movie” value=”“http://www.etc…”;