11 May 2008

Flex example: simple navigation

Coding in Flex is possible in different ways, which depends on habits and personal style. Someone likes pure code, simple text editors and messing with compiler, while others are much happier with heavy IDEs. Flex Builder has more to offer with both styles, source coding and design approach.

Next example shows how to create simple navigation with just few lines of code. We use natural combination of two tags ViewStack and LinkBar. ViewStack has four Canvas tags and every one of them includes one Text field. Just to make difference between Canvases text fields have labels Home, Portfolio, About and Contact.

Connection between ViewStack and LinkBar is made with properties. ViewStack has id property with value “myViewStack” and LinkBar property dataProvider with same value. Grab source code below.




Download source.

* * * * * *

From yesterday, Flanture is part of Flash Bookmarks, excellent Flash directory.

4 comments:

FlashBookmarks said...

Thanks for the link to flexbookmarks.

I want to point that there's also http://www.flashbookmarks.com

Good luck.

flanture said...

Oh, even better, thanks!

Anonymous said...

Hi there :-)

Very cool, was looking for an example like this :-) Hmm, how would you do sub-links? Havent found any example about this yet...

Thanks & regards
Gerald

John said...

Hello,
I found a good library to navigate between page on viewstack, it support browser navigation and authorization. http://code.google.com/p/ticlib/

 

template by blogger templates