Search the web
Sign In
New User? Sign Up
ydn-flash · Yahoo! Flash Developer Group
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Real people. Real stories. See how Yahoo! Groups impacts members worldwide.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Yahoo Flash Tab Component   Message List  
Reply | Forward Message #1321 of 2036 |
Re: Yahoo Flash Tab Component

Hi,

You do not need to load any data into the TabBar. You can listen for
events from the TabBar and display you movie clips based on the event.
For example, if you have 3 movie clips you want to show when the tabs
are clicked, you could do something like this.

//assumes you have already created and added your movie clips to the
stage and set their visibility
var myMovieClips = [myMovieClip1, myMovieClip2, myMovieClip3];

var myTabBar:TabBar = new TabBar();
myTabBar.dataProvider = new DataProvider(["Movie Clip 1", "Movie Clip
2", "Movie Clip 3"]);
myTabBar.addEventListener(Event.CHANGE, handleTabBarChange);
addChild(myTabBar);

function handleTabBarChange(event):void
{
var index:int = ( event.currentTarget as TabBar ).selectedIndex;
var len:int = myMovieClips.length;
for(var i:0; i < len; i++)
{
myMovieClips[i].visible = (i == index);
}
}

Thanks,
Tripp


--- In ydn-flash@yahoogroups.com, "rmrklnd" <ricardo.markland@...> wrote:
>
> Hello All!
>
> I am having some issues with these tabs and loading data into them.
> can anyone show me a better example than the one shown on yahoo yui
site.
>
> I am trying to load some movie clips into the specific tabs to have
> them show when the tabs are clicked.
>
> any help is greatly appreciated.
>





Sun Oct 5, 2008 4:46 pm

tripp.bridges
Offline Offline
Send Email Send Email

Forward
Message #1321 of 2036 |
Expand Messages Author Sort by Date

Hello All! I am having some issues with these tabs and loading data into them. can anyone show me a better example than the one shown on yahoo yui site. I am...
rmrklnd
Offline Send Email
Oct 5, 2008
4:45 pm

Hi, You do not need to load any data into the TabBar. You can listen for events from the TabBar and display you movie clips based on the event. For example, if...
tripp.bridges
Offline Send Email
Oct 5, 2008
4:47 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help