Solved

Call javascript after FLV's done playing

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

How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

Question has a verified solution.

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

Suggested Solutions

Foolproof security solutions has become one of the key necessities of every e-commerce or Internet banking website. If you too own an online shopping site then its vital for you to equip your web portal with customer security features that can allow…
What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
The goal of the tutorial is to teach the user how to how to record live broadcast.
This Micro Tutorial will teach to how to utilize bit rate in Adobe Flash Media Live Encoder.

738 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