# CuePoints and Listeners HELP!

**URL:** https://forum.kirupa.com/t/cuepoints-and-listeners-help/220483
**Category:** flash
**Created:** [March 26, 2007, 7:40pm UTC](https://forum.kirupa.com/t/cuepoints-and-listeners-help/220483 "2007-03-26T19:40:40Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![NHansen](https://avatars.discourse-cdn.com/v4/letter/n/f08c70/32.png) [@NHansen](https://forum.kirupa.com/u/NHansen)
#### Post date: [March 26, 2007, 7:40pm UTC](https://forum.kirupa.com/t/cuepoints-and-listeners-help/220483/1 "2007-03-26T19:40:40Z")

</div>

Ok, I have an FLV that progressively downloads, on the root timeline. It’s instance name is “vid”  
at 1 second into it I want it to perform a function, and at 15 seconds I want it to perform a function. So I am using this:

```auto
_root.vid.setMedia("dive.flv", "FLV");
_root.vid.addCuePoint("divecuestart", 01);
_root.vid.addCuePoint("divecueend", 15);

divelistenstart = new Object();
divelistenstart.cuePoint = function(eventObject){
    doThisStuff(eventObject.target.name);
};
_root.vid.addEventListener("cuePoint",divelistenstart);
function doThisStuff(mediaCue){
        switch (mediaCue) {
                case "divecuestart":
                trace("start");
                break;
        case "divecueend":
                trace("end");
        };
};

```

But it doesn’t work.  
Any ideas why?
