Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Text field and mousewheel scrolling

Community Expert ,
Feb 14, 2009 Feb 14, 2009
I've a dynamic text field, populated from an external file, and with a scrollbar. I'd also like it to respond to mousewheel or trackpad scrolling. I have tried setting mouseWheelEnabled to true, but that doesn't seem to do the job (and seems to require clicking the field anyway). What else should I be looking at? Would I also need so listen for the mousewheel or scrolling event?

John
TOPICS
ActionScript
2.1K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 15, 2009 Feb 15, 2009
if the mouse is over the textfield when the stage has focus your textfield will respond to the mousewheel. what is it that you're trying to do?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 15, 2009 Feb 15, 2009
I'm expecting the text field to scroll up or down. Sorry that wasn't clear.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 15, 2009 Feb 15, 2009
and it will if your stage has focus and the mouse is over the textfield.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 15, 2009 Feb 15, 2009
So something explicit? Such as:

stage.focus = txtField;

That seems to have no effect. Could it be something to do with the text field being a library item, rather than being a new object added via code?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 15, 2009 Feb 15, 2009
that won't work until your stage has focus. if this is a projector file, that will work. if this is going to be embedded in a web page, the user will need to click on your stage first.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 15, 2009 Feb 15, 2009
It's on a web page and the text field only becomes visible when a menu item is clicked.

John
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 15, 2009 Feb 15, 2009
your web page works for me.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 16, 2009 Feb 16, 2009
Thanks for checking. Were you using Windows? I have been working on my Mac laptop (OSX Leopard) and scrolling with the trackpad. But I tested on my Windows desktop (XP) and the page works. Could it be an OS difference?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 16, 2009 Feb 16, 2009
i'm using windows and i tested in ff and ie both with fp 10.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 16, 2009 Feb 16, 2009
Same results on Windows FF and FP10. On Mac it was FF and Safari, FP10. Would you expect the OS to make the difference?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 16, 2009 Feb 16, 2009
no, but there are differences and apple is pretty weird about the mouse wheel.

i just googled "mac os x mousewheel" and see all sorts of problems reported. check it out. maybe someone has a solution.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 16, 2009 Feb 16, 2009
Seems there are solutions but for every one there seems a disadvantage such as breaking scrolling in Windows or having to set wmode="opaque". In my movie's case, that would break the color management (needs to be transparent), so I think I'm just going to let Mac visitors drag scrollbars. Thanks for your help.

John
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Feb 16, 2009 Feb 16, 2009
LATEST
you're welcome.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines