A Flash Developer Resource Site

Page 2 of 2 FirstFirst 12
Results 21 to 27 of 27

Thread: [RESOLVED] play video, stop video

  1. #21
    Member
    Join Date
    Sep 2009
    Posts
    32
    I was just about to post that. I did just that and it works now. Thank you so much for your help. My site will work much better now.

    THANK YOU.
    D

  2. #22
    Lunatic
    Join Date
    Nov 2002
    Location
    AS3 Forum
    Posts
    342
    No problem. You should mark the thread as resolved. (Top right above the first post in this thread, Thread Tools -> Mark Thread Resolved)

  3. #23
    Member
    Join Date
    Sep 2009
    Posts
    32
    one more thing I noticed. The audio plays for a brief moment after next video plays. Is there a way to resolve that?

    D

  4. #24
    Member
    Join Date
    Sep 2009
    Posts
    32
    How do I move to next frame after main.flv is finished? Code is on frame 3, want to gotoAndPlay(4).

    Here is my code:

    var vid:Video = new Video();
    vid.width=1024;
    vid.height=768;
    var nc:NetConnection = new NetConnection();
    nc.connect(null);
    var ns:NetStream = new NetStream(nc);
    var listener:Object = new Object();

    addChild(vid);
    vid.attachNetStream(ns);

    listener.onMetaData = function(evt:Object):void {};
    ns.client = listener;

    ns.play("main.flv");

  5. #25
    Lunatic
    Join Date
    Nov 2002
    Location
    AS3 Forum
    Posts
    342
    ns.addEventListener(NetStatusEvent.NET_STATUS, doNetStatus);

    private function doNetStatus(e:NetStatusEvent):void {
    switch (e.info.code)
    {

    case "NetStream.Play.Stop" :
    gotoAndPlay(4);
    break;

    }

    }

  6. #26
    Member
    Join Date
    Sep 2009
    Posts
    32
    I had to make the private function public (I removed the word private). Now it works. Thank you for all your help. It is greatly appreciated.

  7. #27
    Lunatic
    Join Date
    Nov 2002
    Location
    AS3 Forum
    Posts
    342
    Oops, forgot you're probably using the timeline, just remove the public word altogether, it doesn't apply here.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center