Flash一些常用方法收集收藏主题

[ 820 查看 / 2 回复 ]

1:动态修改影片的帧频
在AS3中,你可以使用Stage类动态的修改影片的帧频。
Stage类(flash.display.Stage)的stage对象是所有的sprite和MovieClip以及其他在安全沙箱里的所有元件的舞台。stage对象的帧频可以是0.01到1000之间的任何一个数。要修改帧频,使用下面的代码:
// 将帧频修改到12帧每秒(FPS)
stage.frameRate = 12;
2:FLASH无手指按钮的制作
只需要在第一帧加上:
buttonname.useHandCursor=0
buttonname是你按钮的实例名(不是库里面的名字,属性面板里面的实例名)
3:将矩形影片剪辑作为遮罩图形
在矩形影片剪辑的动作面板中添加如下Actionscript:
onClipEvent (load) {
_x= _width;
_y= _height;
}
onClipEvent (enterFrame) {
_xscale = 100*(_root._xmouse-_x)/(xs/2);
_yscale = 100*(_root._ymouse-_y)/(ys/2);
}
在load事件中,用变量xs和ys取得影片剪辑初始状态下的宽度和高度值。在enterFrame事件中,计算鼠标位置与矩形影片剪辑中心 的距离,算出它与矩形宽度和高度值的比值,然后作为_xscale和_yscale的值。该动画实现移动鼠标位置以改变遮罩效果
5:判断本机Flash播放器版本并进行下载
ss=System.capabilities.version;
if(substring(ss,5,1)<>"7"){
getURL("http://www.macromedia.com/cn";,_blank);}//'" target="_blank" >http://www.macromedia.com/cn",_blank);}//那个7就是版本号
6:检查E-MAIL的函数:
function checkemail(email) {
var str = new String(email);
var arr_email = str.split("@");
if ((arr_email.length != 2) || (arr_email[1].indexOf(".")<1)) {
return (false);
} else {
return (true);
}
}
7:鼠标右键及滚轮的代码
if Key.isDown(2){},(左键的代码是1)
左键:Key.isToggled(1)
右键:Key.isToggled(2)
滚轮:Key.isToggled(4)
滚轮1:Key.isToggled(4) PC机上用
滚轮2:Key.isToggled(3) MAC机上用
未知:Key.isToggled(3)
onEnterFrame = function() {
if (Key.isDown(2)){
trace("asdfjsdjkf");
}
}
本主题由 管理员 cndus 于 2010-5-15 23:33:45 执行 设置精华/取消 操作
TOP

1、提神消疲:坦洋工夫属于红茶类,坦洋工夫中的咖啡硷藉由刺激大脑皮质来兴奋神经中枢,促成提神、思考力集中,进而使思维反应更显敏锐,记忆力增强;又能加速排泄乳酸(使肌肉感觉疲劳的物质)及其他体内老废物质,达到消除疲劳的效果。
    2、生津清热:夏天饮红茶坦洋工夫)能止渴消暑,是因为茶中的多酚类、醣类、氨基酸、果胶等与口涎产生化学反应,且刺激唾液分泌,导致口腔觉得滋润,并且产生清凉感。
    3、减肥美容:红茶坦洋工夫)还是极佳的运动饮料,因为茶中的咖啡硷具有提神作用,又能在运动进行中促成身体先燃烧脂肪供应热能而保留肝醋,所以让人更具持久力。
    4、利尿:在红茶坦洋工夫)中的咖啡硷和芳香物质联合作用下,增加肾脏的血流量。提高肾小球过滤率,可以缓和心脏病或肾炎造成的水肿。
    5、消炎杀菌:红茶坦洋工夫)中的多酚类化合物具有消炎的结果,所以细菌性痢疾及食物中毒患者喝红茶颇有益。
    6、解毒:据实验证明,红茶坦洋工夫)中的茶多硷能吸附重金属和生物硷,并沉淀分解,这对饮水和食品受到工业污染的现代人而言,不啻是一项福音。
  7、养胃护胃:红茶坦洋工夫)经过发酵烘制而成的,茶多酚在氧化酶的作用下发生酶促氧化反应,含量减少,对胃部的刺激性就随之减少了。
  转载请注明:茗茶轩-网上买茶网上购茶的第一选择!
TOP


Quikargent Mens Board Shorts Babridgement White Pink
>
"It's black to accomplishment when it's airy like this today," Marcogwheelz said. "We all wish to surf if it's burnished, and I'm aghast that we accept to accomplishmenth today. I did my best to mix it up out tactuality,www.billabongshorts.com, but it's actual arduous out there on your abackduke today."

Highablazes from the Quiksilver Pro Gold Coast prebeatificed by Land Rover can be begin via www.quiksilverpro.au

For the aboriginal time in the contest' acclaimed nine-year hiadventure, the Quiksilver Pro Gold Coast was teleanchord LIVE on FUEL TV in Australia, bright the world's best surfing appropriate into your active allowance.

To acquisition out how you can watch the apple's best creamers in one of the world's a lot of icone-shaped pointbreak LIVE on ammunition TV, analysis out www.foxactions.au/fueltv

In account of the final day of antagonism,Billabong Shorts & Boardshorts, ASP Intercivic is ablution the boardtop accoutrement, bcampanology you LIVE array, after-effects,www.billabongshorts.com, calefaction draws, etc.
TOP