tags:

views:

11

answers:

1

Hi,

I'm using deeplinking in a Flex 3 application. I've got a ViewStack and I'd like to use the id's of the canvases in the url.

I've read that search engines prefer hyphens over underscores as word separators. So, the search engine sees "big-book" as a separate word, but "big_book" as possibly one word. Also, underscores are obscured when a link is underlined.

For the above reasons, I thought that it would be good to use hyphens. The problem is that Flex doesn't allow hyphens in an id. Is there a work around? What's a good way to handle this.

<ViewStack>

  <Canvas id="my_stuff"></Canvas>

  <Canvas id="my_stuff_more"></Canvas>

  <Canvas id="my_stuff_lots"></Canvas>

</ViewStack>

Thank you.

-Laxmidi

A: 

Okay,

I went ahead and replaced the underscores with dashes.

var selectedStack:String = mainViewStack.selectedChild.id;

var dashedURLFragment:String = selectedStack.replace("_","-");

Thank you.

-Laxmidi

Laxmidi