Solved

Call javascript after FLV's done playing

Posted on 2009-05-15
1
502 Views
Last Modified: 2013-11-11
Hi,

I have an flash flv player that needs to call a javascript function after the flv is finished playing.

Please help.

Zip file attached.

Thanks in advance:)

Note: ** please change the scrubber1.txt to scrubber.fla ,148173681.txt to 148173681.flv,player.txt and scrubber.txt to *swf's, swfobject.txt to swfobject.js, index.txt and finished.txt  to *.html
sunny-flash-player.zip
0
Comment
Question by:sunny72
1 Comment
 
LVL 22

Accepted Solution

by:
rascalpants earned 500 total points
ID: 24413223
without downloading the 3.7mb of files and looking over all of them, here is what you would need to do to call a method when an FLV is done...


http://www.experts-exchange.com/Software/Photos_Graphics/Web_Graphics/Macromedia_Flash/Q_24322811.html


basically, you are looking for the onStatus event handler to return "NetStream.Buffer.Full"...  


and from there you can use ExternalInterface to call a javascript function

take a look at the below code to see the AS and Javascript needed...



rp / ZA

//  AS code
import flash.external.ExternalInterface;
 
ExternalInterface.call("helloWorld","rascalpants rocks");
 
 
 
//============
 
<script>
 
 
function helloWorld( value ){
   alert( value );
}
 
</script>

Open in new window

0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

A Change in PHP Behavior with Session Write Short Circuit (http://php.net/manual/en/book.session.php#116217) (Winter 2014)** With the release of PHP 5.6 the session handler changed in a way that many think should be considered a bug.  See the note …
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
The goal of the tutorial is to teach the user how to select the video input device. Make sure you have an input device that in connected and work and recognized by Adobe Flash Media Live Encoder and select it in the “video input” menu.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

770 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