replaceAll() function for Javascript (and ActionScript)

Ever needed to replace all the instances of a string in Javascript (or ActionScript)? This function takes three parameters, the string to find, the string to replace it, the string to search and an optional setting to toggle case sensitivity. Syntax .replaceAll(target:string, findToRemove:string, replacement:string, [caseSensitive:int=0 ]) Example function call searching the string "Bob, bob and...

Read More

ActionScript to Javascript Communication

In my last post I showed how to communicate from Javascript to ActionScript.  To do so I used ExternalInterface in my ActionScript.  ExternalInterface allows traffic to flows both ways. We'll start in ActionScript this time.  Ensure you have imported the ExternalInterface class. Then create a call to Javascript using the 'call' method of the ExternalInterface...

Read More