Loading:


    Rectangle clone [AS 2]

    Klasa: Rectangle

    Kompatybilność: ActionScript 1.0, Flash 8+

     

    Zwraca nowy obiekt Rectangle z tymi samymi wartościami dla x, y, width, oraz height właściwości jak oryginał obiektu.



    Napisz Artyku³

    Listing

    import flash.geom.Rectangle;

    var rect_1:Rectangle = new Rectangle(1, 2, 4, 8);
    var rect_2:Rectangle = rect_1;
    var clonedRect:Rectangle = rect_1.clone();

    trace(rect_1 == rect_2); // true
    trace(rect_1 == clonedFilter); // false

    for(var i in rect_1) {
        trace(">> " + i + ": " + rect_1[i]);
        >> toString: [type Function]
        >> equals: [type Function]
        >> union: [type Function]
        >> intersects: [type Function]
        >> intersection: [type Function]
        >> containsRectangle: [type Function]
        >> containsPoint: [type Function]
        >> contains: [type Function]
        >> offsetPoint: [type Function]
        >> offset: [type Function]
        >> inflatePoint: [type Function]
        >> inflate: [type Function]
        >> size: (x=4, y=8)
        >> bottomRight: (x=5, y=10)
        >> topLeft: (x=1, y=2)
        >> bottom: 10
        >> top: 2
        >> right: 5
        >> left: 1
        >> isEmpty: [type Function]
        >> setEmpty: [type Function]
        >> clone: [type Function]
        >> height: 8
        >> width: 4
        >> y: 2
        >> x: 1
    }

    for(var i in clonedRect) {
        trace(">> " + i + ": " + clonedRect[i]);
        >> toString: [type Function]
        >> equals: [type Function]
        >> union: [type Function]
        >> intersects: [type Function]
        >> intersection: [type Function]
        >> containsRectangle: [type Function]
        >> containsPoint: [type Function]
        >> contains: [type Function]
        >> offsetPoint: [type Function]
        >> offset: [type Function]
        >> inflatePoint: [type Function]
        >> inflate: [type Function]
        >> size: (x=4, y=8)
        >> bottomRight: (x=5, y=10)
        >> topLeft: (x=1, y=2)
        >> bottom: 10
        >> top: 2
        >> right: 5
        >> left: 1
        >> isEmpty: [type Function]
        >> setEmpty: [type Function]
        >> clone: [type Function]
        >> height: 8
        >> width: 4
        >> y: 2
        >> x: 1
    }
     




    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