TextEvent doesnt work if loaded from swf

Hello all!

I have a textfield that is populated from an external xml file, inside it a LinkEvent exists and works correctly…

if however I call an SWF(which also contains a TextEvent) from inside the XML, the SWF will not recognise the TextEvent…

Confused by my poor explanation?

try this simple example code…

The 1st textEvent works fine, however if it is called from a SWF it does not work…


// test.as
package {
    import flash.display.MovieClip;
    
    
    import flash.text.TextField;
    import flash.utils.Timer;
    import flash.events.TimerEvent;
    import flash.events.TextEvent;
    import flash.events.Event;

        
    public class test extends MovieClip {
        
        public var doTest;
        
        function test() {

            doTest= new getXML("test");

            var myTime=new Timer(1,0);
            myTime.addEventListener("timer",init);
            myTime.start();
        }
        
        function init(evt:TimerEvent) {
            if (doTest.myXML != null) {
                evt.currentTarget.stop();
                
                    var thisText = new TextField();
                    trace(doTest.myXML.tabinfo[0]);
                    thisText.width= 450;
                    thisText.height= 450;
                    
                    
                    thisText.wordWrap=true;
                    
                    thisText.htmlText = doTest.myXML.tabinfo[0];
                    addChild(thisText);                  
                    
            }        
        }
    }
}

here is my XML


<?xml version="1.0" encoding="utf-8"?>

<root>

<tabinfo><![CDATA[<p>
<a href="event:popup0"><font color="#06452C">this works</font></a>


this does not work<img width="452" height="220" src="./test.swf" vspace="0"/>

</p>]]></tabinfo>
</root>

Can anyone help or suggest a workaround or something?

I’ve been trying to fix this all day, and am out of ideas…

Any help would be most appreciated, thanks in advance!