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 4340580
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T11:22:05+00:00 2026-05-21T11:22:05+00:00

Hi all I video playing using the FLVPlayback component. I know I can use

  • 0

Hi all I video playing using the FLVPlayback component. I know I can use one of multiple skins provided by adobe but I need to make my own simple play and pause buttons. I also need to do this within a class.

What I have is the FLVPlayback component called vid which fetches the video from an XML file and works fine. I also have a button called btn_play and the following code in the class file:

...
btn_play.addEventListener (MouseEvent.CLICK, playvid);
...
    public function playvid (e:Event) {

    }
...

Im not sure what code to use to make the video actually play. Also will need one for pause too. Finally if you have any idea how I can assign keyboard entry to these buttons or just the video i.e. pressing p on the keyboard makes it play etc id be grateful 🙂

  • 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-21T11:22:06+00:00Added an answer on May 21, 2026 at 11:22 am

    you can control the FLVPlayback component though your class using this info here: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/fl/video/FLVPlayback.html. Your play button code would look something like this:

    public function playvid(e:Event):void
    {
        //assume player is your FLVPlayback instance
        player.play();
    }
    

    To listen for keyboard events first attach a listener to the stage:

    stage.addEventListener(KeyboardEvent.KEY_DOWN, handleKeyPress);
    

    Then when you catch the KeyBoardEvent you can perform actions based on the key code.

    public function handleKeyPress(e:KeyboardEvent):void 
    {
        //convert the key's code to its value
        var pressed:String = String.fromCharCode(e.charCode);
        //perform actions based on the value of pressed
        switch (pressed.toLowerCase()) {
            case "p":
                playvid(null);
            break;
            case "s":
                stopvid(null);
            break;
        }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Are most flash video players created all programmatically? Or they done using static buttons
All I know about the constraint is it's name ( SYS_C003415 ), but I
Hi all i've ran into another problems with VideoView . Then video is playing,
I am playing an video from url using MPMoviePlayerViewController class and it is working
I'm looking for a good way to enumerate all the Video codecs on a
All the articles I've found via google are either obsolete or contradict one another.
All front-end developers know the pain of coding for Firefox, then viewing our then
Background: I have a little video playing app with a UI inspired by the
I want to copy all the video files on my server & save it
If all tables I want to delete from have the column gamer_id can i

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.