When the video ends go to label timeline

Hello world

I use this code to play a video when the user clicks on a button:

function clicked(event:MouseEvent):void {}

Video: video of var = new Video();

addChild (video);

var nc:NetConnection = new NetConnection();

NC. Connect (null);

var ns:NetStream = new NetStream (nc);

NS.client = {onMetaData:ns_onMetaData, onCuePoint:ns_onCuePoint};

video.attachNetStream (ns);

NS. Play ("Video.flv");

function ns_onMetaData(item:Object):void {}

trace ("Metadata");

Video.Width = item.width;

Video.Height = item.height;

Video.x = (stage.stageWidth - video.width) / 2;

Video.y = (stage.stageHeight - video.height) / 2;

}

}

When the video ends, I want to go in another part of the timeline. How can I do this?

I hope someone can help!

Thank you very much!

IIRC NetStream.Play.Stop is also triggered when playback is stopped during the buffering.

Tags: Adobe Animate

Similar Questions

  • How to stop a beep when the loop ends

    Hello

    I have a beep occurs inside a loop (which contains waves of data acquisition) to a certain threshold. I want the sound system for not introducing any delay in the execution of the loop.

    But I also have another beep when the loop ends. How to eliminate this noise?

    Your comments will be greatly appreciated. Thank you

    PI

    The obvious answer would be: remove the beep VI this is probably. Please show us your code.

  • The program monitor has yellow cast and red vertical lines when the video is paused

    The program monitor yellow cast and red vertical lines when the video is paused, I'm not reading. I'm not on external or monitor.

    Thank you!!!   works now! If all goes well there will be an update soon.

  • How can I choose the image that will appear as 'image of departure', the one that is displayed when the video has not yet been clicked.

    Hello, I would like to know How to Choose the video image which will be appear in the form " ", "boot image", that image that appears when the video has no was clicked yetThe image all can see before viewing the video.
    Thank you, Pedro Paulo

    You can change the image poster of clips in the icon view. By default, the first image of a clip appears in the thumbnail viewer and in other places in the Bill where the thumbnail is displayed. You can override the default thumbnail by designating any clip image as a poster frame.

    To set a poster frame for the icon, drag the playback slider or shuttle to the desired image and press the keys command + P (Mac OS) or SHIFT + p (Windows).

  • Difficulty in finding the way to determine when the video is finished

    Here's the url for this project:

    http://www.mespinach.com/picNpic/

    A video starts playing when project is loaded.  A button to stop the video, then up a little video on the first video.  During this second full video, I would like to delete and the first video is taken.  As it is written currently I use two to accomplish this task.  If someone could show me ho to the determin when the video is finished I will not need to use both.

    Here is my code:

    Import fl.controls.ComboBox;
    Fl.video import. *;
    flash.filters import. *;

    connection: NetConnection var = new NetConnection();
    var connection1:NetConnection = new NetConnection();
    var stream: NetStream;
    var stream1:NetStream;
    var md_obj:Object = new Object();
    var md_obj1:Object = new Object();

    var dsObject:DropShadowFilter = new DropShadowFilter();
    var bvlObject:BevelFilter = new BevelFilter();

    var vidContainer:MovieClip = new MovieClip();

    var vid:Video = new Video (320,240);
    var vid1:Video = new Video (200,150);

    var one_btn:One = new One();
    var two_btn:Two = new Two();
    var three_btn:Three = new Three();

    one_btn.addEventListener (MouseEvent.CLICK, onOne);
    two_btn.addEventListener (MouseEvent.CLICK, onTwo);
    three_btn.addEventListener (MouseEvent.CLICK, onThree);

    function onOne(e:MouseEvent):void {}
    VID1.x = vid.x + 100;
    VID1.y = vid.y + 100;
    1. Width = vid.width - 100;
    1. Height = vid.height - 100;
    vidContainer.addChild (1);
    Stream.pause ();
    STREAM1. Play ("BnBshortSnd.flv");
    STREAM1.addEventListener (Video.Complete, onComplete);
    }

    function onComplete (): void {}
    trace ("I'm here!");
    STREAM1. Close();
    vidContainer.removeChild (1);
    Stream.Resume ();
    }

    function onTwo(e:MouseEvent):void {}
    STREAM1. Close();
    vidContainer.removeChild (1);
    Stream.Resume ();
    }
    function onThree(e:MouseEvent):void {}
    }
    one_btn.x = stage.stageWidth *. 75;
    one_btn.y = 50;
    two_btn.x = stage.stageWidth *. 75;
    two_btn.y = 75;
    three_btn.x = stage.stageWidth *. 75;
    three_btn.y = 100;

    one_btn.filters = [dsObject, bvlObject];
    two_btn.filters = [dsObject, bvlObject];
    three_btn.filters = [dsObject, bvlObject];

    addChild (one_btn);
    addChild (two_btn);
    addChild (three_btn);

    Connection.Connect (null);
    Connection1.connect (null);
    Stream = new NetStream (connection);
    STREAM1 = new NetStream (connection1);
    vid.attachNetStream (stream);
    VID1.attachNetStream (STREAM1);

    md_obj1.onMetaData = metadata;
    md_obj.onMetaData = metadata;
    Stream.client = md_obj;
    STREAM1.client = md_obj1;

    stream.play ("http://jimslounge.com/publicDomain/plan9FromOuterSpace.flv" "");


    vidContainer.x = 25;
    vidContainer.y = 25;
    addChild (vidContainer);
    vidContainer.addChild (vid);

    function metaData(info:Object):void {}

    }

    Yes, I've tried and it doesn't work.

    However, you can use polling to check the current Netstream time against the amount of time you get in the metadata and dispatches an event when it is appropriate. Something like this:

    import flash.display.Sprite;
    import flash.net.NetConnection;
    to import flash.net.NetStream;
    import flash.events.NetStatusEvent;
    import flash.media.Video;
    import flash.utils.setTimeout;

    import flash.events. *;
    import flash.utils.Timer;

    var nc:NetConnection = new NetConnection();
    var ns:NetStream;
    var duration: number = 0;
    var vid:Video = new Video (300,300);
    var obj:Object = new Object();
    var videoURL:String = "test.flv;

    nc.objectEncoding = 0;
    nc.addEventListener (NetStatusEvent.NET_STATUS, onNCStatus);
    NC. Connect (null);
    addChild (vid);

    function onNCStatus(event:NetStatusEvent):void
    {
    Switch (event.info.code)
    {
    case "NetConnection.Connect.Success":
    NS = new NetStream (nc);
    NS. Play (videoURL);
    NS.client = this;
    startPoll();
    vid.attachNetStream (ns);
    break;
    }
    }

    Poll: var timer = null;
    function startPoll()
    {
    if(Poll==null) {survey = new Timer (500) ;}}
    poll.addEventListener (TimerEvent.TIMER, pollHandler);
    Poll.Start ();
    }
    function stopPoll()
    {
    if(Poll==null) {return ;}
    Poll.Stop ();
    }
    function pollHandler(event:TimerEvent)
    {
    trace (ns.time, "of"), duration;
    If (ns.time > = length)
    {
    stopPoll();
    dispatchEvent (new Event (Event.COMPLETE));
    }
    }

    function onMetaData(info:Object):void
    {
    trace ("metadata: duration =" + info.duration + "width =" + info.width + "height =" + info.height + "framerate =" + info.framerate);

    set the duration, so we can check the completion status
    Duration = info. Duration;
    }

  • Autohide the HTML5 player controls when the video is suspended as well.

    The HTML5 player controls will hide after a few seconds when a video begins to play, either click on a YouTube video link, or when the video is taken from the break. However, the controls will be visible as long as the video is paused. The controls are quite obstructive due to certain times when I need a break to see a certain thing in the video in a very short time-frame but got covered by the player controls and disappears when resume playback. So, how to make controls of the HTML5 to hide also automatically a few seconds after the video player is paused or instantly hides when the mouse is outside the area of the drive?

    Hi frfxuser, the embedded player works the way you describe, but YouTube uses scripts to customize the player controls, so you would need a specific YouTube 'hack' to hide the application.

    One possible approach would be to use a Bookmarklet, which is a snippet of JavaScript that you can save on your bookmarks bar or Bookmarks Menu for quick access. The script can assign controls ' view: no ', then when you click on the new button, remove this rule so they show once again and you can return to normal.

    If you want to try it:

    A time of installation:

    (A) select and copy the following script:

    javascript:var s=document.getElementById('stylehidecontrols'); if(s){s.remove();} else{s=document.createElement('style'); s.id='stylehidecontrols'; var r='#movie_player .ytp-gradient-top, #movie_player .ytp-chrome-top, #movie_player .ytp-progress-bar-container, #movie_player .ytp-chrome-controls{display:none !important}'; s.appendChild(document.createTextNode(r)); document.body.appendChild(s);} void 0;

    (B) right click a place on the bookmarks Menu or Bookmarks Toolbar where you want to save the script and choose new bookmark

    (C) in the location box, paste the script, and then in the name box, type something you remember as YT hide and click the Add button

    To use the bookmarklet:

    After clicking on pause, click on the bookmarklet to run the script on the page and hide the controls.

    You can return to the player by clicking on it, but if you want comprehensive controls, click on the bookmarklet button again to remove the hack of the page style.

  • Adobe Edge animate event handler when the video starts to play

    Now I use

    document.getElementById('myVideo2').addEventListener (myHandler, 'ended', false);

    If I want to add a new event after a video was played.

    How can I check when a video actually started playing and see you on the screen? I need this because I want to add some additional animations around the video that must be triggered exactly with the first images from the video.

    I found the solution:

    Video.onplaying = function() {}

    Console.log ("video is now loaded and play");

    }

  • How can I get the CTI line to stop moving when the movie ends?

    When I look at a film that I am editing, the current-time indicator moves beyond the last image which is the title of closing. Is there a way to stop the ICT line to the last image? Or should I just press the space bar to do?

    Tommyvincent

    Take a look at the gray tabs on the work area bar to make sure they cover all planned timeline content.

    Then look for scraps of ribbons or files to the right of the gray end tab of the workspace toolbar.

    Press the end key to see to try to locate the place which can be the cause of the problem.

    Please take a look at these aspects of your question. The answer should be there.

    If this isn't the case, we'll rethink the question with more details.

    Thank you.

    RTA

  • White screen when the video plays

    I use the first Elements 9 software.  When I add clips to the timeline and press play, the video does not play in the playback screen, instead I just get a white screen.  Once I hit the pause button, the image of the chassis on the playerhead is back on the screeen, but as soon as I hit the play button, the screen becomes white again.  I've updated my graphics card drivers and project settings are correct.  What is causeing the question?

    That's what I get when I hit the play button:

    screen.jpg

    Tim

    Yes, this driver (I plugged it in Win7-32 bit OS), is the last one (296.10 WHQL) shown on the nVidia website.

    I open the console from nVidia and see if there is a parameter, which may interfere with its performance. Look for things like 3D, stereo-Vision acceleration, etc.

    Good luck

    Hunt

  • How do I display the button when the film ends

    Hello!

    I made a short film in After Effects, and now I am trying to add a few buttons to it. The film starts with an intro and when a button 'continue' should appear, and will take you to the next part. My idea was to put a screenshot of the last image in the next keyframe with a stop() function after the intro, and add the button to that but it would be less work to bring up the end of the film by using the code that I have no idea on the button I would appreciate some advice.

    Insert a stop() in the last frame of your main timeline swf file and a continue button on stage in that last picture.

    PS you will need a coding for this button so it does something.

  • When the video is launched from sites online - it freezes

    What is the video cause sites to play online to freeze, when I don't have anything else running

    Hi Benjamin,

     
     
    1. do you use Internet Explorer to watch videos online?
    2. If so, what is the version of Internet Explorer installed on the computer?
    3 are you facing this problem in any particular Web site?
     
     
    I suggest you to follow the steps in the link and check if it helps.
     
    I hope this helps.
  • Computer hangs when the video display based on the web

    I use Windows Vista.   When I view the videos on the web, I sometimes my computer crash.  It happens intermittently, perhaps one out of every 10 times I discovered a video and occurs with IE8 and Firefox.  I reinstalled the Flash player as it seemed at the time when it crashes flash videos of base.   Just before the crash to computer, I get a bunch of lines on the screen.  Video files and DVD that is not based on the web seems to play fine

    Hello
     
    1. do you remember any change before the question?
    2. What if the problem occurs on a particular Web site?
     
    Follow the steps below and see if they help.
     
    Step 1:
     
    I suggest you to disable the auto restart in case of system error and try to take note of the error message and reply with the exact error message. Once we have the exact error message that we will be in a better position to determine the exact nature of the problem and fix it.
     
    Follow the steps below to disable automatic restart on system failure:
     
    a. Click Start.
    b. type system in the search box after clicking on start. Choose system from the list of results.
    Note: If you see the classic view of the Control Panel, you will not see this link. Just double-click on the system icon and go to step d.
    c. click on the system link.
    d. in the left pane, click Advanced system settings.
    e. Locate the startup and recovery area and click on the settings button.
    f. in the startup and recovery window, locate and uncheck the box next to automatically restart.
    g. click OK in the startup and recovery window.
    h. click OK in the System Properties window.
     
    You can now close the system window.
     
    Subsequently, when the computer is lorsque l' ordinateur s' arrete stop the computer restarts automatically and you will receive the error message, make a note of it and post back.
     
    You can also open the event viewer and check if there are other significant error messages/codes. See the link below for more details:
     
    What are the information contained in the logs of the event (Event Viewer)?
    http://Windows.Microsoft.com/en-us/Windows7/what-information-appears-in-event-logs-Event-Viewer
     
    Step 2:
     
    If you don't have to update your display drivers yet, I suggest you Update your display drivers and check if the crash stops.
    Step 3:
    I suggest you put your computer in a clean boot State, and check if the problem persists. I suspect that there could be involvement of third-party software.
    Note: Follow step 7 to your computer as usual.

    Aziz Nadeem - Microsoft Support

    [If this post was helpful, please click the button "Vote as helpful" (green triangle). If it can help solve your problem, click on the button 'Propose as answer' or 'mark as answer '. [By proposing / marking a post as answer or useful you help others find the answer more quickly.]

  • How to start a task when the other ends

    I want to run multiple scripts in the order (in Windows 7 Professional) and each have a tenure when the previous one ends. Is there a way to tell the Scheduler to do this? There are a variety of different types of (Korn Shell scripts running under Cygwin, R, BACK lot), and each of them produces results that are used in the following script. Different types of scripts, I don't think I can combine them into a single script.

    I do this every night, to develop a weather-based forecast for a hands-on experience. There are a lot of calculation and a time limited, and I do also simplified as possible, so I can't just schedule the scripts independently, separated far enough out so that they would never overlap. I couldn't get Cron to work in Cygwin, so I'm using the Windows Task Scheduler.  So far I can get all one script to run at any time I want, I just can't understand how to link the start one at the end of another.

    You can put several actions in any task to Task Scheduler.  You will use the trigger 'on an event"for what you need.

    The best advice on TS is Task Scheduler Overview - MSTechNet.

  • Earthquake when the video is played in Premiere Pro CS6

    Hello, everyone! I started using Adobe Premiere Pro CS6 a couple of weeks for a project. I, that I am not really known to work with this software, so you might find my question a bit silly. However, I do not know how to fix and I would be grateful if someone can help me.

    The problem: when I start to watch the video to see how good the video is, the screen as if shaking a little. What makes the whole video blur kind. It is almost imperceptible, but still I don't like. When I stop the video by pressing the space bar, the picture is clear. How can I make the entire played clear when video and eliminate this blurry mess.

    Thanks in advance for your help.

    Is your program monitor configured to display the resolution during playback quality?

    MtD

  • Audio excerpt not when the video is paused.

    Hello! First of all sorry for my English, I'll try to explain. I have a Mac and recently I installed first CC 2015.  I think that this problem occurs in this upgrade.  The thing is now, when I stop any video in any moment, and I pass the video with the right button or left of the keyboard I hear the audio of this framework. Before it worked, and it was perfect to synchronize audio and video with for example a snap or a Clap.  A I press any butto disable this or something? Can someone help me please? I can't continue to work if I can't synchronize audio and video!

    Thank you very much!

    Ivan

    Type SHIFT + S to turn on or off the audio cleanup.

    MtD

Maybe you are looking for