_root.createEmptyMovieClip("bola",1); _root.createEmptyMovieClip("btn",2); _root.createEmptyMovieClip("chao",3); with(bola) { lineStyle(1,0x000000,100); moveTo(100,10); beginFill(0x0000ff,100) curveTo(55,15,50,60); curveTo(55,105,100,110); curveTo(145,105,150,60); curveTo(145,15,100,10); endFill(); } with(btn) { lineStyle(0.5,0x000000,100); beginFill(0xe9e9e9,100); moveTo(450,200); lineTo(450,220); lineTo(490,220); lineTo(490,200); lineTo(450,200); endFill(); moveTo(452,215); lineTo(452,205); lineTo(457,205); lineTo(457,209); lineTo(452,209); moveTo(460,205); lineTo(460,214); lineTo(465,214); moveTo(468,215); lineTo(468,205); lineTo(473,205); lineTo(473,215); moveTo(468,210); lineTo(473,210); moveTo(478,205); lineTo(481,209); moveTo(484,205); lineTo(478,215); } with(chao) { lineStyle(2,0x000000,100); moveTo(0,307); lineTo(550,307); } _root.bola._xscale = 50; _root.bola._yscale = 50; _root.valor = 1; cair = function() { if (_root.gravidade) { this._y += _root.fg; _root.fg++; } if (this._y > 250) { _root.fg*=-1/1.8; } } _root.btn.onPress = function() { _root.fg = valor; _root.bola._y = -100; _root.gravidade = true; _root.bola.onEnterFrame = cair; } |