The problem is to search bit of text and replace any occurance of the searched string with something new, with
RegEx class and built-in
replace function of
String class it is very easy.
recently I have upgraded flash player (126.96.36.199), and suddenly found that one of my components was throwing following error:
ArgumentError: Error #1063: Argument count mismatch on Main/removeLinkStyleClass(). Expected 0, got 6.
I was surprised as the code wasn’t changed and it was working earlier. When I have opened the problematic function I’ve noticed that it is the one used in replace function as the second parameter AS3 function replace(pattern:*, repl:Object):String. As I was creating this method following up the documentation I was using the arguments object, however after the flash player update this error appeared. At first I was lost with that, but then I’ve tried with …(rest) parameter, and it worked!
So if you will have the same problem try to modify your method to include the …(rest) parameter:
//do what ever you need with args and return string
p.s. I will try to find the FP version when it started to be a problem, maybe it was announced?:)
recently I’ve used Rectangle’s equals() method and found that it incorrectly returns false when both rectangles are the same. Problem occurs when any of the properties of the Rectangle are NaN (not a number).
I’ve found a problem with a TextField rendering HTML tags. The problem manifests itself with bold, italic and underline style being applied to whole text soon after respective closing tag is somehow malformed. Here is the scenario:
Have you tried to generate documentation out of your code? I bet you did, and I bet that like me you have found many obstacles to succeed. Here I will describe how I finally made it, I hope you will find it useful.