Text versus htmlText in texteffect

Hi Coders.

I have tried to do a script which makes a texteffect.
It is one of those regulars in which you use dynamic text, at multiline, with substring and an onEnterFrame.

So the textfield starts at noll characters and goes up.

But the main problem which I dont know how to handle really is when it comes to make the .text property to a .htmlText property.

It seems to be really difficult to port the code for .text to allow .htmlText.

Since when using substring on a html-formatted string will take all html-markup into consideration.

Is there any solutions you can think of?

Thanks