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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Making a text pop up menu from a complex list

Status
Not open for further replies.

twistedlogic

Technical User
Jan 10, 2002
35
0
0
AU
Hi all.
I'm creating a search menu. Its all going well, and the point i am up to is such:

I have a list containing the sorted material.

[["name of item1", location of item1],["name of item2", location of item2]......] etc

now I wish to display each of the names on different lines of a text box, and then have each line of text as a link to the location of the item.
so we have something like

nameofitem1 -----when clicked goes to relevant marker etc
nameofitem2 ----- goes to marker
nameofitem3 ----- etc....
nameofitem4

I think i've figured out how to place the text in the right place but how to make the text a navigation button?

thanks in advance

 
twistedlogic,

any luck on figuring this out? I am in the same boat right now but need to link to a list of PDF documents. Any words of wisdom would be appreciated.

thanks
 
Hold on guys, I'll whip up something useful by tomorrow night.
 
You can use
Code:
hyperlink
to create hyperlink text dynamically. For example:

Code:
global linkList

on prepareMovie
  linkList = [["item 1", "location 1"], ["item 2", "location 2"], ["item 3", "location 3"]]
end prepareMovie

on startMovie
  linkListCount = linkList.count
  repeat with i = 1 to linkListCount
    member("linkTable").text = member("linkTable").text & linkList[i][1] & RETURN
  end repeat
  repeat with j = 1 to linkListCount
    member("linkTable").line[j].hyperlink = linkList[j][2]
  end repeat
end startMovie

Then attach the link behaviour to the "linkTable" sprite:

Code:
property spriteNum

on hyperlinkClicked me, data, range
  alert(data) -- or place something useful here!
end hyperlinkClicked
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top