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

[MX,05] tell a button to go to a certain area on a pg 1

Status
Not open for further replies.

jbearclaw84

Technical User
Jun 6, 2007
20
US
Is there a way I can tell a button to go to a certain area on a web page? I am trying to mimic a web page that has a list of lets say questions and each question has a long answer about a paragraph. I want a list of the questions at the top to act like individual buttons that on release will direct me to its question and answer that are below instead of scrolling all the way down and trying to find the question. I want to be able to do this inside a dynamic text field is this possible?

Thanks in advance
 
You can use [tt]TextField.scroll[/tt] to go to the specific line of text within a TextField. However, how do you know which line your target will be...? HTML anchor is different, as you don't have to know the physical position of it within the page. As far as I know there are no such thing in the Flash TextField.

One way I can think of is to use ScrollPane Component, and divide your text sections into individual TextFields and add to the ScrollPane dynamically. Every time you add the TextField, store its position - then you can use that info to navigate the ScrollPane contents with [tt]ScrollPane.vPosition[/tt].

It will be a lot of codes compared to just <a> tag in HTML for sure...!

Kenneth Kawamoto
 
MX, 04 is the version I am using, sry used to flashkits forum rules. I am using AS 2.0. And yes exactly like anchor points. I also found an equivalent HREF tutorial using asfunction but have yet to figure out a way to utilize it.
 
yes! exactly like that. would you be comfortable sending the .fla?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top