A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Control video with flash

  1. #1
    Junior Member
    Join Date
    Jul 2007

    Control video with flash

    Can I, with flash obviously, control and monitor the video being played? For example, can I tell how many seconds the video has been played and then start/stop the video to do something else on the screen?

    Also in the same theme, can I commincate that information out to the main web page to interact with other JS type elements?

    Links, tutorials are gratefully accepted



  2. #2
    Senior Member
    Join Date
    Apr 2002
    Assuming you're talking about a video playing within a Flash movie, then yes, you can do all that. The code you use depends on how you choose to play the video. The easiest way is probably to use the FLVPlayback component (default when you import video into Flash). In Flash Help under FLVPlayback, you'll find all the code you can use to interact with the video. For example, FLVPlayback.playheadTime tells you the current time of the movie.

    For communicating out to the webpage via Javascript, there are a few different ways to do that as well. For two way communication (Flash to Javascript and Javascript to Flash), look in Flash Help under ExternalInterface.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Click Here to Expand Forum to Full Width

HTML5 Development Center