Solved

Setting up Javascript Flash video controls

Posted on 2010-11-12
3
305 Views
Last Modified: 2012-08-14
I have a flash video that I want to be able to control using Javascript, but I have very limited experience with Javascript and Actionscript. I've done a lot of searching online and I've found lots of pieces of semi-working code but I can't get any of these pieces to be implemented into my test page (no code except the embed).

Where do I start? Do I need to add code to the flash file as well as the page?
<script type="text/javascript">

AC_FL_RunContent( 'codebase','http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0','width','570','height','210','title','test','src','video/kentcomm11','quality','high','pluginspage','http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash','movie','video/kentcomm11' ); //end AC code

</script><noscript><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,28,0" width="570" height="210" title="test">

  <param name="movie" value="video/kentcomm11.swf" />

  <param name="quality" value="high" />

  <embed src="video/kentcomm11.swf" quality="high" pluginspage="http://www.adobe.com/shockwave/download/download.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" width="570" height="210"></embed>

</object></noscript>

Open in new window

0
Comment
Question by:kentcommunications
3 Comments
 
LVL 5

Expert Comment

by:wmadrid1
ID: 34123102
Hi,
I can recommend you a free web video player,
http://www.viscomsoft.com/products/webplayer/index.html

Easy setup, multiple video formats, free single user lincense.
0
 
LVL 16

Accepted Solution

by:
jmatix earned 500 total points
ID: 34123187
If your flash player <object> has an ID attribute, say, 'flash', Then you can do something like the following to play/pause.
<a href="#" class="close" onclick='var vid=document.getElementById("flash");vid.isPlaying()?vid.stop():vid.play();'/>Play/Pause</a>

Open in new window

0
 
LVL 8

Expert Comment

by:section25
ID: 34124270
Well, I guess this begs the question, why are you trying to control a flash based video player with javascript, when you could easily control it with actionscript from within flash?
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The goal of the tutorial is to teach the user how to use the auto adjust feature and what the different options do. When your video is not working right you can choose the auto adjust feature to help choose your settings.
The goal of the tutorial is to teach the user what frame rate is, how to control it and what effect it has on the video.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now