Re: [Flashcoders] how do i say "string" + anything?

2009-09-24 Thread Nicolas Cacace
You have to cast the variable as a String before the concatination or the two values might be incompatable ___ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Re: [Flashcoders] how do i say "string" + anything?

2009-09-24 Thread strk
On Wed, Sep 23, 2009 at 05:36:20PM -0700, Steven Sacks wrote: > var compareBranch:String = "index/nav/home/whatever/else"; > > if (compareBranch.indexOf(event.validBranch) > -1) Would fail if the substring is found farther than the beginning. Should be checked for being == 0 eventually. --strk;

Re: [Flashcoders] how do i say "string" + anything?

2009-09-23 Thread Steven Sacks
var compareBranch:String = "index/nav/home/whatever/else"; if (compareBranch.indexOf(event.validBranch) > -1) On Sep 23, 2009, at 5:56 AM, Kenneth Kawamoto wrote: Or you could just use indexOf(). Kenneth Kawamoto http://www.materiaprima.co.uk/ strk wrote: On Wed, Sep 23, 2009 at 12:40:55PM

RE: [Flashcoders] how do i say "string" + anything?

2009-09-23 Thread thomas horner
attyfig.figleaf.com] On Behalf Of Kenneth Kawamoto Sent: 23 September 2009 13:57 To: Flash Coders List Subject: Re: [Flashcoders] how do i say "string" + anything? Or you could just use indexOf(). Kenneth Kawamoto http://www.materiaprima.co.uk/ strk wrote: > On Wed, Sep 23, 2009 at 12

Re: [Flashcoders] how do i say "string" + anything?

2009-09-23 Thread Kenneth Kawamoto
Or you could just use indexOf(). Kenneth Kawamoto http://www.materiaprima.co.uk/ strk wrote: On Wed, Sep 23, 2009 at 12:40:55PM +0100, thomas horner wrote: what i need to know if how to say is ; if(event.validBranch == "index/nav/his" + "anything else that might follow"){ Compare a

Re: [Flashcoders] how do i say "string" + anything?

2009-09-23 Thread strk
On Wed, Sep 23, 2009 at 12:40:55PM +0100, thomas horner wrote: > what i need to know if how to say is ; if(event.validBranch == > "index/nav/his" + "anything else that might follow"){ Compare a substring of event.validBranch, from start to length of "index/nav/his". --strk; Free GIS &