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.
>