Solved

Setting up Javascript Flash video controls

Posted on 2010-11-12
3
304 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
Comment Utility
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
Comment Utility
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
Comment Utility
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

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Suggested Solutions

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
The goal of the tutorial is to teach the user how to live broadcast using Flash Media Live Encoder and connecting it to YouTube to broadcast. Log into your Youtube account, choose live stream settings, start live stream from Flash Media Live Enc…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

743 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

13 Experts available now in Live!

Get 1:1 Help Now