『我闪网~www.5shan.com』

Categories

-=推荐开发方面的Flash新闻、教程、下载、酷站、游戏、图片等=-
首页

Links

New Comments

Counter

Calendar

[教程]关于FLASH V2 TabBar组件的一个例子

Author:我闪 PublishTime:2004-8-30

这是我在www.riacn.com论坛上看到的一个关于TabBar的例子,原文地址:

http://www.riacn.com/bbs/showthread.asp?threadid=1857

V2 TabBar - simple example

V2 TabBar - simple example
Heres a simple example of using the V2 TabBar (version 1.0.1) in Flash.


1. Add a TabBar and Loader to the Library.

2. Add this code (frame 1 of Timeline):

var tabListener:Object = new Object();
tabListener.change = function(evt:Object) {
content_ldr.load(evt.target.value);
};
this.createClassObject(mx.controls.TabBar, "myTabBar", this.getNextHighestDepth());
myTabBar.addEventListener("change", tabListener); myTabBar.setSize(550, 30);
myTabBar.addItem({label:"Home", data:"http://www.flash-mx.com/images/image1.jpg";});
myTabBar.addItem({label:"News", data:"http://www.flash-mx.com/images/image2.jpg";});
this.createClassObject(mx.controls.Loader, "content_ldr", this.getNextHighestDepth(), {_x:0, _y:30, _width:550, _height:370});

3. Ctrl+Enter.

If you bought DRK5 which includes the original version of this component, you can update to the V2 version for free. For more information, visit this link.


V2版TabBar可以在我的网站下载,访问页面:

http://flashdo.go.nease.net/flash.shtm

分类于:我闪推荐

Comments

{CommentAuthor} at {CommentTime} | {CommentEmail} {CommentUrl} {CommentIp}
{CommentContent}
Powered by 5DBlog.com