我从图书馆略去了几部电影片,在电影片片片片片片内,我只想控制它,这里是我的文字。
if (selectDiffText.text == "Collection 1 Easy")
{
var c1_easy:cartoonEasy = new cartoonEasy();
addChild(c1_easy);
c1_easy.x = 412;
c1_easy.y = 400;
TweenMax.from(c1_easy, 0.5, {alpha:0, ease:Expo.easeOut});
}
else if (selectDiffText.text == "Collection 1 Medium")
{
var c1_medium:cartoonMedium = new cartoonMedium();
addChild(c1_medium);
c1_medium.x = 412;
c1_medium.y = 400;
TweenMax.from(c1_medium, 0.5, {alpha:0, ease:Expo.easeOut});
}
else
{
trace("ERROR!");
}
如果改动selectDiffText,上述法律将装上图书馆的特别影片。
var movieList:Array = [cartoonMedium1,cartoonMedium2,cartoonMedium3,cartoonMedium4,cartoonMedium5,cartoonMedium6];
function getRandomMovie():MovieClip
{
var index:int = Math.floor(Math.random() * movieList.length);
var mcClass:Class = movieList.splice(index,1)[0];
return new mcClass();
}
playGame = getRandomMovie();
addChild(playGame);
更不用说,如果将c1_添加到阶段,那么c1_medium也将随意从图书馆中添加1个电影片。
在<>playGame mc, I ve mouseTarget.alpha = 0;...how,我能从根层控制吗? c1 - 麻省也有 mo素=0。