Detect the end of flvplayback

i have an flvplayback component on stage, named the instance flvPlayer and added this code to frame 1, so a video loads in it.
flvPlayer.source = "clip1.flv";
the videos plays from the local folder perfectly.
I need a code that when the video ends, it jumps and stop to frame 1 of scene2.
something like:
scene 1, Frame 1:
stop();
flvPlayer.source = "clip1.flv";
// code for detecting the end of the video and jumping
when flvPlayer completed
    MovieClip(this.root).gotoAndStop(1, "Scene 2");

i have "Scene 1" and "Scene 2".
i have the flvPlayback component on the stage of scene 1. i chose flvPlayer for the instance name.
and added this code to frame 1 of scene 1:
stop();
flvPlayer.source = "clip1.flv";
flvPlayer.addEventListener(VideoEvent.COMPLETE, completeHandler);
function completeHandler(event:VideoEvent):void
    MovieClip(this.root).gotoAndStop(1, "Scene 2");
and i have scene 2 with a stop action on it's 1st frame.
when i try to test the file, i get this error message in compile error section:

Similar Messages

  • Is there a way to detect the end of a video?

    Is there a way to detect the end of a video.. .mp4 or youtube? I want to be able to detect the end of a video and then have it do something...ie play on timeline or go to and play symbol.

    For youtube the code would be something like this:
    view-source:calkaweb.herobo.com/video.html
    for HTML5 videos for youtube replace &version=3 with &html5=1 in the youtube URL
    I have no idea how to impletent the youtube code into Edge tho other than an iframe but that wouldn't work I've tried :
    http://forums.adobe.com/thread/1285212
    You would need to place all of the youtube codes into edge in order for it to work but I duno how to do that and no1 answered the question in the thread I made about it.
    as for MP4/HTML5 video you can use
    var video = document.getElementsByTagName('video')[0];
        video.onended = function(e) {
          /*Do Something*/

  • How to detect the end of a loaded swf file

    Hello Guys
    This is my first time on this forum, come here with a great
    hope
    I have loaded a picture file (jpeg) and a video file (swf)
    into the main flash file using xml
    on frame 3, I load the picture and on frame 7, I load the
    video, there is a stop action on frame 6
    Now when the flash is executed the picture is displayed ( it
    says "Click here to view the video")
    when the user click the picture , the video is loaded and
    starts to play ---- so far everything is working fine
    now what I want to do is, once the video finishes playing (
    not stoped) I want to display the picture again
    can you tell me how to detect the end of an external loaded
    swf files,
    Please help me
    Thanking You
    Shriram

  • How to detect the end of an external swf loaded into a container

    Hi,
    I'm having trouble finding a solution for this problem, can somebody help me?
    I have a main swf that will load external swfs into a container. I need to detect the end of the loaded external swf in order to start to load and play a new one into the same container.
    The problem is that i do not know what the length of the external swfs will be, and will have no control over the development of them, so i cannot place a variable at the end of their animation which would allow me to detect from the main movie its end.
    I also cannot rely on the _totalFrames property because the loaded swf might not have all the animation inside its main timeline.
    Is there any way to achieve this goal?
    Thx

    Ok... Its as i thought... unfortunatly...
    Gonna mark your latest post again as possible solution, just in case someone comes with any sort of out of the box thing...
    Thx for your help Kglad

  • How to detect the end of a movie clip:  what eventListener to use?

    I'm doing a rather fancy button with up,down,rollover,rollout,and static states, something the standard flash button structure isn't capable of as far as I can tell, and believe me, I've tried it.
    Here's the setup:  My main timeline has a series of frames with stop(): scripts, and each frame has a movie clip representing what should happen during that state:  still, rollover, rollout, mousedown, mouseup
    I can't get the mouseup event  to work.
    Here's what I've tried so far that doesn't work:
    1. in the imbedded movieclip, no script at the end.  Result: This just loops the embedded clip.
    2. in the imbedded movieciip, put gotoAndPlay("NextFrame"), where "NextFrame" is the label in the root movie where I want to go. result: loops clip
    3. in the imbedded movieciip, put root.gotoAndPlay("NextFrame"), where "NextFrame" is the label in the root movie where I want to go. result: error
    I think what I need to do is write an eventListener for the root actionscript, but I don't know what event to listen for. 
    What event is thrown when a movieclip finishes playing?
    :<)McFrisco

    You have to create your own mechanism(s) for detecting the end of a movieclip being reached.  You can either build code into the end of the clip itself, possibly dispatching an event that is being listened for by a containing timeline, or you could continuously monitor the currentFrame of the clip to see if it equals the totalFrames value.

  • Detecting the end of an flv in ac 2

    I have a custom player i built. How do i detect the end of
    the flv so i can prompt an action, like go to another frame for
    instance or loop or call another flv. Have been struggling to find
    a solution online and keep hitting dead ends..
    Thanks in advance if someone can help... need this in
    actionscript 2

    unsure...
    I was just using keyframes on a timeline to play different
    flvplayers, brought in through import. I have used netstream
    successfully but i lose the player controls...

  • Detecting the end of an appendBytes NetStream

    Normally to detect the end of a NetStream, you can add a listener like this:
    myNetStream.addEventListener(NetStatusEvent.NET_STATUS, statusHandler);
    and check for NetStatusEvents. If you're using appendBytes on your NetStream, it seems you don't get any useful NetStatusEvents aside from NetStream.Buffer.Full at the very beginning. Is there a way to know when the stream ends then? If you wanted to make something happen when it was over, would you just have to do it based on the duration of the stream?

    unsure...
    I was just using keyframes on a timeline to play different
    flvplayers, brought in through import. I have used netstream
    successfully but i lose the player controls...

  • Detecting the end of a movie clip

    Hi,
    Objective: Display a book that the user can turn the pages to
    view more text. I used a tutorial from the web to create the
    turning page.
    Process: On layer 1, frame 1 of the main time line, I put an
    image of a book. On layer 2, frame 1 and also frame 2 of the main
    time line, I put text for the book. I then created a movie clip
    (MC) called PageTurnMC that looks like a page in the book is being
    turned. On layer 3 of the main time line, I put an instance of the
    MC and called it PageTurn. On layer 4 of the main time line, I put
    a button to play the MC and advance to frame 2 called drawer1cont
    (see code).
    //code on the button used to turn the book's page
    on (release) {
    PageTurn.play(); //plays my PageTurnMC
    gotoAndStop("drawer1cont"); //advance to the next frame of
    text
    Problem: I need to detect when the end of the MC before I
    advance to the next frame. I have to use the PageTurnMC many times,
    so it is not possible for me to put the action in the last frame of
    MC. As of right now, my frame 2 text appears as the PageTurnMC
    plays which is not what I want.
    Thanks for any help.

    I just tested it and got my quick example to work. Here are a
    couple of possible areas to double check:
    In the last frame of PageTurnMC, gotoAndStop must reference
    the main movie clip, e.g. _root.gotoAndStop().
    Also, make sure the parameter _root.frameID isn't in quotes
    because it is a variable, not the actual string.
    As I said, I'm not a Flash expert nor do I know the setup of
    your movie, but this should work as long as you have all of your
    references correct. If you can't get it to work, try to trace
    necessary variables to make sure you are accessing the appropriate
    variable.
    The suggestion by nilu_only will also work, but it will waste
    some cycles because you will have to wait for the movie clip to
    end. Here is what I mean:
    Immediately after playing PageTurn, accessing
    PageTurn._currentFrame will return the currentFrame only once. So
    if PageTurn isn't on its lastFrame, your condition statement
    (PageTurn_currentframe == PageTurn._totalframe) will fail and
    gotoAndStop will never be called.
    Instead, you would need to wait for some time and continually
    check the _currentFrame until the condition statement is true, e.g:
    on (release) {
    PageTurn.play();
    while (PageTurn_currentframe != PageTurn._totalframe) {}
    //wait until reaches the last frame
    gotoAndStop ("drawer1cont")
    This approach is likely to be suboptimal since you are
    wasting cycles checking the current frame instead of just having
    the movie let you know when it has reached the last frame.
    Depending on how Flash handles that while statement, you could have
    serious slowdown from that while statement. And since Flash doesn't
    have a sleep() function, you would have to do some sort of
    setTimeout() to slow down those checks. Either way, I would venture
    to say this approach is better off avoided.

  • Help, How to detect the end of sentence in a plain text

    Hi, Everyboday
    I really don't know how to use ArrayList and endsWith to realize detecting the following question. Could you give me some help? Thank you!
    1. find the end of the sentence. that means that we print it out if you meet "!" or "." .....
    2. calculating the frequency of the key word in the whole text. maybe using IDF..
    import java.io.*;
    class SearchEnd{
         public static void main (String[] args){
              try{
                   File myFile = new File("Test.txt");
                   FileReader fileReader = new FileReader(myFile);
                   BufferedReader reader = new BufferedReader(fileReader);
                   String line = null;
                   while ((line = reader.readLine()) != null){
                        System.out.println(line);
                   reader.close();
                   }catch (FileNotFoundException exception){
                   System.err.println("File not found");
                   }catch(IOException exception){
                   System.err.println("IO Error");
    }

    Checkout this thread about how to use these forums effectively. Particularly with College home type questions, expected to be taught how to find the answer rather than be given it outright.
    http://forum.java.sun.com/thread.jsp?forum=54&thread=190747
    -- Question ---
    There are lots of ways to do this, check out the API documentation http://java.sun.com/j2se/1.4.2/docs/api/
    Your sample shows you can iterate the string so checkout these three classes.
    http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html
    http://java.sun.com/j2se/1.4.2/docs/api/java/lang/StringBuffer.html
    http://java.sun.com/j2se/1.4.2/docs/api/java/util/StringTokenizer.html

  • Detecting the end of a session

    Hi,
    Is there any way of detecting when a session ends? I'm wanting to carry out an action when the browser gets closed.
    Thanks!

    You probably have some User object that you store in the session. What you can do is you can implement the HttpSessionBindingListener interface on this object. The valueUnbound() method of that interface will be called when the session is dropped.
    http://java.sun.com/javaee/5/docs/api/javax/servlet/http/HttpSessionBindingListener.html
    Note that a session does not end directly when the browser is closed, the session has to time out first on the server side.

  • Finding the end of a document using Scanner

    I'm reading a file line by line, but cannot figure out how to read the end of a document without finding the number of lines in the document myself. When I have all of the lines printed out, I get an error at the end saying that no line could be found, which makes sense, since it's the end of the document. But how can I detect the end without getting an error?
    Exception in thread "main" java.util.NoSuchElementException: No line found
         at java.util.Scanner.nextLine(Unknown Source)
         at GustavData.main(GustavData.java:29)

    Note: This thread was originally posted in the [Java Programming|http://forums.sun.com/forum.jspa?forumID=31] forum, but moved to this forum for closer topic alignment.

  • Detect mp4 end

    I'm working with adaptive layouts and I have them working.  However, I have an intro video that starts up at the beginning of each layout and I don't want it to repeat each time its resized.  I have a few questions:
    1.)  How do I detect the end of the mp4?  Here is the code that I'm using:
    sym.$("mon900").append(mon);
    mon.attr('autoplay','autoplay');
    mon.attr('preload','auto');
    2.) Can I add preloaders to the mp4's?  They seem to take awhile to load.
    3.) On a different topic, I'm attempting to get my Adobe Edge composition to be centered in the middle of the browser.  I'm currently using this code in completionReady on my stage:
    $("#Stage").css("margin","auto")
    This doesn't seem to work.  Do I need to center the adaptiveContainer?
    Thanks!

    Usually you'd put the ended variable where ever you've placed the video variable (var vid), i.e. where you've instructed the video to appear:
    //video var
    var vid = $("<video width='854' height='480' controls='controls'>" +
       "<source src='video/F2R.mp4' type='video/mp4' />" +
       "<source src='video/F2R.ogv' type='video/ogg' />" +
       "This browser is not compatible with HTML 5" +
    "</video>");
    // get the div called 'vcontainer' and attach the video;
    sym.$("vcontainer").append(vid);
    // additional options for the video object
    vid.attr('autoplay','autoplay');
    vid.attr('preload','auto');
    //function when video ends
    $(vid).bind("ended", function () {
         //function you want
        sym.$("RearImage").show();
    This be on Creation complete or on a click function, have a go and see what happens.

  • Screen Saver when calling and need to use the Keypad, the screen saver doesn't detect the phone has left the ear and blanks out the screen.  Even ending a call is difficult as the screen blanks out within seconds

    I have to use the Keypad a lot when making calls.  Make the call, the Robot then asks to enter a number for a service, pull the phone down from the ear, the screen may light up for a second, but then the screen saver cuts in, blanking the screen out.  Sometimes you hit the Home Key to awaken the sccreen, enter your number and then back to the ear to hear the next set of instructions.  Back and forth just trying to enter the options is a pain.  Sometimes even trying to end the call, the screen blanks out and you fight to try and end a call.
    If I use the Speaker function the keypad works; the speakler phone is not alway appropriate. 
    It appears that the phone gyro, doesn't detect the phone has moved from the ear to the viewing angle.  This wasn't an issue until recently and I can't remeber if it's the iPhone 5 or one of the updates.  It definitly wasn't there earlier on, as I threw away an Windows 6.5 phone for the same problem. 
    I'm not sure if it's a hardware or software (design) issue.

    It is not the gyro. This has everything to do with the iPhone's prioximity sensor.
    Are you using a case that may be blocking or partially blocking the proximity sensor? If you are using the case, remove the case prior to the next call to see if the same occurs without the case.

  • Error while creating request list Unable to detect the SAP system directory

    We are upgrading SAP BW (NW 7.0 EHP1) to SAP BW (NW 7.3)
    source OS: Windows 2008 R2,  source DB: MSSQL server 2008 R2 SP1 CU3
    I had started the upgrade by running: STARTUP.BAT
    I had started the DSUGui on the server (CI / DB on the same server) from: D:\usr\sap\BP1\upg\sdt\exe\DSUGui.bat
    I ran both programs (run as administrators).
    Once SAP Gui connects and was able to create userid/ password and when ready to start the initialization phase (click next)
    gives me the error
    Error while creating request list - see preceeding messages. Unable to detect the SAP system directory on the local host
    I had tried STARTUP.BAT "jce_policy_zip=Z:\export-import\downloads\jce_policy-6'  and still the same error.
    I had started DSUGui.bat with trace and the trace file contents are
    <!LOGHEADER[START]/>
    <!HELP[Manual modification of the header may cause parsing problem!]/>
    <!LOGGINGVERSION[2.0.7.1006]/>
    <!NAME[D:
    usr
    sap
    bp1
    upg
    sdt
    trc
    server.trc]/>
    <!PATTERN[server.trc]/>
    <!FORMATTER[com.sap.tc.logging.TraceFormatter(%d [%s]: %-100l [%t]: %m)]/>
    <!ENCODING[UTF8]/>
    <!LOGHEADER[END]/>
    Jan 11, 2012 10:14:58 AM [Error]:                          com.sap.sdt.engine.core.communication.AbstractCmd.log(AbstractCmd.java:102) [Thread[ExecuteWorker,5,main]]: Execution of command com.sap.sdt.engine.core.communication.CmdActionEvent@376433e4 failed: while trying to invoke the method java.io.File.getAbsolutePath() of an object returned from com.sap.sdt.dsu.service.req.DSURequestListBuilder.getSystemDir()
    Jan 11, 2012 10:14:58 AM [Error]:                          com.sap.sdt.engine.core.communication.AbstractCmd.log(AbstractCmd.java:103) [Thread[ExecuteWorker,5,main]]: java.lang.NullPointerException: while trying to invoke the method java.io.File.getAbsolutePath() of an object returned from com.sap.sdt.dsu.service.req.DSURequestListBuilder.getSystemDir()
    Jan 11, 2012 10:14:58 AM [Error]:                          com.sap.sdt.engine.core.communication.AbstractCmd.log(AbstractCmd.java:103) [Thread[ExecuteWorker,5,main]]: java.lang.NullPointerException: while trying to invoke the method java.io.File.getAbsolutePath() of an object returned from com.sap.sdt.dsu.service.req.DSURequestListBuilder.getSystemDir()
    Jan 11, 2012 10:14:58 AM [Error]:                                                 com.sap.sdt.engine.core.communication.CmdActionEvent [Thread[ExecuteWorker,5,main]]: java.lang.NullPointerException: while trying to invoke the method java.io.File.getAbsolutePath() of an object returned from com.sap.sdt.dsu.service.req.DSURequestListBuilder.getSystemDir()
         at com.sap.sdt.dsu.service.req.DSURequestListBuilder.persistSystemInfo(DSURequestListBuilder.java:277)
         at com.sap.sdt.dsu.service.DSUService.createRequestList(DSUService.java:338)
         at com.sap.sdt.dsu.service.controls.DSUListener.actionNext(DSUListener.java:144)
         at com.sap.sdt.dsu.service.controls.DSUListener.actionPerformed(DSUListener.java:67)
         at com.sap.sdt.server.core.controls.SDTActionListener$Listener.actionPerformed(SDTActionListener.java:46)
         at com.sap.sdt.engine.core.communication.CmdActionEvent.actOnEvent(CmdActionEvent.java:43)
         at com.sap.sdt.engine.core.communication.CmdEvent.execute(CmdEvent.java:69)
         at com.sap.sdt.engine.core.communication.ExecWorker.handleCmd(ExecWorker.java:36)
         at com.sap.sdt.engine.core.communication.AbstractWorker.run(AbstractWorker.java:93)
    I could not get Upgrade started.  Any help is appreciated
    Thanks
    Prathap

    Did you get this solved?
    I have the same problem

  • How can I make a top layer "transparent" to the end-user?

    Hi guys,
    Got a quick question.
    I'm working on a custom card builder and was wondering if there was any way I could keep an uploaded image editable to the end user. The end-user will be able to choose what template they'd like to frame the image with. The problem is, even with transparency that chosen frame acts as a layer, and once the uploaded image has been placed onto the staging area, the end-user loosing the ability to edit/scale/skew that image. I'd like them to be able to still do that even with the template above their image.
    Can anybody think of a solution to this? Any and all advice is greatly appreciated.

    You'd literally need to chop each frame up. To keep things reasonable to update you can use Photoshop to slice the graphics, saving them to external PNGs to import in. If a frame has 4 edges, you cut out the 4 sides, import into Flash and reassemble them inside a single Sprite or MovieClip. Any area inside that sprite that has no actual objects will be true transparency and won't invoke a click action.
    Keep in mind, hitboxes are rectangular. If you have an oval frame where the edges require you to create bitmaps with transparency on their edges, that will be clickable. If you don't immediately understand what I mean by that just draw a circle in flash, convert to clip. Now draw your cursor around what you consider the 'top' portion of that frame and notice how much of the inner fill you also capture at the same time. That will all be clickable. So the user may "see" their picture behind the frame but when they click they accidentally get the frame instead.
    Picture worth a thousand words (random net image):
    If you cut this oval frame into 4 pieces (this being the top obviously), the transparent area you see in the frame will need to be part of the hitarea for the frame. That can be just as confusing to customers in this situation. If most of your frames have little to no transparency (very squared up) then it won't be a problem. Although just like the problem you're having now, any bitmap transparency WILL be clickable even if you cut the sides up. The center where there is no bitmap can be clicked through to mess with the picture behind the frame.
    This sort of makes the transparency detection a bit more desirable.

Maybe you are looking for