mercredi 24 février 2016

detect if htmlText contains a particular word in AS3

I've got this code :

movieDetailsClip.detailsTxt.htmlText = "<U>hours:</U> " + item.moviehour;

where item.moviehour is some hours taking from my database (item:Object)

How can I tell the code :

if item.moviehour contains the word "2D"{
</BR> after "2D"
}

I suppose it's simplier to put item.moviehour into a string.

So I've added :

 strMovie = item.moviehour;

Searching the word "2D" is :

var searchWord:int = strMovie.indexOf("2D");

Now, how can I tell to go to the line () after the word "2D" ?

Thanks

Aucun commentaire:

Enregistrer un commentaire