Im looking to try to use the new RegExp class in replacement of substring to pick up all instance names with the string "step" as part of its name
Heres what i have so far thats not working
ActionScript Code:
var searchClip:RegExp=/step/;
var thingy:MovieClip;
for(thingy inthis){if(this[thingy].type ==MovieClip){trace(thingy);
searchClip.test(thingy.name);
}}
First I got an error that told me searchClip was a name used internally, so I switch it to: searchMyClips
After that I got no errors but also no traces. I put a trace just inside the for loop but my string did not trace. Two things i did notice. The keywords each and is are still black. Is that normal?
Well....that all depends on how the rest of your code looks.
for each in and for in loops both only iterate through dynamic properties, so if you don't have any of those in your for loop, then it probably won't show up.