AN 非空检测以及影片剪辑元件调用内部元件

非空检测以及影片剪辑元件调用内部元件

 

 

源码

stop();
import fl.motion.MotionEvent;
import flash.events.MouseEvent;
import flash.display.MovieClip; //需要引入命名空间/也是一个类,自定义类定义完毕以后如果要引用也需要这样引用
var IsAorB:Boolean=true;

BT01.addEventListener(MouseEvent.CLICK, Play01);
BT02.addEventListener(MouseEvent.CLICK, Play02);
Bt_zanting.addEventListener(MouseEvent.CLICK, Zanting);
Bt_stop.addEventListener(MouseEvent.CLICK, Stop);
Bt_play.addEventListener(MouseEvent.CLICK, Goon);

//--------------函数
function Zanting(e: MouseEvent) 
{
	//this.stop();
	if(IsAorB)
	{
	MC_energy.stop();
	MC_arrowB.stop();
	MC_arrowA.stop();	
	}
	else
	{
		MC_ZHISHI.stop();
		if(MC_ZHISHI.MC_canshuEnergysphere!=null)
		{
		MC_ZHISHI.MC_canshuEnergysphere.stop();		
		MC_ZHISHI.MC_canshuEnergysphere.MC_JIANTOU01.stop();
		MC_ZHISHI.MC_canshuEnergysphere.MC_JIANTOU02.stop();
			}
		
		}
}
function Goon(e: MouseEvent) 
{
	if(IsAorB)
	{
	MC_energy.play();
	MC_arrowB.play();
	MC_arrowA.play();	

		}
		else
		{
			MC_ZHISHI.play();
			if(MC_ZHISHI.MC_canshuEnergysphere!=null)
			{			
		MC_ZHISHI.MC_canshuEnergysphere.play();
		MC_ZHISHI.MC_canshuEnergysphere.MC_JIANTOU01.play();
		MC_ZHISHI.MC_canshuEnergysphere.MC_JIANTOU02.play();
								
		}
		
			}

}
function Play01(e: MouseEvent) 
{
		this.gotoAndStop(2);	
	IsAorB=true;
}
function Play02(e: MouseEvent) 
{
	this.gotoAndStop(5);	
		IsAorB=false;
}

function Stop(e: MouseEvent) 
{
	this.gotoAndStop(1);
	
}

 

 

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

Unity3d青子

难题的解决使成本节约,求打赏

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值