i ended up using a slice, bit messy but worked.

function onAfterGoto(event:GaiaEvent):void {
                                var subString:String;
                                subString=event.validBranch;
                                trace("subslice = "+ subString.slice( 13 )
);
                                trace("current branch = "+
event.validBranch);

                                if ((nav2.numChildren < 0) &&
(event.validBranch == ("index/nav/his"+ subString.slice(13)))) {
                                        createSubNavhis();
                                        TweenMax.to(menuBar, 0.25, {x:-270,
ease:Bounce.easeInOut});
                                        createBackButton();
                                }

-----Original Message-----
From: [email protected]
[mailto:[email protected]] 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: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 & Flash consultant/developer      ()  ASCII Ribbon Campaign
>  http://foo.keybit.net/~strk/services.html  /\  Keep it simple! 
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to