Solved

Setting up Javascript Flash video controls

Posted on 2010-11-12
3
307 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

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

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

Suggested Solutions

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…
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

789 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