Welcome to Phrogram Sign in | Join | Help


Sprite.Scale() how does it work?

  •  02-23-2008, 5:33 PM

    Sprite.Scale() how does it work?

    I have a test program. The Main() method contains this code:

    Define spider As Sprite
    Define factor As Decimal = 0.2
    Define magnification As Decimal
    Define i As Integer = 100

    spider.Load( "spider.png")
    spider.MoveTo(100, 50)
    spider.Show()

    Define spiders As Sprite[50]
    For i = 1 To 5
        magnification = factor * i
        spiders[i] = spider.Clone()
        spiders[i].Scale(magnification, magnification)
        spiders[i].MoveTo(100 + i*10, 50 + i*5)
        spiders[i].Show()
    Next

    It works if I comment out the line with the .Scale command. But I don't understand the lack of output when that line is included.

    david

    Filed under:
View Complete Thread