flash简单代码怎么写

1.怎么用最简单的方法来写FLASH小游戏代码var CustomMenu:ContextMenu = new ContextMenu(); CustomMenu.hideBuiltInItems(); var CMI001:ContextMenuItem = new ContextMenuItem("==== =轻轻松松学五笔= ====",Fuc_Menu1); var CMI002:ContextMenuItem = new ContextMenuItem("+- 切换到上一页(←键) -+",Fuc_Menu2); var CMI003:ContextMenuItem = new ContextMenuItem("+- 1.认识英文字母 -+",Fuc_Menu3); var CMI004:ContextMenuItem = new ContextMenuItem("+- 2.打字指法 -+",Fuc_Menu4); var CMI005:ContextMenuItem = new ContextMenuItem("+- 3.关于五笔输入法 -+",Fuc_Menu5); var CMI006:ContextMenuItem = new ContextMenuItem("+- 4.五笔拆字方法 -+",Fuc_Menu6); var CMI007:ContextMenuItem = new ContextMenuItem("+- 5.五笔输入规则 -+",Fuc_Menu7); var CMI008:ContextMenuItem = new ContextMenuItem("+- 6.字根表助记歌详解 -+",Fuc_Menu8); var CMI009:ContextMenuItem = new ContextMenuItem("+- 7.学习五笔经验总结 -+",Fuc_Menu9); var CMI010:ContextMenuItem = new ContextMenuItem("+- 8.后 记 -+",Fuc_Menu10); var CMI011:ContextMenuItem = new ContextMenuItem("+- 9.轻松一刻-双低金句 -+",Fuc_Menu11); var CMI012:ContextMenuItem = new ContextMenuItem("+- 切换到下一页(→键) -+",Fuc_Menu12); var CMI013:ContextMenuItem = new ContextMenuItem("广东科学技术职业学院学生论坛",Fuc_Menu13); var CMI014:ContextMenuItem = new ContextMenuItem("一些事一些情官方网站",Fuc_Menu14); var CMI015:ContextMenuItem = new ContextMenuItem("====小鸟精神 服务社群====",Fuc_Menu15); CMI002.separatorBefore = true; CMI003.separatorBefore = true; CMI010.separatorBefore = true; CMI013.separatorBefore = true; CMI015.separatorBefore = true; CMI001.enabled = false; CMI002.enabled = false; CMI015.enabled = false; CustomMenu.customItems.push(CMI001); CustomMenu.customItems.push(CMI002); CustomMenu.customItems.push(CMI012); CustomMenu.customItems.push(CMI003); CustomMenu.customItems.push(CMI004); CustomMenu.customItems.push(CMI005); CustomMenu.customItems.push(CMI006); CustomMenu.customItems.push(CMI007); CustomMenu.customItems.push(CMI008); CustomMenu.customItems.push(CMI009); CustomMenu.customItems.push(CMI010); CustomMenu.customItems.push(CMI011); CustomMenu.customItems.push(CMI013); CustomMenu.customItems.push(CMI014); CustomMenu.customItems.push(CMI015); function Fuc_Menu1() { // } function Fuc_Menu2() { if (_root._currentframe>3) { _root.prevFrame(); CMI012.enabled = true; } else if (_root._currentframe == 3) { _root.prevFrame(); CMI002.enabled = false; } } function Fuc_Menu3() { _root.gotoAndStop(3); } function Fuc_Menu4() { _root.gotoAndStop(4); } function Fuc_Menu5() { _root.gotoAndStop(7); } function Fuc_Menu6() { _root.gotoAndStop(9); } function Fuc_Menu7() { _root.gotoAndStop(11); } function Fuc_Menu8() { _root.gotoAndStop(15); } function Fuc_Menu9() { _root.gotoAndStop(18); } function Fuc_Menu10() { _root.gotoAndStop(19); } function Fuc_Menu11() { _root.gotoAndStop(21); } function Fuc_Menu12() { if (_root._currentframe.cn", "_blank"); } function Fuc_Menu14() { getURL(" .cn", "_blank"); } function Fuc_Menu15() { // } this.menu = CustomMenu; 。
2.flash一小段简单代码解释c=1;//定义一个变量c
while(Number(c)<100){ // 循环条件当c小于100的时候,执行循环体(这里明显是要循环100次)
duplicateMovieClip("mc",c,c); // 复制舞台上的实例mc,复制而成的副本影片剪辑名为c,深度为c;
setProperty(c,_rotation,random(360); //影片剪辑c的角度随机为某一度
var i=40+Number(random(60)); //定义一个变量i,数值在40-100之间随机一值
setProperty(c,_xscale,i); // 影片剪辑c的长度为原来的i倍(即40 -100倍)
setProperty(c,_xscale,i); //同上,当然长度又进一步大了
var c=Number(c)+1; // c的值加1,如果此时c=100,那么下次不再循环 。至于为什么要Number(c)因为c也被用做影片剪辑的实例名了,为string类型了,要用c的值就要转换成数值