Solved

Multiple flash movies on the page, change with DHTML/Javascript

Posted on 2008-10-08
1
854 Views
Last Modified: 2013-11-19
hi, I have a page that has 3 buttons to play 3 different flash video movies. I want to be able to show one movie at a time and let the user click to change to a different video, but without the page reloading.

If this weren't flash it'd be a snap-- just draw all 3 divs, and when the user clicks a button to choose one of them, show that one and hide the other two.

However, in this case, not only do I need to do the show/hide, but I also then need to tell the Flash movie to start playing (and for that matter, tell the other two movies-- the ones being hidden-- to STOP if they are playing).

How can I do this?

The Flash movie I'm using is actually the Flowplayer (to display FLV) files, at http://flowplayer.org/  
The code to draw it on the page is below (and there's also a .js file that I have to include.)

Please help.

thanks very much

Eric


window.onload = function() {  
 

    flashembed("vid-div", 

   

		/* 

			first argument supplies standard Flash parameters. See full list:

			http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_12701

		*/

      {

         src:'../libs/flowplayer/FlowPlayerLight.swf',

			width: 550, 

			height: 340

      },

		

      /*

			second argument is Flowplayer specific configuration. See full list:

			http://flowplayer.org/player/configuration.html

		*/

      {config: {

      		initialScale: 'scale',

			autoRewind: true,

       		loop: false,

			videoFile: 'my_video_file.flv',

			showMuteVolumeButton: false,

			showMenu: false,

			showStopButton: false,

			showFullScreenButton: false,

			showVolumeSlider: false

      }}

   );

}

</script>
 

<!-- this DIV is where your Flowplayer will be placed. it can be anywhere -->

<div id="vid-div"></div>

Open in new window

0
Comment
Question by:pnoeric
1 Comment
 
LVL 8

Accepted Solution

by:
MatthiasVance earned 500 total points
ID: 22676516
Have you checked out the following page?
http://flowplayer.org/player/scripting.html

Kind regards,

Matthias Vance
0

Featured Post

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

Preface This article introduces an authentication and authorization system for a website.  It is understood by the author and the project contributors that there is no such thing as a "one size fits all" system.  That being said, there is a certa…
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…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…

707 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

11 Experts available now in Live!

Get 1:1 Help Now