照着大神的教程,做了一份,感谢Framer教程 | 怎样让自己看起来更有钱?
Screen.backgroundColor="fff"bg= new Layerwidth: 750height: 1316image: "images/money.png"receipts=new Layer html:1 x:106 y:357 width: 527 height: 130 backgroundColor: "transparent" style: fontSize:"240px" fontWeight:"300" textAlign:"center" lineHeight:"130px" account = new Layerhtml: "1"x: 106y: 737width:527height: 81backgroundColor:"transparent"style:fontSize: "82px"fontWeight: "300"textAlign: "center"lineHeight: "82px" millionReceipts = new Layerhtml: "1"x: 80y: 970width: 209height: 92color: "#EE5D33"backgroundColor:"transparent"style:fontSize: "75px"lineHeight: "82px"totalReceipts = new Layerhtml: "1"x: 474y: 970width: 209height: 92color: "#EE5D33"backgroundColor:"transparent"style:fontSize: "75px"lineHeight: "82px"receiptsStart=1receiptsMax=58moneyCount=() ->if receiptsStartshowNumber=Utils.round(receiptsStart,2)
receipts.html=showNumber.toFixed(2)
receiptsStart=receiptsStart+receiptsMax/1283
moneyCount()
bg.onTap (event, layer) ->
moneyCount(0,receipts)
moneyCount(1,account)
moneyCount(2,millionReceipts)
moneyCount(3,totalReceipts)
start = [1,1,0,1]
maxium = [58,1128355,0.82632,28383]
moneyCount = (i,countLayer) ->
if start[i] < maxium[i]
Utils.delay start[i]*0.000000001, ->
showNumber = Utils.round(start[i],2)
countLayer.html = showNumber.toFixed(2)
start[i] = start[i]+maxium[i]/1283
moneyCount(i,countLayer)