Skip to main content

flash question 66 Responses

Last post: 2 months ago | Thread started: Oct 3, 08, 4:17 a.m.

RespondNew TopicDisable Images

  • killrobbailey

    I am working on a little flash file and can not get this video to stop looping! I thought netStream.loop(false); would handle it but it does not. What am i doing wrong?
    Thanks for your help.

    var netConn:NetConnection = new NetConnection();
    netConn.connect(null);
    var netStream:NetStream = new NetStream(netConn);
    netStream.onStatus = function(infoObject) {
    if (infoObject.code == "NetStream.Play.Stop") {
    netStream.seek(0);
    netStream.play.stop();
    }
    };
    myVideo.attachVideo(netStream);
    netStream.setBufferTime(0);
    netStream.play("");

    Oct 3, 08, 4:17 a.m. – Permalink
  • hawkwah

    this guy'll sort you out: http://www.gotoandlearn.com/

    + add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earOct 3, 08, 4:28 a.m. – Permalink
  • thatblokemike

    if (infoObject.code == "NetStream.Play.Stop") {
    netStream.seek(0);
    netStream.play.stop();
    }

    that looks wrong.. netStream.play.stop(); ??

    doesn't that throw an error?.. your calling an method on a method. without looking at NetStream I doubt play is a property.

    also your seeking back to the start on a status update so effectively your telling it to loop. so maybe even overriding the loop false stuff.

    next note >add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earOct 3, 08, 4:44 a.m. – Permalink
  • killrobbailey

    I don't get an error. It just replays. Currently I have the FLV playing on one frame. Is there a way to tell it to move to the next frame upon completion of the video?

    next note >add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earOct 3, 08, 4:51 a.m. – Permalink
  • thatblokemike

    if (infoObject.code == "NetStream.Play.Stop") {
    gotoAndPlay(_currentframe+1);
    }

    • where would that fall in my code? or is my code just shit?
      killrobbailey
    + add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earOct 3, 08, 4:52 a.m. – Permalink
  • killrobbailey

    I got it working now. Thank you for the help.

    next note >add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earOct 3, 08, 5:25 a.m. – Permalink
  • powertoni

    just as a tip.....the fastest way you could have figured this out is to simply highlight "NetStream" then choose right click (ctrl if yr a mac) and choose help and it will take you exactly where you wanna go.....

    I think the built in documentation is a great way to learn....alot of the time they have examples that might be similar to what you are trying to do...

    + add note

    You must be logged in to add a note. Login now or register for an account.

    Cancel
    Dog-earOct 3, 08, 8:56 a.m. – Permalink

Login or Register to respond to this

Skip to main content