내 상자 애니메이션이 왼쪽에서 오른쪽 방향으로 오게하고 싶습니다. 지금 상자가 위쪽에서부터 아래쪽으로 보입니다. 어떻게 상자의 왼쪽에서 오른쪽으로 움직이는 방향을 바꿀 수 있습니까? , 내가왼쪽에서 오른쪽 방향으로 Actionscript 3
아래 그림과 같이, 구 상자와 세 개의 서로 다른 라인을 가지고 여기
전에 오른쪽으로 감사를 왼쪽에서 내가 애니메이션을 어떻게 내 현재 코드function random_item()
{
var listItem:Array = new Array();
for (var i:uint=0; i<15; i++)
{
listItem.push(i);
}
ItemLeft = 0;
for (var x:uint=0; x<boardWidth; x++)
{
for (var y:uint=0; y<boardHeight; y++)
{
var thisItem:FirstBox = new FirstBox();
thisItem.stop();
thisItem.x = x * IcardHorizontalSpacing + IboardOffsetX;
thisItem.y = y * IcardVerticalSpacing + IboardOffsetY;
var r:uint = Math.floor(Math.random() * listItem.length);
thisItem.cardface = listItem[r];
listItem.splice(r,1);
thisItem.addEventListener(MouseEvent.CLICK,clickItem);
thisItem.buttonMode = true;
addChild(thisItem);
ItemLeft++;
}
}
}
입니다
거기에 애니메이션 코드가 없으므로 잘못된 정보를 말하는 것이 어렵습니다. 그러나 왼쪽에서 오른쪽으로 진행되는 애니메이션을 만들기 위해서는'thisItem'의 x 좌표를 증가 시키면됩니다. 애니메이션을 만드는 가장 간단한 방법은 TweenMax를 사용하는 것입니다. http://www.greensock.com/tweenmax/ – Bakapii