Using audio cue points in a flash movie
Hello all,
I am trying to put together some simple videos for my kids to
play on their ipods to study on the way to school.
I put together a real simple slide show, and prepared an
audio track. I polished it up in soundbooth, and included some
markers in the audio track. I was hoping to find a way to pause the
slideshow, until the marker is reached in the audio track. I have
done this before in director, but just cannot seem to figure it out
in flash cs3. Any help you can give would be appreciated.
Thanks, BobR
Hi,
The following AS2 code may help you
stop();
var listenerObject:Object = new Object();
listenerObject.ready = function(eventObject:Object):Void {
<your flv playback instance name>.addEventListener("ready", listenerObject);
var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object):Void {
<your button instance name>.onRelease = function () {
playback.seekToNavCuePoint("<your cue point name>");
<your flv playback instance name>.addEventListener("cuePoint", listenerObject);
\\replace all the placeholder things including the < >
Also just take a look at the description at http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Liv eDocs_Parts&file=00003003.html for more details
Thanks!
ps: pls mark this post as answered if this is of help to you
Similar Messages
-
Using event cue points to add buttons
How do I go about having buttons display in an external flv file? I know I can establish event cue points with Adobe media encoder. I want the the buttons and graphics to appear and stay on the screen, even though the external flv loops. Its been a long day and I have exhausted all other options, otherwise I would not have asked on here. Thanks in advance. Oh btw using Flash cs 5.5 and as 3. thanks
i just added x and y locations:
Movie01.addEventListener(MetadataEvent.CUE_POINT,cuepointF);
function cuepointF(e:MetadataEvent):void{
trace(e.info.name); // this will display your cuepoints when their dispatched. you'll use if-statements below this line to add your buttons. eg,
if(e.info.name=="middle"){
addChild(button1); // assuming button1 is already created.
button1.x=639;
button1.y=140.5;
it worked with no errors
thanks again! -
Bringing up a button and an image using video cue points
Hi,
I have a 4:40 long video and I'd like to show a button and a background image (or a movie clip) at 4:30 and I want them stay on the screen after the video is complete. If someone could give me a step by step instructions for this I'd really appreciate it. By the way I use Flash CS5.
Have a great day!
VeliSorry if I confused you. Here's a little sample video I'd like to show you (only 10 seconds), so I can explain it more clearly. This is exactly the same thing except it is 10 seconds instead of 5 minutes.
http://www.relationsmith.com/hhosp/slideshow/jan12/slideshow.html
In this project I have 6 layers (from top to bottom); action, replay, button, bg, frame, video. The video plays and the button (btn1) comes up at 7, then the video ends and replay button comes up. So far so good.
When I hit replay button to watch the video again, the video starts to play but this time the video is on the top of everything. I cant see the blue frame, at the 7th second the button activates but is hidden behind the video, and so is the replay button. I think the answer lies in this code:
function replay(e:MouseEvent):void {
addChild(flv_pb);
flv_pb.play();
You said this code "addChild(flv_pb);" would put the video on the top of everything. So I was wondering if there is a way to play the video without having it at the top most depth. I'm pasting the entire code for your reference.
Thanks!
import fl.video.MetadataEvent;
replay_btn.visible=false;
btn1.visible=false;
flv_pb.addASCuePoint(7,"show");
flv_pb.addEventListener(MetadataEvent.CUE_POINT,cuepointF);
flv_pb.addEventListener(Event.COMPLETE,completeF);
btn1.addEventListener(MouseEvent.CLICK, clickButton);
replay_btn.addEventListener(MouseEvent.CLICK, replay);
function completeF(e:Event):void{
replay_btn.visible=true;
function replay(e:MouseEvent):void {
addChild(flv_pb); // moves flv_pb to the top most depth
flv_pb.play();
function cuepointF(e:MetadataEvent):void{
if(e.info.name=="show"){
bg.play()
btn1.visible=true;
var myURL:URLRequest=new URLRequest("http://www.ctwolfpackyouth.org/");
function clickButton(myevent:MouseEvent):void {
navigateToURL(myURL); -
HT3775 I used to be able to play Flash Movies, when I updated my Flash everything went south
I use an I MAC OS 10 Version 10.8.4
Adobe Flash Player Install Manager:
Version: 11.8.800.94
Last Modified: 7/30/13 3:25 PM
Kind: Intel
64-Bit (Intel): No
App Store: No
Location: /Applications/Utilities/Adobe Flash Player Install Manager.app
INSTALLED now several times.
I usd to be able to view movies on FB or on my computer
FLASH Mob. MVP's outputs from Microsoft saved for web.
NOW everytime it tells me I must install th latest version of Flash, however the installation claims it is sucessfull. I A BEYOND frustrated..What do I need to do?
THANKS.
ripplieIf you're sure you've installed the latest version of Flash, take each of the following steps that you haven't already tried. After each step, relaunch Safari and test. For a "missing plug-in" error, start with Step 4.
1. If you're getting a "blocked plug-in" error, then from the menu bar select
▹ System Preferences… ▹ Flash Player ▹ Advanced
and click Check Now. Quit and relaunch your browser.
2. Triple-click the line below to select it:
/Library/Internet Plug-Ins
Right-click or control-click the highlighted text and select
Services ▹ Open
from the contextual menu. A folder should open. Delete the following item, or anything with a similar name, if present:
Flash Player (failing).plugin
You may be prompted for your login password.
3. Re-download and reinstall Flash. Download it from this page:
Adobe - Install Adobe Flash Player
Never download a Flash update from anywhere else.
4. If you get a "missing plug-in" error, select
Safari ▹ Preferences... ▹ Security
from the Safari menu bar and check the box marked Enable plug-ins.
5. Select
Safari ▹ Preferences... ▹ Extensions
from the Safari menu bar. If any extensions are installed, disable them.
6. In the Safari preference window, select
Privacy ▹ Remove All Website Data
Close the window. Then select
▹ System Preferences… ▹ Flash Player ▹ Advanced
and click Delete All. Close the preference pane. -
Flash CS4, Using ActionScript in Buttons to go to cue points in a FLV
Hi.
I'm pretty much a Flash novice, so i don't think this question is particularly hard, it's just something that's vexing me for a few days. I know it's possible based on all the literature I've read, but I can't seem to get it done properly.
Basically, I have a video file that I rendered in FLV with 5 navigation points called 1, 2, 3, 4, 5.
What I want to do is use buttons to navigate to the five cue point in the flash movie. I think that this is possible using ActionScipt 2, but I don't know what to code in the script function.
Any help would be very, very appreciated.
Thanks,
JavierHi,
The following AS2 code may help you
stop();
var listenerObject:Object = new Object();
listenerObject.ready = function(eventObject:Object):Void {
<your flv playback instance name>.addEventListener("ready", listenerObject);
var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object):Void {
<your button instance name>.onRelease = function () {
playback.seekToNavCuePoint("<your cue point name>");
<your flv playback instance name>.addEventListener("cuePoint", listenerObject);
\\replace all the placeholder things including the < >
Also just take a look at the description at http://livedocs.adobe.com/flash/9.0/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context=Liv eDocs_Parts&file=00003003.html for more details
Thanks!
ps: pls mark this post as answered if this is of help to you -
Using cue points in Flash CS5 to trigger actions
Hi there,
I'm looking to use a cue point in a video to trigger an action, in this case go to and play at a movie clip on the stage. Is this possible. My setup is as follows:
I've a video on stage with the instance name 'vid', with a cue point 'lap1' (an actionscript cue point created directly in Flash using the properties panel). When the video reaches cue point 'lap1', I want it to go to and play frame 2 of a movie clip I've got on stage with the instance name 'cueMovie'.
Any help would be great; I've looked online for tutorials but no joy.
Cheers,
Conor1 stop();
2 varListenerObject:Object = new Object();
3 listenerObject.cuePoint = function(eventObject:Object):Void{
4 trace(Cue Point:"+ eventObject.info.name);
5 trace("event:"+eventObject.info.type);
6 if(eventObject.info.name=="cue Point 1"){
7 gotoAndStop(2);
8 }
9
10 }
if your cue point is named cue point 1 then you can leave script as it is if not you have to insert your cue point name> Also it has to be an event type of cue point to work. -
Using Cue Points to advance to next scene
I'm pretty new to AS3. I'm a designer trying to do it myself.
What I'm trying to do is use a cue point at the end of my FLV (which is loaded using ui loader in my flvSWF) to go to the next scene in my mainSWF file.
here's the code I'm using in my flvSWF:
import fl.video.VideoEvent;
import fl.video.MetadataEvent;
IntroMovie.addEventListener(MetadataEvent.CUE_POINT, cp_listener);
function cp_listener(eventObject:MetadataEvent):void {
trace("Elapsed time in seconds: " + IntroMovie.playheadTime);
trace("Cue point name is: " + eventObject.info.name);
trace("Cue point type is: " + eventObject.info.type);
if (eventObject.info.name == "CueNextScene") {
this.gotoAndPlay("desk");
But of course it does not work.
A. my traces don't show up.
B. Am I suppose to use this code in my mainSWF instead of the flvSWF
C. An FYI the IntroMovie is one of 4 random movies that gets played for the intro in mainSWF. The random script works fine.You can build out a menu by reading the cuePoints array in
the NetStream.onMetadata handler, or by using the MetadataEvent
with the FLVPlayback component (AS3). The simple thing for me to
say is to refer to Chapter 9 of my new Flash Video book. :) (see
link in my signature below.) -
Handling Flash video cue points in Javascript
Can any kind person give me any pointers on how to get Javascript in an HTML page containing an FLV video to listen for cue points in the video? I understand how to get the cue points in, but most people only seem to want to handle the cue point events within Flash. I want to use Javascript to display a different text in a page element at each point. Does the method vary depending on what player you're using? How about when it's the standard Flash playback component? Does there need to be any special Actionscript in the SWF containing the FLV?
Thanks
FredThanks Rob, will do.
For anyone else looking into this issue there are some links to the ActionScript documentation on this StackOverflow post and an explanation of how to use ExternalInterface halfway down the page in this Adobe Devnet tutorial.
Presumably you'd first import the ExtenalInterface class into your Flash with
import flash.external.*;
And then add an ActionScript event listener which sends the ID of each cue point out to the Javascript using the ExternalInterface.call() method:
ExternalInterface.call(methodName:String, [parameter1:Object]) -
FLV/Mp3 Cue Points for Accessing Frame Labels on the Main Timeline in Flash 8
Hello,
In Flash MX2004, creating cue points for syncing locations on
flv and mp3 files to locations on the main timeline included:
1) Dragging a media component onto the stage
2) Entering file path, frame label name, and time code
information in the component inspector
3) Creating the frame label names on the main timeline, and
4) Enabling the Media Labeled Frame Cue Point Navigation
Behavior
Flash 8 documentation details a considerably different
process of creating cue points. While it discusses how to create
cue points in the flv, I have not been able to locate how to enable
linking locations in flv and mp3 files with frame labels on the man
timeline. It appears that there would need to be ActionScript
necessary to accomplish this that is not available in the docs.
Please advise what ActionScript/process would enable this
function.
Thank you!
James
[email protected]I usually start off solving problems with the livedocs, as I
recommend for anyone. The following link will take you to the
NetStream.onCuePoint handler. This is what you need.
http://livedocs.macromedia.com/flash/8/main/wwhelp/wwhimpl/common/html/wwhelp.htm?context= LiveDocs_Parts&file=00002561.html
You can have this code on the main timeline. When the
cuepoint is hit, it will invoke this event handler and inside is
where your gotoAndPlay( ) should go.
Your other question about the text will get activated by the
same handler. Just have a conditional statement (if, switch, etc.)
to differentiate between the two events. The text itself can be
mask inside a movieclip.
Does this help? -
Basic Flash movie questions from a Flex coder
Hi,
I've coded several Flex applications (I'm a programmer by
trade) for the last 6 months. Now I have a new project to do with
Flash, and I'm mighty confused - as I don't know much about Flash
and its timelines, etc.
I've been given a bunch of FLV files - movies from a video
camera like you see on Youtube. I'd like to add some logic to them.
Do I create a new Flex or Flash project and somehow embed the
FLV file?
I read that the they can attach "labels" to timelines in a
movie and that I can react to the labels being triggered using
event handlers. Can I programmatically add labels to an existing
FLV movie?
So after all is said and done, I'm guessing I would compile
it using MXMLC if it is a Flex project. But what if it were a Flash
project, what is the compiler? In addition, can I simply code the
whole thing as an actionscript (.as) file and compile it using a
Flash compiler?I wouldn't embed the files. This is OK if they don't include
audio that's synched to the video, but otherwise will be
problematic. You'll get better performance overall by linking to
the external FLV. To 'add logic' you'll need to us cue points.
These can either be added via ActionScript or embedded into the FLV
using something like Flash Video Encoder. You can use the cue
points to trigger whatever actions you require. -
I am reasonably new to Flash and would like to know if I can
create a html link to a cue point in a flash video file or to a
particular frame in a normal swf file. If so, what is the correct
syntax?Ok, I seemed to have succesfully linked to the cuepoints
using, for example, the code below.
[CODE]
programsa.addEventListener(MouseEvent.CLICK,programsaClick);
function programsaClick(event:MouseEvent):void {
movie1.seekToNavCuePoint("Programs");
[/CODE]
However, now I have another issue. The FLV is on frame 2 and
I want to navigate to it using buttons on frame 1. However when I
try the following:
[CODE]
programsa.addEventListener(MouseEvent.CLICK,programsaClick);
function programsaClick(event:MouseEvent):void {
gotoAndStop("movie");
movie1.seekToNavCuePoint("Programs");
[/CODE]
I get the error:
TypeError: Error #1009: Cannot access a property or method of
a null object reference.
at videobig_fla::MainTimeline/programsClick()
So, how can I tell a button to go to a cuepoint for a movie
that's on a different frame? -
Audio not streaming correctly from Flash Media Server
Our company has a Flex application (3.0.2) that is having a problem with audio dropping out in Windows 7. The problem appears worse with a wireless connection, but it can’t be consistently reproduced there, either. The only thing known for sure is that the problem has not been seen on any other version of Windows.
The application thinks the audio is playing, because it is calling the appropriate event listeners triggered when the audio completes and when any audio cue points are hit. The majority of our audio is streaming via Flash Media Server (3,0,2,201), but the problem was also seen using embedded sound effects. In one instance, several clicks of a button triggered an error saying the sound effect could not be loaded, and then about a minute later, all the sound effects played at once and the user could then continue with the application.
The problem has been repeated in IE 8, Firefox 3 and Chrome.Thanks for your details. But i need more info.
Server:
FMS 3.0.2 ?
FMS installed in which platform Linux/windows? more details about it.
Client:
IE 7
Flash Player version ?
WIndows 7
Wireless connection - Was the client placed in poor bandwidth.
Can you get the NetStream status info when u play the audio file.? We can check for the rebuffering happening at the client side.
Can you run your audio file through flvCheck Tool to check if the media file is in good form. It is available at "\$Root|Flash Media Server\tools\flvcheck.exe"
Now our intention should be to check the same media file with simpler application (since your production app is complicated) to ensure that the media streaming over 'client to server' is working fine.
Regards,
Janaki L -
Can i capture laser pointer events in Flash?
Hi.
I have some people who are doing a medical presentation. Of course they are using PowerPoint and a couple of flash movies. When they launch their Flash movies from within the powerpoint they want to slide the flash presentation using the Laser Pointer.
I made the flash files to slide at click on the stage. But that laser pointer doesn't have a click, It has two buttons wich launch somekind of event though USB of forward and backward which the powerpoint recognizes.
So can flash recognise those, do any of you have any experience with this things? Can i listen globaly to all event that are triggered in flash to see if any of those come up?
Tnx.FMLE will not directly mux audio connections from different sources. You could try possibly using a "Virtual Audio Cable", which is a outside program. Search Google for it.
If you want to have more control over what you broadcast, I suggest using a 3rd party program such as Telestream Wirecast, or Xsplit..
Xsplit is a realtively cheap alternative to Wirecast which is pricey.
Check them Out.. -
Tracing cue points in dynamically loaded video
The beauty of using a video object in Flash is that you don't
have to import the .flv file (at least that's how I understand
this). I've loaded Untitled.flv dynamically using the code below
and it plays just fine. I've created my own video player buttons
and they work fine as well.
I've encoded my Untitled.flv and created a cue point at 10
secs with the following info:
Name: cuePtEnd
Time: 00:00:10.00
Type: Event
I left the parameters window empty.
I want to trace the following statement, "Cue point reached"
once this cue point is reached. I have an idea of how to do this
using the FLVPlayback component, but if I place an instance of this
on the stage, I'll have two videos, the one that I'm loading
dynamically and the instance of FLVPlayback. I don't want to use
components; I'm a little confused at this point; please help.Make a simple Director movie. Link your video file and place
the sprite on the stage. Add two buttons. Use the first button to
start and stop the video. Use the second button to record the
movieTime. You can use this sample if you like:
http://www.ddg-designs.com/downloads/movieTime.zip.
Play the video, and at each point where you want the video to
start at a new point, click on the second button. When you are
finished, you will have a list of all of the starting points for
the video. You can do the same thing for the end times of each
section.
Once you have this list, you can use these as you would use
the cue points. -
Best way to control graphics synchronized to video cue points
Hello,
I've recently completed (well, 'completed' is a strong word)
a phase one implementation of a synchronized video presentation
using After Effects and Flash. The basic idea driving the
synchronization of cue points to motion graphics revolves around
creating a listener in the following fashion:
var listenerObject:Object = new Object();
listenerObject.cuePoint = function(eventObject:Object):Void {
// Put any code you like here
trace("Cue point name: " +
eventObject.info.name);
my_FLVPlybk.addEventListener("cuePoint",
listenerObject);
and then using the cue point name to play a variety of
movieclips at the appropriate time in the presentation.
The video presentation had four sections, each of which could
be arbitratrily browsed to at any point in the presentation, so it
was important that the the movieclips did not need to play in order
and that they could be interrupted at any point without an visual
confusion.
I dealt with this two ways (I am sure these are not the best
ways, which is why I am writing this post):
First, every single movieclip was already on the stage from
the outset, stopped on the first frame, with the alpha property set
to 0 (based on Aran Balkan
http://aralbalkan.com/444).
The final frame of each clip had a gotoAndStop(1) action on it so
that when a clip finished playing it 'reset' itself. I also wrote a
"rewind" function which pretty much did the same
thing whenever a user clicked on one of the navigational tabs.
For a first iteration, this worked pretty well, and it
impressed enough people in my organization (university) that now
the President wants to deliver a similar message. It seemed prudent
at this point to ask a general question about best practices in
this area. I am working with the full Master Collection suite, and
can target later versions of the Flash Player (I believe I can use
AS 3.0, although I will have to learn it). One thing that I am
hoping any pointers you guys might have will cover is this:
How do you handle starting/stopping/pausing of the video and
also make sure any currently playing graphical assets also
start/stop/pause on cue? I was thinking of setting a variable on
the second frame of each movieclip, something along the lines of
'nowPlaying = this;' and then resetting that to null at the end of
the clip and in the rewind function, then using that variable to
control the currently playing clip (would have to bu just one, I
imagine).
But there has got to be a better way. I have some down time
to do research and to experiment, but it is going to be very high
profile when it rolls around, so I thought I'd send out some
feelers.
Has anyone done anything like this? Seen a better way? Etc .
Thanks so much.Best practice is to keep one single file as long as humanly possible.
In this case, you "branched" a version for another format; I'd suggest you don't edit that any further (apart from the formatting stuff you mentioned), but inform your client this version is to be worked on. Work on your "real" version until it's really really done, and only then make other versions.
It's a different story (no pun intended) if the transition between the two versions can be automated; that way you'd still only work on the 'real' version, but then you could generate the other with every edit you make -- you should still not be doing any work in the dumbed-down version.
Maybe you are looking for
-
Time Machine won't back up to same volume
I recently partitioned my HD and added windows 7, and I also upgraded from Tiger to snow leopard. My last backup was before this, and since I've added all of this, Time Machine recognizes my time machine backups external but it doesn't backup to the
-
Problem with directory/file
I urgently need your help. I am working on Win2K. I try to create a directory, then insert a file into this directory, and write to this directory, such as the following: quote: File aDirectory = new File("Directory"); aDirectory.mkdir(); File aFileN
-
IPod and language characters.
Hello everyone, Does anyone know if there is a download of some kind that allows for the iPod to display Hebrew characters? If so, I would really appreciate it if someone directed me to that location. Thanks. Windows XP
-
Is there a way to turn on an iphone mdnsresponder?
Would like to the iPhone to respond to an addr PTR query.
-
App Store indicates new update but unable to install
I am running OS X 10.9.2. The App Store app insists I have a new update available - Facetime 1.0.4. However, when I click onthe Update button I receive the message - "We could not complete your update. FaceTime can't be installed on "MyDiskName" b