Loading:


    Math sqrt [AS 2]

    Klasa: Math

    Kompatybilność: ActionScript 1.0, Flash 5+

     

    sqrt(x:Number) : Number

     

    Oblicza oraz zwraca pierwiastek kwadratowy od określonej liczby podanej w parametrze.



    Napisz Artyku³

    Listing

    this.tworzKlipFilmowy("figura_mc", this.getNextHighestDepth());
    var sluchacz:Object = new Object();
    sluchacz.onMouseDown = function() {
        this.origX = _xmouse;
        this.origY = _ymouse;
    };
    sluchacz.onMouseUp = function() {
        this.newX = _xmouse;
        this.newY = _ymouse;
        var minY = Math.min(this.origY, this.newY);
        var glebokosc:Number = figura_mc.getNextHighestDepth();
        var linia_mc:MovieClip = figura_mc.createEmptyMovieClip("linia"+glebokosc+"_mc", glebokosc);
        line_mc.moveTo(this.origX, this.origY);
        line_mc.lineStyle(2, 0x000000, 100);
        line_mc.lineTo(this.newX, this.newY);
        var hypLen:Number = Math.sqrt(Math.pow(linia_mc._width, 2)+Math.pow(line_mc._height, 2));
        linia_mc.createTextField("dlugosc"+glebokosc"_txt", figura_mc.getNextHighestDepth(), this.origX, this.origY-22, 100, 22);
        linia_mc['dlugosc'+glebokosc+'_txt'].text = Math.round(hypLen) +" pikseli";
    };
    Mouse.addListener(sluchacz);




    Dodano przez: divix
    Ranga: Administrator serwisu Punktów: 0
    Komentarze użytkowników
      • Tre¶æ komentarza
        Kod do komentarza (opcjonalnie)
        PHP JavaScript MySQL Smarty SQL HTML CSS ActionScript
        Autor
        Token
        token

         

         








    funkcje.net
    Wszelkie prawa zastrzeżone©. | Funkcje.net 2008-2025 v.1.5 | design: diviXdesign & rainbowcolors