This content has been marked as final. Show 4 replies
The letter index starts at 0, just like an array, so the 6th letter has index 5. If you just want the 'a' you don't need to use indexOf("-") for the second index. Otherwise, it should be indexOf("-",5) to avoid the first '-' before the a.
first, don't use a dash in flash unless you mean to indicate subtraction because that's what flash will try and do when it encounters a dash: it will try and subtract a and 0_mc from spkr when it encounters spkr-a-0_mc.
fix that and then see if you have any problem.
Thank you both for your responses. I did a combo of both - removed the hyphens and fixed my starting and end point of the substring. I was confused about the start point, i thought you started at the character before not the actual character. Have a good weekend all and thanx.