Results 1 to 6 of 6

Thread: scrolling pic

  
  1. #1
    mafia1ft is offline -Hacks Newbie
    Join Date
    Mar 2006
    Posts
    9
    Rep Power
    0

    Default

    is there a way to make a picture scroll
    say i have a pic that is 480*1000 is there a way that if i hold up the picture will scroll
    thx


  2. #2
    restless5150 is offline -Hacks Veteran
    Join Date
    Mar 2006
    Location
    smoking rocks
    Posts
    1,128
    Rep Power
    15

    Default

    bump

  3. #3
    illfoundedmind is offline -Hacks Enthusiast
    Join Date
    Nov 2005
    Location
    WTF~~~~~~~~~~> Rank: %NULL
    Posts
    389
    Rep Power
    15

    Default

    No. With the lua player for psp you can only load images that are 512 and under. now if you wanted to scroll a picture that was that size you would do this:

    background = Image.load("background.png")
    y = -272
    x = 0

    for y < 272 then
    y = y + 1
    screen:blit(x,y, background)
    System.sleep(500)
    end
    july 19

  4. #4
    Xskorpion is offline -Hacks Newbie
    Join Date
    Nov 2005
    Posts
    10
    Rep Power
    0

    Default

    Quote Originally Posted by illfoundedmind
    No. With the lua player for psp you can only load images that are 512 and under. now if you wanted to scroll a picture that was that size you would do this:

    background = Image.load("background.png")
    y = -272
    x = 0

    for y < 272 then
    y = y + 1
    screen:blit(x,y, background)
    System.sleep(500)
    end
    Error: index.lua:37: `=' or `in' expected near `<'

    :mad:

  5. #5
    romero126 is offline -Hacks Neophyte
    Join Date
    Jan 2006
    Posts
    81
    Rep Power
    14

    Default

    Syntax is important.

    for y < 272 then
    is not the correct syntax.


    use

    while y < 272 do
    -- stuff here
    -- Loops until y = 271
    y = y+1
    end

    or
    for y=-272, 272 do
    -- Y = y+1 until y = 272
    end

  6. #6
    MexicanSnake is offline -Hacks Newbie
    Join Date
    Aug 2006
    Posts
    3
    Rep Power
    0

    Default

    cool! good snippets :D

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •