|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有帐号?立即注册
x
此外,还支持α透明功能,能够设计人员在Flash视频中对诸如文本、矢量图像以及其它Flash元素等进行整合。
poluoluo中心提醒:FlashAS动画证实数学的勾股定理.
很复杂的器材,做个纪录:
[media=wmv,550,500][/media]
父类:
/*designbywhbin2009-3-30
MOUSE_OVER:改动MC色彩,将鼠标改成手型,修正MC的通明度;MOUSE_OUT:将MC的属性回复;DOUBLE_CLICK:设置MC为不成见
*/
package{
importflash.display.MovieClip;
importflash.events.MouseEvent;
importflash.display.BlendMode;
importflash.events.Event;
publicclassMcextendsMovieClip{
privatevarover_alpha:Number=.6;
privatevarout_alpha:Number=1;
publicfunctionMc(){
init();
}
privatefunctioninit():void{
this.doubleClickEnabled=true;
addEventListener(flash.events.MouseEvent.MOUSE_OVER,mouse_over);
addEventListener(flash.events.MouseEvent.MOUSE_OUT,mouse_out);
addEventListener(flash.events.MouseEvent.DOUBLE_CLICK,double_click);
}
privatefunctionmouse_over(e:MouseEvent){
this.useHandCursor=true;
this.buttonMode=true;
this.alpha=over_alpha;
this.blendMode=BlendMode.SUBTRACT;
}
privatefunctionmouse_out(e:MouseEvent){
this.alpha=out_alpha;
this.buttonMode=true;
this.useHandCursor=false;
this.blendMode=BlendMode.NORMAL;
}
publicfunctiondouble_click(e:MouseEvent){
this.visible=false;
}
}
}
子类1:
/*designbywhbin2009-3-30
作废父类的双击事务响应
*/
package{
publicclassMcSonextendsMc{
publicfunctionMcSon(){
super();
this.doubleClickEnabled=false;
}
}
}
子类2:
/*designbywhbin2009-3-30
重写双击事务,修正MC色彩
*/
package{
importflash.events.MouseEvent;
importflash.geom.ColorTransform;
importflash.geom.Transform;
publicclassSonextendsMc{
publicvaroriginallyColor:ColorTransform;
publicfunctionSon(){
super();
originallyColor=this.transform.colorTransform;
}
overridepublicfunctiondouble_click(e:MouseEvent){
varnewColor:ColorTransform=newColorTransform();
newColor.color=0x0000ff;
e.currentTarget.transform.colorTransform=newColor;
}
}
}
运行时,它可以跨浏览器和操作系统、原汁原味地呈现具有表现力的应用程序、内容和视频,功能强大,兼容性高。 |
|