求高手帮忙把flash as2.0的代码转换成as3.0的 谢了 。
stop();snd=newSound();snd.attachSound("music");btnenter1.onRelease=function(){gotoAnd...
stop ();
snd = new Sound();
snd.attachSound("music");
btnenter1.onRelease = function ()
{
gotoAndStop("Menu1");
};
zhizuoren.onRelease = function ()
{
gotoAndStop("Menu7");
};
ruanjianjieshao.onRelease = function ()
{
gotoAndStop("Menu8");
}; 展开
snd = new Sound();
snd.attachSound("music");
btnenter1.onRelease = function ()
{
gotoAndStop("Menu1");
};
zhizuoren.onRelease = function ()
{
gotoAndStop("Menu7");
};
ruanjianjieshao.onRelease = function ()
{
gotoAndStop("Menu8");
}; 展开
3个回答
展开全部
转换成as3.0后的代码如下:
//导入所需的类
import flash.events.MouseEvent;
import flash.media.Sound;
import flash.media.SoundChannel ;
import flash.display.Sprite;
this.stop()
var snd:Sound=new Sound();
var snd1:SoundChannel=snd.play();
btnenter1.addEventListener(MouseEvent.CLICK,a)
zhizuoren.addEventListener(MouseEvent.CLICK,b)
ruanjianjieshao.addEventListener(MouseEvent.CLICK,c)
function a(e:MouseEvent)
{
gotoAndStop("Menu1");
}
function b(e:MouseEvent)
{
gotoAndStop("Menu7");
}
function c(e:MouseEvent)
{
gotoAndStop("Menu8");
}
//导入所需的类
import flash.events.MouseEvent;
import flash.media.Sound;
import flash.media.SoundChannel ;
import flash.display.Sprite;
this.stop()
var snd:Sound=new Sound();
var snd1:SoundChannel=snd.play();
btnenter1.addEventListener(MouseEvent.CLICK,a)
zhizuoren.addEventListener(MouseEvent.CLICK,b)
ruanjianjieshao.addEventListener(MouseEvent.CLICK,c)
function a(e:MouseEvent)
{
gotoAndStop("Menu1");
}
function b(e:MouseEvent)
{
gotoAndStop("Menu7");
}
function c(e:MouseEvent)
{
gotoAndStop("Menu8");
}
本回答被提问者采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
import flash.events.MouseEvent;
import flash.media.Sound;
this.stop()
snd=new Sound
snd.play()
btnenter1.addEventListener(MouseEvent.CLICK,a)
zhizuoren.addEventListener(MouseEvent.CLICK,b)
ruanjianjieshao.addEventListener(MouseEvent.CLICK,c)
function a(e)
{
gotoAndStop("Menu1");
}
function b(e)
{
gotoAndStop("Menu7");
}
function c(e)
{
gotoAndStop("Menu8");
}
大概就是这样
import flash.media.Sound;
this.stop()
snd=new Sound
snd.play()
btnenter1.addEventListener(MouseEvent.CLICK,a)
zhizuoren.addEventListener(MouseEvent.CLICK,b)
ruanjianjieshao.addEventListener(MouseEvent.CLICK,c)
function a(e)
{
gotoAndStop("Menu1");
}
function b(e)
{
gotoAndStop("Menu7");
}
function c(e)
{
gotoAndStop("Menu8");
}
大概就是这样
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
展开全部
import flash.media.Sound;
stop();
var snd:Sound=new music();
snd.play();
btnenter1.addEventListener(MouseEvent.CLICK,ClickEvent1);
zhizuoren.addEventListener(MouseEvent.CLICK,ClickEvent2);
ruanjianjieshao.addEventListener(MouseEvent.CLICK,ClickEvent3);
function ClickEvent1(e:MouseEvent):void
{
gotoAndStop("Menu1");
}
function ClickEvent2(e:MouseEvent):void
{
gotoAndStop("Menu7");
}
function ClickEvent3(e:MouseEvent):void
{
gotoAndStop("Menu8");
}
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询