Skip navigation
Currently Being Moderated

Adding cue points to audio

Jul 18, 2012 8:04 AM

Hello,

 

I have a project that has video and audio files.  I am loading the videos using netstream.  I know I can add markers to wav files in soundbooth.  My question, is there a way to play sound files with cue points using the same priciples as netstream, and if so how must the code be altered to accomplish this.  So far I have created a sound file in wav form.  I edited it in soundbooth and saved it.  I didn't see anyway to publish or export it.  I then uploaded the wav file to my site and used this script with the same player I used for the video.

 

var nc:NetConnection = new NetConnection();

nc.connect(null);

var ns:NetStream = new NetStream(nc);

q1.attachAudio(ns);

ns.play("http://www.mysite.com/taudio.wav");

ns.onCuePoint = function(evt:Object){

    trace(evt.name);

    trace(evt.time);

    if(evt.name == "c1") {

        trace("YO !Jump to 5!");

        gotoAndPlay(5);

    } 

};

 

I named the player q1 and changed the "attachVideo(ns)"  to "attachAudio(ns)" The track points, or markers I made in soundbooth is called "c1", The project is in actionscript 2.0.

 

This did not work.  I don't know if I need to attach the cue points differently, or if I am attaching them at all, or how the coding works. 

 

Thanks in advance for your help.

 

Mark.

 
Replies
  • Currently Being Moderated
    Jul 18, 2012 9:19 AM   in reply to MARKARKARK

    You can create audio only .flv files, since the .flv is just a container format. It can contain just a video file, just an audio file, or both video and audio files.

    So transcode the wav file to .flv (the audio will be converted to mp3) and then add in cue points to the resulting (audio only) .flv file.

    Best wishes,

    Adninjastrator

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points