Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Setting up Javascript Flash video controls

Posted on 2010-11-12
3
Medium Priority
?
311 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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:
Justin Mathews earned 2000 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

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
Without even knowing it, most of us are using web applications on a daily basis.  In fact, Gmail and Yahoo email, Twitter, Facebook, and eBay are used by most of us daily—and they are web applications. We generally confuse these web applications to…
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 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.

670 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