Hi,

Karina, Florian, thanks for help a lot. I rewrite your script once again
to
achieve exactly what I want. For those who are interested the script is
below.

Thanks

Kamil

property spriteNum
property pPresentMember
property myList
global piCounter
property pDirection
property pWhichSprite

on getPropertyDescriptionList me
  list = [:]
  addProp list, #pDirection, [#comment: "Direction",�
    #format: #string, #range: ["Left", "Right"],�
    #default: ""]
  addProp list, #pWhichSprite, [#comment: "Which Sprite?",�
    #format: #integer, #default: 1]
  return list
end

on beginSprite me
  myList = ["pict1", "pict2", "pict3", "pict4", "pict5"]
  piCounter = 1
  pPresentMember = member (myList[1])
end


on MouseDown me
  if pDirection = "Right" then
    me.RightArrow()
  end if
  if pDirection = "Left" then
    me.LeftArrow()
  end if
end

on RightArrow me
  piCounter = piCounter + 1
  if piCounter > myList.count then
    piCounter = myList.count
  end if

  pPresentMember = myList[piCounter]
  sprite(pWhichSprite).member = myList[piCounter]
  updateStage
end

on LeftArrow me
  piCounter = piCounter - 1
  if piCounter = 0 then
    piCounter = 1
  end if

  pPresentMember = myList[piCounter]
  sprite(pWhichSprite).member = myList[piCounter]
  updateStage
end


[To remove yourself from this list, or to change to digest mode, go to
http://www.penworks.com/LUJ/lingo-l.cgi  To post messages to the list,
email [EMAIL PROTECTED]  (Problems, email [EMAIL PROTECTED])
Lingo-L is for learning and helping with programming Lingo.  Thanks!]

Reply via email to