Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

i want to to have a scrollable fiel

Status
Not open for further replies.

doog1

Programmer
Jul 15, 2003
8
GB
i want to to have a scrollable field with numerous buttons - the basic idea is to have a selection of thumbnails that scroll left and right bringing up an enlarged version of the thumbnail when its clicked on, the only part i need to know is how to place all the thumbnails so that a left and right arrow moves them all ???

Any help would be most appreciated cheers doog
 
You place one thumbnail button in one sprite channel, then move all of them in one go. Say you have 100 thumbnail buttons placed in sprite channel 1 to 100. Then make a button called "left_button" and attach the following behaviour script:
Code:
--
on enterFrame me
  -- check if the button is pressed	
  if the mouseDown and the mouseMember = member("left_button") then
    -- check if thumbnails have leach the right limit
    if sprite(1).locH < 1200 then
      -- move all in one go
      repeat with i = 1 to 100
        sprite(i).locH = sprite(i).locH + 1
      end repeat
    end if
  end if
end enterFrame
--
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top