Solved

Call javascript after FLV's done playing

Posted on 2009-05-15
1
503 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering 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

Suggested Solutions

Title # Comments Views Activity
Jquery 2 22
how can i get the string decoded ? 2 28
Not allowed to load local recource. 4 34
on window close, not beforeunload 6 15
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
In this tutorial viewers will learn how to create a basic shape tween animation in Flash including shape hints for smooth animation Open a new document in Flash: Draw a shape: Select another frame (how long you want the tween to be): Right click and…
This video teaches users how to migrate an existing Wordpress website to a new domain.

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