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

problem with scrolling text through arrow keys after exporting file to html

New Here ,
Mar 19, 2015 Mar 19, 2015

I am using Fash Professional CS6. I have created a text box that I can scroll through the scroll wheel of my mouse, as the scroll bar is hidden. But when I try to scroll the text through the arrow keys it is not allowing me to so that. As this is website and everyone is not going to have a scroll wheel, I have to make the arrow keys work to scroll the text. Could you please help me in fixing this problem? I tried to search this problem, but I haven't seen any questions so far.

TOPICS
ActionScript
413
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 ,
Mar 19, 2015 Mar 19, 2015

what code are you using for arrow keys?

if you're not using any then whether your textfield scrolls depends on whether it has focus and your keyboard/os/flash player plugin.

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
New Here ,
Mar 19, 2015 Mar 19, 2015

I am not using any code. I just used the UI tools and removed the icons. I have the plugins but it is not allowing me to do so.  And I have not put a FocusEvent listener in the actionscript code. Do you know how I can fix this.

Thank you very much

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 ,
Mar 19, 2015 Mar 19, 2015

if tf is your textfield:

stage.addEventListener(KeyboardEvent.KEY_DOWN,f);

function f(e:KeyboardEvent):void{

    if(e.keyCode==38){

        tf.scrollV++;

    } else if(e.keyCode==40){

        tf.scrollV--;

    }

}

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
New Here ,
Mar 19, 2015 Mar 19, 2015

tf should be the instance name of the text field. Right?
Sorry, as I said I am new to flash. So this might be a really silly question.

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
New Here ,
Mar 19, 2015 Mar 19, 2015

I named tf as the instance name and copied the code. But the code allows me to use the downkey to scroll halfway through the text and goes back to the top of the page.

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 ,
Mar 19, 2015 Mar 19, 2015

there's nothing in my code that would cause that.

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
New Here ,
Mar 19, 2015 Mar 19, 2015

that is what I am thinking. I uploaded the code on sramani.org/about.html

You can check. I still can't find a fix for it. Thank you very much for your responses

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 ,
Mar 19, 2015 Mar 19, 2015

i'm not sure what you want me to do with that link.

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
New Here ,
Mar 20, 2015 Mar 20, 2015

do you think that is the only fix for this problem?

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 ,
Mar 20, 2015 Mar 20, 2015

it's the simplest most straight-forward 'fix', but there might be others.

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
New Here ,
Mar 20, 2015 Mar 20, 2015

do you know of any? thank you very much

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 ,
Mar 20, 2015 Mar 20, 2015
LATEST

no, not for a swf.

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