CS4 to CS5 issue, I think

Hello,

I made a SWF using CS4 a while back. Now I am trying to publish it with CS5. Nothing is working. Are there compatability issues with CS5?

Can someone take a look at this and tell me if anything looks like it might cause a problem?


import fl.controls.TextArea;
import flash.text.TextFormat;
import fl.managers.StyleManager;
import flash.external.ExternalInterface;
import flash.text.StyleSheet;
import flash.geom.ColorTransform;var popUrl:String = getFlashVars().pUrl;
var pupTitle:String = getFlashVars().popTitle;
var style:Object;
mcXout.addEventListener(MouseEvent.CLICK, handleClose);
mcXout.buttonMode = true;
mcXout.useHandCursor = true;

/*************** Move once I get the CSS style to work. *************************/
var newColorTransform:ColorTransform = transform.colorTransform;
newColorTransform.color = 0x2c4592;
mcHeader.transform.colorTransform = newColorTransform;
mcPopup.mcBorder.transform.colorTransform = newColorTransform;
/*************** Move *********************************************************/
var myTextFormat:TextFormat = new TextFormat();
myTextFormat.size = 13;
myTextFormat.align = TextFormatAlign.LEFT;
myTextFormat.rightMargin = myTextFormat.leftMargin = 30;
mcPopup.txtContent.setStyle("textFormat", myTextFormat);

/********* Load the HTML file. ***************************************************************************************/
var loadHTMLFile:String = popUrl;// Get the URL for the HTML file
var loadedHTMLFile:String;// Variable to store the HTML data
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, handleHTMLLoad);
loader.addEventListener(IOErrorEvent.IO_ERROR, onIOError, false, 0, true);
loader.load(new URLRequest(loadHTMLFile));
 
mcPopup.txtContent.setSize(470, 280);// Size the textArea.

/*********  <--- All of this rediculous code eliminates a blue border around textArea component and makes it non-selectable. ---->  ***/
mcPopup.txtContent.setStyle("borderStyle", "false");
mcPopup.txtContent.setStyle("borderColor", "white");
mcPopup.txtContent.setStyle("focusRectSkin",Sprite);
var DescriptionField:TextArea=getChildByName("txtContent") as TextArea;
mcPopup.txtContent.addEventListener(Event.RENDER, onDescriptionRender);
function onDescriptionRender(evt:Event):void
{
 var textArea:TextArea=evt.target as TextArea;
 textArea.textField.selectable=false;
}
/******************************  <---  End of rediculous code (for now) ---->  ***/
function getFlashVars():Object
{
 return Object(LoaderInfo(this.loaderInfo).parameters);
}
function handleClose(evt:MouseEvent):void
{ 
 extInterface("hidePup");
}
 
function handleHTMLLoad(evt:Event):void
{
 txtTitle.text = pupTitle;
 mcPopup.txtContent.htmlText += "If you are seeing this message, there was an error loading the file" + loadedHTMLFile;
 
 loader.removeEventListener(Event.COMPLETE, handleHTMLLoad);
 
 replaceChars(loadedHTMLFile);
 loadedHTMLFile=String(evt.target.data);
 var rex:RegExp = /[
]*/gim; 
 loadedHTMLFile = loadedHTMLFile.replace(rex,'');
 loadedHTMLFile = loadedHTMLFile.replace(/\s{1,}(.*?)/g, "$1 ");
 
 mcPopup.txtContent.htmlText = "
" + loadedHTMLFile;
}
 
function extInterface(jsFunction):void
{
 ExternalInterface.call(jsFunction); 
}

function onIOError(evt:IOErrorEvent):void
{
 mcPopup.txtContent.text= "
 ERROR. If you are seeing this, there was an error loading the correct file. Please contact your instructor with the following information. Error = " + evt.text;
}