Solved

Call javascript after FLV's done playing

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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 …
Boost your ability to deliver ambitious and competitive web apps by choosing the right JavaScript framework to best suit your project’s needs.
The goal of the tutorial is to teach the user how to how to load their YouTube profile onto Flash Media Live Encoder.
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

867 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

19 Experts available now in Live!

Get 1:1 Help Now