Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6150291
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T19:35:40+00:00 2026-05-23T19:35:40+00:00

im developing a simple Mxml application using flex 3. I have used simple text

  • 0

im developing a simple Mxml application using flex 3. I have used simple text and combo box.
combobox contains items left right up and down while i click each element in combo box the scrolling text will scroll in selected direction it is working fine.
my question is how i can modify this application by pressing key board Arrow keys up, down, right and left. instead of using combobox elements??

my application code:

<?xml version="1.0" encoding="utf-8"?>

<mx:Script>
    <![CDATA[
        public var mytimer:Timer=new Timer(10);
        [Bindable]public var  arr:Array=new Array("upScroll","LeftScroll","right","down"); 

        private function initApp():void
        {
            mytimer.start();
            mytimer.addEventListener(TimerEvent.TIMER,scrollme);
        }


        private function scrollme(event:TimerEvent):void
        { 
            if(cmb.selectedLabel=="LeftScroll")
                {
                if(mytext.x==0)
                mytext.x=this.width-mytext.width;
                mytext.x--;
                }
            if(cmb.selectedLabel=="upScroll")
            {
                if(mytext.y==0)
                mytext.y=600;
                mytext.y--;
            }
            if(cmb.selectedLabel=="right")
            {
                if(mytext.x==this.width-mytext.width)
                mytext.x=0;
                mytext.x++;
            }
            if(cmb.selectedLabel=="down")
            {
                if(mytext.y==600)
                mytext.y=0;
                mytext.y++;
            }

        }

    ]]>
</mx:Script>

<mx:Text id="mytext" text="SCROLLING" fontSize="16" fontStyle="italic" fontWeight="bold"/>
<mx:ComboBox dataProvider="{arr}" prompt="Select" id="cmb" change="initApp()"/>


</mx:Application>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T19:35:40+00:00Added an answer on May 23, 2026 at 7:35 pm

    You can subscribe to Keyboard events of an Application:

     <s:Application
      ...
      creationComplete="creactionComplete()">
    
    function creactionComplete():void
    {
     addEventListener(KeyboardEvent.KEY_DOWN, keyHitHandler);
    }
    
    private function keyHitHandler(event:KeyboardEvent):void
    {
     if(event.keyCode == Keyboard.DOWN)
      //...
     if(event.keyCode == Keyboard.UP)
      //...
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a simple application using netbeans for developing and maven for building et
Hi I am developing a simple application based upon ASP.NET MVC. I have altered
I have been developing simple web services and clients using JBoss but now I
i am developing simple game application just using pan gesture and cgaffinetransform rotate application
I am developing a simple application for Android in which I am using a
i am developing one simple application for android mobile here i am using two
I'm developing a simple JSF application, but I'm stuck again... Basically, I have a
I've been developing a simple website using asp.net MVC and I'm starting to add
I am developing a simple platform game in Java using BlueJ. Over the next
Here's the situation: I'm developing a simple application with the following structure: FormMain (startup

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.