<p>I'm using Flash to play an .flv movieclip on my site, but I want to have the .swf send trigger an event in my javascript when it start loading, starts playing and ends playing.</p>

<p>What is the best way to do that in Flash CS3 using Actionscript 3.0 ?</p>

A common way to do this is with the
ExternalInterface
class, which you can use to call JavaScript methods.
First define your JavaScript methods, for example:
```
```
<script language="JavaScript">
    function startsPlaying()
    {
        // do something when the FLV starts playing
    }
</script>
```
```
Then modify your ActionScript to call the JavaScript method at the appropriate time:
```
```
// inform JavaScript that the FLV has started playing
ExternalInterface.call("startsPlaying");
```
```
For more information, see the related Flash CS3
documentation
.