Created
January 26, 2013 18:38
-
-
Save ilkinulas/4643728 to your computer and use it in GitHub Desktop.
Dedigin gibi sabit bir noktaya gore tum kutularin y koordinatlarini guncelleyince oldu :)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private function onEnterFrame(event:EnterFrameEvent):void { | |
const distance : Number = event.passedTime * velocity; | |
const reelHeight : Number = boxSize * boxes.length; | |
//0 ile reel height arasinda gidip geliyor... | |
totalDistance = (totalDistance + distance ) % reelHeight; | |
for (var i:int = 0; i<boxes.length; i++) { | |
boxes[i].y = (boxStartY + totalDistance + (i * boxSize) ) % reelHeight; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment