Flash游戏、Flash音乐、小游戏

加入收藏

设为主页

首页 | Flash游戏 | Flash音乐 | Flash动画 | 邻家女孩 | 动漫下载 | 小说 | 动漫资讯 | 免费博客

Flash游戏 | 动漫COSPLAY | 手机世界 | 游戏新闻 | IT业界 | 动漫设计 | 软硬件交流

首页>>动漫设计>>正文大炮打敌机小游戏(附源码)

将woogood加入收藏夹 | 将woogood设置成为你电脑首页

搜索 SEARCH

    

大炮打敌机小游戏(附源码)

作者:[] 来源:[] [2005-10-6 17:14:29] [对"大炮打敌机小游戏(附源码)"发表评论]

最新文章

·隐藏卸载信息:跟入侵者玩躲猫猫
·网络新威胁 无线局域网入侵检测现
·宽带用户易被攻击 用户需注意七大
·如何查找和清除线程插入式木马程
·日志分析两部曲:充分利用日志保
·安全设置Windows组策略 有效阻止
·实现了!中文WinXP安装IE7 Beta1
·黑客破解Email账号常用的三种方法
·基础知识 XST攻击理论及手法讲解
·威胁同样巨大 基于Telnet协议的攻

推荐文章

·请教看电影多的人问题
·文字处理软件疑难问题求助,
·求助:Excel问题
·在线等...........
·大家都是怎样用摄像头的?发
·如何加启动程序?急
·midia player classic使用时
·关于IE,请大家帮助
·IE被改用兔子也没用啊??
·播放器问题,大家帮帮忙啊

点击浏览该文件
点击浏览该文件

主场景中ball的帧内容:

_root.ang=-40;
_root.total=0;
_root.attachMovie("fly","fly",10,{_x:random(300)+220,_y:random(220)+10});
up_btn.onPress=function(){
turnangle(5);
if(gun_mc._rotation<-85){
gun_mc._rotation=-85;
}
}
down_btn.onPress=function(){
turnangle(-5);
if(gun_mc._rotation>-5){
gun_mc._rotation=-5;
}
}
function turnangle(tmp){
gun_mc._rotation+=-1*tmp;
_root.ang=gun_mc._rotation;
}
fire_btn.onPress=function(){
if(_root.ball._currentframe==1){
_root.ball.gotoAndPlay(2);
}
}


//------------------------------------

ball中第一帧:
stop ();
_visible = false;
第二帧:
var rad = -_root.ang/180*Math.PI;
_x = _root.gun_mc._x+80*Math.cos(rad);
_y = _root.gun_mc._y-80*Math.sin(rad);
var Vx = Math.sqrt(750)*Math.cos(rad);
var Vy = -1*Math.sqrt(750)*Math.sin(rad);
_visible = true;
第三帧:
var hitMon = this.hitTest(_root.fly);
if (hitMon) {
gotoAndPlay("HitBang");
}
_x += Vx;
_y += Vy;
Vy++;
if (_y>=350 || _x>550) {
gotoAndPlay("Bang");
}
trace(1);
第四帧:
gotoAndPlay (_currentframe-1);
第16帧:
gotoAndStop(1);
第17 帧
:_root.fly.removeMovieClip();
_root.total++;
第26帧
:_root.attachMovie("fly", "fly", 10, {_x:random(300)+220, _y:random(220)+10});
gotoAndStop(1);
//------------------------------------------
你也可以试试.

相关文章:

对"大炮打敌机小游戏(附源码)"发表评论:

热门Flash 最新Flash 热门小说 最新小说

 

Copyright@2005-2006 精品Flash www.WooGood.com All Right Reserved

联系信箱: gold1686tom.com