Copy link to clipboard
Copied
I'm a novice Flash Pro user. I have a voice over sound track recorded in Adobe Audition. I inserted markers at various points (words) in the sound file. I need to make events happen in Flash when the words are spoken. Can anyone refer me to a method for reading markers (sound cues) in Flash? I just need some keywords so I can research this. I'd greatly appreciate a tutorial on this as well.
Thanks very much.
Message was edited by: paul_james123
That works. Thanks again, Rob. You've been a big help.
Copy link to clipboard
Copied
This article may help: http://www.adobe.com/devnet/actionscript/articles/cue_points_audio.html
Copy link to clipboard
Copied
Thanks much for the article, Rob. It looks like exactly what I need to learn. One problem:
I downloaded the "sound_sync.zip" sample file he provides (page upper right), extracted it and opened the "green_presidents_as3" flash movie to test it. I think something's wrong because the audio doesn't play. I see the sound file but don't hear it. I also see this in the output field: "Scene 1, Layer 'scripts', Frame 1, Line 33 1046: Type was not found or was not a compile-time constant: CuePointEvent."
I'm at a loss here. I think I could learn this if I could see it working. Am I doing something wrong or it this sample just not functional? I emailed the author, David Stiller, but haven't gotten any answer yet. Any help diagnosing this would be greatly appreciated.
Thanks
Copy link to clipboard
Copied
From the folder that you downloaded, go to the "AS3" folder and drag the "net" folder and the as file, "SoundSyncExample.as" to same folder that holds the .fla files. Then start the fla again. It should run as you expect it to.
Copy link to clipboard
Copied
Thanks, Rob.
Now I hear the sound and see the images change accordingly.
I still get an error in the compiler window though:
"C:\Users\pfortier\Desktop\sound_sync\sound_sync\net\quip\sound\SoundSync.as, Line 138 Warning: 1090: Migration issue: The onSoundComplete event handler is not triggered automatically by Flash Player at run time in ActionScript 3.0. You must first register this handler for the event using addEventListener ( 'soundComplete', callback_handler)."
Is that a problem?
Copy link to clipboard
Copied
The problem is that there is a function with a reserved word as its name, "onSoundComplete". This function is called on line 96 in "SoundSync.as" , and then used in the function on line 138. If you change the reference on line 96 and the name of the function on line 138 to something else, all should be well.
Copy link to clipboard
Copied
That works. Thanks again, Rob. You've been a big help.
Copy link to clipboard
Copied
Please bear with me:
I've fooled around with the sample file from that article (http://www.adobe.com/devnet/actionscript/articles/cue_points_audio.html)
and I'm wondering if this method does the reverse of what I need to do:
I need a sound file to control the movie (ie; When a word is spoken in the sound file, a certain image fades up on the stage). In my novice mind, it looks like the method used in the sample is controling the playing of the sound file (finding a particular sectioni of the sound file and playing it...according to what image is next in the timeline). I wouldn't be surprised if I have that wrong, tho.
I worked with Director long time ago and you could import sound files that had markers or cue points in them (these cue points were inserted by the audio authoring program). Those cue points coud be read by Director and could cause events to happen on the stage.
That's why I was asking if markers, inserted by Audition (my sound editor), could be read by Flash.
Is the method described in that article actually a good way to control the movie with cue points in a sound file or do I need to use another approach? Also, do Flash developers use markers inserted by sound authoring pgms (like Audition) to trigger events on stage?
Thanks
Copy link to clipboard
Copied
This example movie is importing a sound file and then attaching cue points to that file. The sound file begins to play. As the sound file plays, the onCuePoint eventListener calls a function as each cue point is hit. This function tells the main timeline to play. The main timeline continues until it hits a Stop() directive. This process continues until the movie ends.
So, if you have specific movie clips to play at cue points, you can just target the movie clip in the function instead of the main timeline.
Copy link to clipboard
Copied
OK I understand now. Yes it looks like it will work for me..just didn't expect to have to put the cue points in using Flash. Sounds like Adobe Audition cue points don't translate to Flash. (?)
Thanks again, Rob.
Copy link to clipboard
Copied
You should be able to export the markers as an xml file from Audition. Then you can import the xml and use that information. You can also use the position property of the soundChannel to find or move to a point in the sound file.
There is no direct way to get to the sound file markers in Flash. Apparently that would be too useful.
Copy link to clipboard
Copied
I'll check into that xml export thing. Either way, I know that I can use the method in that article if nothing else. Thanks much, Rob.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now