Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- stop();
- onMouseMove = function(){
- lpion.hlt._y = lpion2.hlt._y = _root._ymouse-300;
- lpoz.hlt._y = lpoz2.hlt._y = 400-_root._xmouse;
- guidex_mc._x = _xmouse;
- guidey_mc._y = _ymouse;
- }
- var kolor1:String = "0xFF0000";
- var kolor2:String = "0xFF0000";
- function updateWaves() {
- clear();
- f = _root.dane_mc.f0.text;
- hb = _root.dane_mc.f1.text;
- hm = _root.dane_mc.f2.text;
- Ch = 0.8 + (1.1*Math.log(f)-0.7)*hm - 1.56*Math.log(f);
- /*if(f > 200){
- Ch = 3.2*Math.pow(Math.log(11.75*hm),2) - 4.97;
- } else {
- Ch = 8.29*Math.pow(Math.log(1.54*hm),2) - 1.1;
- }*/
- a = 69.55 + 26.16*Math.log(f) - 13.82*Math.log(hb) - Ch;
- b = (44.9 - 6.55*Math.log(hb));
- distance = 0;
- pathLoss = 0;
- rays = _root.dane_mc.f5.text;
- for (z = 0; z < rays; z++) {
- distance = 0;
- pathLoss = 0;
- Vx = 1*Math.sin(z*2*Math.PI/rays);
- Vy = -1*Math.cos(z*2*Math.PI/rays);
- xCoord = Stage.width / 2;
- yCoord = Stage.height / 2;
- moveTo(xCoord,yCoord);
- for(i = 0; i < 1000 && pathLoss < 130; i++) {
- lineStyle(_root.dane_mc.f4.text,kolor1,((30-pathLoss)+120)*100/114);
- for (var Item in buildings_mc) {
- if (buildings_mc[Item].horizontal_mc.hitTest(xCoord, yCoord, 0)) {
- Vy *= -1;
- lineTo(xCoord,yCoord);
- pathLoss += 10;
- }
- if (buildings_mc[Item].horizontal1_mc.hitTest(xCoord, yCoord, 0)) {
- Vy *= -1;
- lineTo(xCoord,yCoord);
- pathLoss += 10;
- }
- if (buildings_mc[Item].vertical_mc.hitTest(xCoord, yCoord, 0)) {
- Vx *= -1;
- pathLoss += 10;
- }
- if (buildings_mc[Item].vertical1_mc.hitTest(xCoord, yCoord, 0)) {
- Vx *= -1;
- lineTo(xCoord,yCoord);
- pathLoss += 10;
- }
- }
- distance += Math.sqrt(Math.pow(Vx,2) + Math.pow(Vy,2));
- pathLoss = a + b*Math.log(distance*0.00005);
- trace((30-pathLoss));
- xCoord += Vx;
- yCoord += Vy;
- if(i % 10 == 0){
- lineTo(xCoord,yCoord);
- }
- }
- }
- }
- updateWaves();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement