PDA

View Full Version : the mouseline equivelant in flash MX?


Jamerson
04-28-2003, 02:48 PM
Hi, I'm trying to find out which line the mouse is over in a dynamic text box, can this be done? ie is there an equivelant to the mouseline from lingo?
If not, what is the best way of going about this?

Thanks for ne help.

James

nathanleyton
04-28-2003, 02:59 PM
what are you trying to achieve. This will help everyone to answer.

Jamerson
04-28-2003, 03:36 PM
I have a dynamic text box containing

title 1
title 2
title 3
title 4

etc...

When the user clicks on title 2 for instance I want to find out what line the user has clicked on.

James

nathanleyton
04-28-2003, 03:39 PM
Have you considered using the comboBox component in flash MX. Or do you need to have text around the titles?

Jamerson
04-28-2003, 03:47 PM
I've looked at the combo box but I don't want the scroll bar to come up + plus it seemed to be rather over kill for what I wanted to do. That said however if one can't find out which line the mouse has clicked on, maybe that would be the better route (or only ;-) )

I've just started playing with actionscript, I'm more of a director man, so there is alot of searching around trying to find equivelant syntax that I would usually use in lingo.

nathanleyton
04-28-2003, 03:51 PM
tell in detail exactly what you are trying to do. you could even zip and post the .fla.

And people will help you. I am no expert but I have had alot of help from these forums and want to give a little back.

Also try searching the tutorials and in the forum. lots of helpful previous posts.

:)

Jamerson
04-28-2003, 03:56 PM
Hi, well thanks for trying anyway, I've looked in the tutorials but haven't as yet come across this sort of thing yet. I'm not really sure how else to explain it, in essence all I'm after is for flash to return the line number that the mouse clicks on. (the mouseline in director)

I'll keep on searching ;-)

cheers
James

senocular
04-28-2003, 04:06 PM
something to look into
http://proto.layer51.com/d.aspx?f=639
depending on the set up, the line could be achieved by seperating the selection between the \n (newline) characters in that field... this being of course on click only in a selectable textfield since it uses the Selection object to determine click position

Jamerson
04-28-2003, 04:11 PM
Hi, unfortunatly it isn't an editable text field, so they can't select nething in there.

senocular
04-28-2003, 04:18 PM
it doesnt have to be editable, just selectable
I think theres a comment in that example that gives an asfunction example...
otherwise youd have to map out some buttons to cover the areas needed to be effective in selecting those lines