CCBA-flash问答游戏上线
as3对a链接的处理
3 step:
1.Use event in the href attribute. (href=”event:eventText”)
2.Listen to the textField (theTextField.addEventListener(TextEvent.LINK, linkHandler);)
3.Handle the link event (function linkHandler(linkEvent:TextEvent):void {…)
/*************分隔线*************/
下面是example:
var myHTMLText:String = “<a href=’event:paulwang’>paulwang@vip.qq.com</a>”;
//init
var myCSS:StyleSheet = new StyleSheet();
myCSS.setStyle(”a:link”, {color:’#0000CC’,textDecoration:’none’});
myCSS.setStyle(”a:hover”, {color:’#0000FF’,textDecoration:’underline’});
myHTML.styleSheet = myCSS;
myHTML.selectable = true;
myHTML.htmlText = myHTMLText;
myHTML.addEventListener(TextEvent.LINK, linkHandler);
var feedback:textField = new TextField();
function linkHandler(linkEvent:TextEvent):void {
switch (linkEvent.text) {
case “paul”:
navigateToURL(new URLRequest(’http://www.flexgumbo.com’),’_blank’);
break;
case “wang”:
//do something
break;
default:
print(linkEvent.text);
}
}
function print(str):void {
trace(str);
feedback.appendText(str +”\n”);
feedback.scrollV = feedback.maxScrollV;
}
三月
不知不觉到了三月份
感觉时间过得很快
长假期放完
刚适应上班的节奏
家里搬了两个MM进来,加起来已经四个MM了
但说这里太吵,准备想搬走
郁闷…
感觉本命年过去了
很多事情都顺了起来
鲜花网站依然没有看到起色
我每天都在做些什么
昨天刚报了本科
一时冲动还是什么
既然报了
就不后悔
而且报的是英语专业
写到这里
结束
love.tvb.com上線
List of 34 More ActionScript 3.0 APIs
Using an API can save time during the development process. The wonderful thing about the Flash Platform Community has always been the willingness to share. Here’s 34 more ActionScript 3.0 APIs that can be used for Flex, Flash and AIR development. Hopefully one of the APIs listed here or in one of my previous API listing posts can help you and your team save time. Happy Holidays!!
ArcGIS API for Flex
The ArcGIS API for Flex allows the creation of Rich Internet applications on top of ArcGIS Server. It is based on the free Adobe Flex framework. The Flex framework is a client-side technology that is rendered by Flash Player 9 and above, or by Adobe AIR. All Flex 3.x SDK versions are now supported.
http://resources.esri.com/arcgisserver/apis/flex/
asaudio
ASaudio is a small AS3 library dedicated to simple and efficient sound handling.
http://code.google.com/p/asaudio/
as3ansi
Library for parsing and viewing extended ASCII (IBM code page 437) into AS3 for use in Flash and Flex applications.
http://code.google.com/p/as3ansi/
ActionScript 3.0 Client Library for Facebook Platform API
The new ActionScript 3.0 Client Library for Facebook Platform API, fully supported by Facebook and Adobe, makes it easy to build applications that combine the strengths of the Flash Platform and Facebook Platform.
http://code.google.com/p/facebook-actionscript-api/
ascolourlovers
ColourLovers API for ActionScript 3. This library provides all the tools needed to bring palettes, colors, patterns and more from the ColourLovers API in your AS3 projects.
http://code.google.com/p/ascolourlovers/
AS3DAC
AS3DAC parses an AS3.0 class or instance file and adds asdoc documentation stubs. Follows the Flex SDK Coding Conventions where applicable.
http://code.google.com/p/as3dac/
as3flexdb
AS3FlexDB project is a open source lib that allows Adobe Flex applications to connect to a MySQL server.
http://code.google.com/p/as3flexdb/
as3growl
An ActionScript 3 API for working with the Growl notification service.
http://code.google.com/p/as3growl/
AS3 Http Client Library
An http library written on top of flash.net.Socket (and as3crypto) to be used with AIR or flash runtimes.
http://github.com/gabriel/as3httpclient
as3midilib
MIDI for ActionScript 3.0
http://code.google.com/p/as3midilib/
as3openxmlformats
ActionScript 3 lib for MS Office Open XML Formats
http://code.google.com/p/as3openxmlformats/
as3-scaffold
as3-scaffold is a lightweight as3 framework with an accompanying set of scaffolding scripts to automate the tedium of setting up new as3 projects, with support for PureMVC.
http://code.google.com/p/as3-scaffold/
as3scriptinglib
This library aims to provide an API for compiling and executing runtime ActionScript/JavaScript within the Flash client (no server required) via Adobe’s ECMAScript 4 compiler (from the Tamarin project).
http://code.google.com/p/as3scriptinglib/
as3zlib
as3 port of zlib
This is a port of JZlib to as3. Was created because as3 in Flash9 does not support deflate in ByteArray. AIR does support deflate and doesn’t need this code.
http://code.google.com/p/as3zlib/
bitly as3 api
Simple as3 implementation for bit.ly API.
http://code.google.com/p/bitly-as3-api/
Diggbe
Diggbe is a general purpose DI engine. It is first conceived for unit testing purposes (to avoid xxxSet/GetForTest). But it can also be use for runtime code to allow service dependencies to be injected.
http://code.google.com/p/diggbe/
echo-nest-flash-api
An ActionScript 3 interface for the the Echo Nest API.
http://github.com/also/echo-nest-flash-api
Etsy API Wrapper for Actionscript 3
An Actionscript 3 class that wraps the Etsy.com API.
http://thunderfarm.com/etsy/
feedmeas3
FeedMe is a low level class for sharing data between objects.
http://code.google.com/p/feedmeas3/
fuelas3svn
This is the SVN protocol implemented in AS3. This library gives you the ability to write your own SVN client completely in Flash.
http://code.google.com/p/fuelas3svn/
Gigya AS3 API
http://wiki.gigya.com/030_Gigya_Socialize_API_2.0/030_API_reference/010_Client_API_%28JavaScript%29
googleas3api
AS3 library on Googles API’s, integrate the power of Google in your Flash/Flex/AIR application (searches, translation, suggest, weather, feeds).
http://code.google.com/p/googleas3api/
Kongregate’s AS3 API
The Kongregate AS3 API allows you to extend your game to communicate with the Kongregate back-end.
http://www.kongregate.com/developer_center/docs/as3-api
KoolMoves AS3 API
http://koolexchange.com/docs/km/
lastfm as3
Actionscript 3.0 API to access the Last.fm web services.
http://code.google.com/p/lastfm-as3/
Mappy AS3 API
Thanks to Mappy AS3 API, show your users advanced visual effects (zooming with transition effects, video integrations, animations, etc.)and render maps quickly on browsers with a Flash plug-in instaled (the vast majority of Internet users).
http://api.mappy.com/en/as3
MP3tunes Music AS3/Flex/AIR API
API to implements the MP3tunes Music API. The api consists of REST interface which gives you access to all data for a user within the MP3tunes Locker service. It gives you the foundation for using the service in a AS3/Flex/AIR project.
http://code.google.com/p/mp3tunes-as3-api/
nd3d
ND3D is a simple to use AS3 3D Engine. Aimed for speed and simplicity. Target use are small 3D effects and rapid 3D testing / prototyping. The compiled size of the engine is about 10k.
http://code.google.com/p/nd3d/
netflex-as3-api
An Actionscript 3 utility library to simplify the Netflix API for Actionscript 3 based applications.
http://code.google.com/p/netflex-as3-api/
Sekati API
Sekati API is a Pure Actionscript 3.0 framework designed to bootstrap the development of flash/flex projects & applications with an emphasis on high-level functionality encapsulation. The framework provides a flexible, feature-rich xml configurable application architecture through the implementation of it’s collection of behavior-specific core display objects, controllers, managers & utilities.
http://code.google.com/p/sekati/
Soundcloud AS3 API
Universal Soundcloud API wrapper for Flash, Flex and AIR projects, written in ActionScript 3.0.
http://github.com/dasflash/Soundcloud-AS3-API/blame/1aa2d25c072309a1e931b08e88f6c7218a135be0/README
tweensy
Tweensy is an extremely efficient Actionscript 3 property tweener. Contained within Tweensy is an expansion package called Tweensy FX which allows for motion effects to be applied onto DisplayObjects.
http://code.google.com/p/tweensy/
vyana
Light-weight Cairngorm-PureMVC like framework with care about modular applications
http://code.google.com/p/vyana/
wiiflash
Communication between the Wiimote and Flash
http://code.google.com/p/wiiflash/
button组件影响外部容器高度
在flash开发中,为了简便快速开发,往往会使用flash自带的组件库
我在开发项目时,发现
如果我有一个MovieClip是200X300的
在里面放置一个button组件
这个mc的高度有可能会超过300。
确实能说明
肉眼看到的,不一定是真的!
AS3控制全局音量,静音
通过改变
SoundMixer类的soundTransform就可以实现全局音量控制
下面一行代码完成静音功能。
SoundMixer.soundTransform=new SoundTransform(0);
flash动画优化技巧以及动画很卡处理方法
1.尽量少用MovieClip来做动画
2.setInterval性能差于Timer,有很小的差距
3.矢量动画,把它转成bitmap.
4.矢量图,成生的swf会小一些,但是内存和cpu开销相当大,哪怕是不作任何的动作,也占不少的CPU。(切记)
5.Enterframe做东西要小心.不建议使用.
6.使用位图缓存
7.减少大图运动
8.矩形的边线,尽量不要。
9.载入大动画,前面留一个空白帧。








