NetStream Class Stop Action

Problem: When using multiple instances of a FLV player in a
FLA AS3 and when one navigates to another frame the video still
plays from the earlier frames as one can still hear it...
I tried to implement loading a "phantom-light" FLV on the
frame change to stop the video playing but I was not successful,
note the code at the bottom...
What can be done?

I realize you fixed your problem but it sounds like your
problem was not
just that the video continued to play but that it persisted
and you wanted
all vestiges to be gone. For future reference, I had the same
problem. I
used the removeChild () call and it fixed my problem. But
that's not saying
much because I still don't understand the code I've grabbed
from the
internet to play video on my website. In Lingo it was just
referring to a
sprite and issuing a play () command. It's much more
complicated in Flash
but I'm slowly learning.
Craig
"Matt Abron Abron" <[email protected]> wrote
in message
news:[email protected]...
> Problem: When using multiple instances of a FLV player
in a FLA AS3 and
> when
> one navigates to another frame the video still plays
from the earlier
> frames as
> one can still hear it...
>
> I tried to implement loading a "phantom-light" FLV on
the frame change to
> stop
> the video playing but I was not successful, note the
code at the bottom...
>
> What can be done?
>
> function playMyFlv(){
> _stream.close();
> if(autoStart == "true" || is_single_file == false)
> {
> //player_paused = false;
> toolbar.btn_play.dispatchEvent(new Event("mouseDown"));
> } else {
> autoStart = "true";
> if(is_single_file == true){
> getSingleImage();
> big_play_btn.x = bg.width/2 - big_play_btn.width/2;
> big_play_btn.y = bg.height/2 - big_play_btn.height/2;
> big_play_btn.visible = true;
> }
> }
> first_run=false;
> toolbar.checkPlayButton();
> }
>
> function onMetaData(data:Object){
> first_run=false;
>
if(contains(single_image_holder))removeChild(single_image_holder);
> _timer.start();
> _duration = data.duration;
> _stream.soundTransform = toolbar.videoVolume;
> toolbar.btn_volume.getVolume();
> //resizeVideo();
> }
>
> function onNetStatus(e:NetStatusEvent){
> //trace(e.info.code);
> //this resets the player on movie end
> if(e.info.code == "NetStream.Play.Stop"){
> toolbar.resetMovie(new Event("e"));
> first_run=true;
> toolbar.alpha = 1;
> }
> if(e.info.code == "NetStream.Play.Start"){
> _video.attachNetStream(_stream);
> show_buffer = true;
> }
>
> if(e.info.code == "NetStream.Buffer.Empty"){
> show_buffer = true;
> }
> if(e.info.code == "NetStream.Buffer.Full"){
> show_buffer = false;
> }
>
> console.appendText(e.info.code);
> resizeVideo();
> }
>
>
> //*************************This is the Kill Video Test
Code
> HERE********************
>
> /*function killdownload(){
> _video.attachVideo(null);
> playMyFlv.pause();
> playMyFlv.play("nonexist.flv");
> }
>
> playMyFlv.onStatus = function (info) {
> for (var r in info) {
> trace ((r + " = ") + info[r]);
> trace(my_video._height);
> trace(my_video.height);
> trace("-----------");
> }
> if(info.code == "NetStream.Play.Start"){
> }
> if(info.code == "NetStream.Play.Stop"){
> stopping = true;
> //trace("stopping");
> }
> if(info.code == "NetStream.Buffer.Empty" &&
stopping){
> //trace("stopped");
> }
> if(info.code == "NetStream.Buffer.Full"){
> if(preview){
> killdownload();
> }
> }
> };
> */
>

Similar Messages

  • NetStream.Play.Stop : Problem:

    Hi,
    I have develop video streaming application with  Flash Media server 3.5 + and Use Dynamic stream feature , this player work correct in all way but issue with NetStream.Play.Stop() command set while playing video without EOF
    i.e video file .f4v format has 30 sec lenght ,
    -player face NetStream.play.stop() command @ 2.30 without indicate any stop command ,its automatically halt but last 0.30 is remaning.
    Any idea regarding this dobet please help me ..
    Thanks ,
    a

    Question 1: When I put the .FLV files to play in the
    "\streams\_definst_" of
    the application directory of the Flash Media Server
    installation, does that
    automatically turn it into streaming FLV and no longer
    progressive FLV?
    The distinction between progressive and streaming is the
    NetConnection.connect
    Question 2: What's the best way to detect or to signal my app
    that the
    streaming FLV has completed playing?
    Not sure what the best way is. But I subclass the NetStream
    class similarily
    to how it is presented in the Flash Communications Server
    book example 5-5.
    http://www.flash-communications.net/sourceCode/index.html
    It uses a combination of NetStream.Play.Stop and bufferLength
    == 0 as one
    signal to toggle a stopped state flag and
    NetStream.Buffer.Empty and that
    stopped flag as another signal. The stopped flag is turned
    off on the next
    NetStream.Play.Start.
    Lon Hosford
    www.lonhosford.com
    May many happy bits flow your way!
    "naz404" <[email protected]> wrote in
    message
    news:e3ffu4$a6c$[email protected]..
    Hi. I built a dynamic FLV player using XML playlists but
    using progressive
    downloads.
    I've been trying to migrate it to a Flash Media Server 2.01
    solution, but
    after I did,
    "NetStream.Play.Stop" no longer seems to be happening
    properly.
    Question 1: When I put the .FLV files to play in the
    "\streams\_definst_"
    of
    the application directory of the Flash Media Server
    installation, does that
    automatically turn it into streaming FLV and no longer
    progressive FLV?
    Question 2: What's the best way to detect or to signal my
    app that the
    streaming FLV has completed playing?
    Also, "NetStream.Play.Complete" never seems to occur, even
    if the stream
    has
    completed playing.
    Thanks!

  • Stop action doesn't work

    I have a simple website with five pages set up. There is no
    code other than the code on the first frame, plus a stop action on
    each section. The first thing in the code is the stop action, but
    it still keeps running through all the frames when I test it, and a
    movie clip set up in a similar way does the same thing. What could
    be causing this? I tried taking all the code out of frame 1 except
    the stop action but it didn't make any difference. I am starting to
    work with actionscript 3.
    thanks

    yes i think you problem is the publish setting ... you are
    still set to publish as2... change it as3 .....
    and this code is even cleaner that the prev it work well too
    stop();
    var btnArray:Array = [HOME,GROUP,REVIEWS,CLIENTLIST,LISTEN];
    function moveTo(e:MouseEvent) {
    var page:String = e.target.name;
    gotoAndStop(page);
    for (var i:Number = 0; i< btnArray.length; i++) {
    btnArray
    .addEventListener(MouseEvent.CLICK, moveTo);

  • Stop(); Action doesn't work in AS3?

    I'm a designer and usually work in AS2.
    But I created a movie in as3 (to use the Bones function), and now my stop actions are not working.
    What I usually do for my movies is break the movie down in parts on the Main timeline (Start/Content/End), place stops on each of these frames.
    And within the Movieclips that play on these labels I put a call:
    stop();
    _root.gotoAndPlay("Content") etc...
    Anyways any fixes for this in AS3?
    I'm using CS4 if that matters.

    The stop() command works as well in AS3 as it does in AS1/2.  What doesn't work is using AS2 terms like "_root".  In general, if a stop() command is not working it is because some other code is failing or otherwise overriding the stop().

  • NetStream.Play.Stop and Complete fired early on RTMPE streams

    Hi there
    I am experiencing an issue with playback on RTMPE streams. after investigation it seems that the FMS server is firing the NetStream.Play.Complete message at random points, indicating that a stream has ended. This is happening and random points during the stream,  not even close to the end.
    The order of Status messages is as follows:
    Thu Oct 20 2011 04:15:17 PM :: NetStream.Play.Start : status
    Thu Oct 20 2011 04:32:40 PM :: NetStream.Play.Stop : status
    Thu Oct 20 2011 04:32:40 PM :: NetStream.Buffer.Flush : status
    Thu Oct 20 2011 04:32:58 PM :: NetStream.Buffer.Empty : status
    Thu Oct 20 2011 04:32:58 PM :: onPlayStatus : NetStream.Play.Complete
    As you can see roughly 17mins into playback...although the stream is 1 hour 24mins long
    I have tested this numerous times, and each time it is at a different point in the stream.
    Intermittently the NetStream.Play.InsufficientBW warning is being fired prior to NetStream.Play.Stop.
    I am using a player built on OSMF 1.5.
    Just need to know why these messages would be fired and how to handle them
    Thanks
    Steve

    Hi Steve,
    Thanks for the information. Did you check with flvcheck tool to see if the file is a valid FMS file ? If not, can you do that please ?

  • How to use classes in Actions tab

    Hello guys!
    I'm just a beginner so i'm sorry for my stupid question.I'm developing a game in which movie clips in our case people have their own schedule.I have multiple screens and so i want to be able to set their locations and make them invisible on other screens(rooms)they're not currently at.The trouble is i can't use variables from Actions in my class,neither can i use classes in my Actions.Can anyone tell me how to export classes into Actions code?
    Here is my code:
    var currentlocation;
    var currentscreen;
    if (person.currentlocation!==currentscreen){
    person.visible=false;
    btn.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler);
    function fl_MouseClickHandler(event:MouseEvent):void
              currentscreen = "classroom";
              classroom.visible = true;
              playroom.visible = false;
    btn_2.addEventListener(MouseEvent.CLICK, fl_MouseClickHandler_2);
    function fl_MouseClickHandler_2(event:MouseEvent):void
              currentroom = "playroom";
              classroom.visible = false;
              playroom.visible = true;

    Your problem/question is not clear to me.  If you are getting errors you should include the error messages in your posting.
    Could the problem arise from using a variable that is not defined?
    currentroom = "playroom";
    I do not see currentroom defined as a variable anywhere.  There is a currentscene variable though.

  • NetStream with OSMF is firing NetStream.Play.Stopped too early.

    Hi,
    I've been digging into a bug report where the ends of adverts are clipped by up to three seconds in Android and, after a _lot_ of painful debugging, I have come to the conclusion that the issue is with the underlying NetStream object.
    After a bit of jiggery pokery to locate the NetStream on NetStreamLoadTrait, I was able to listen to the changes to NetStream.time and to compare against the TimeTrait values, also to see what events were happening where and when. After placing this code on an Event.ENTER_FRAME handler, I was able to see clearly that there is _ALMOST_ALWAYS_ a huge jump in the last two frames... This equates to clipping off the last few seconds of the video as the jump tends to occur a couple of seconds prior to the end. Having placed break-points in OSMF code, it appears that the end is "correct" in that it is always in response to a NetStream.Play.Stopped... just that the NetStream.Play.Stopped is firing at the wrong time.
    Does anyone have _any_ idea what could be causing this? Is it likely to be with the media being supplied (third-party advertsing video...) or the plugin itself?
    Thanks,
    G

    I have created a bug report here: https://bugbase.adobe.com/index.cfm?event=bug&id=3504086
    Please take a look, use my supplied test script, and vote for the issue if you can reproduce it.
    G

  • VMM 2012: How to Configure Automatic Start and Stop Actions for a Virtual Machine?

    Does somebody know how to confgure Automatic Start and Stop Actions for a Virtual Machine in VMM 2012?
    I miss that option.

    Automatic Start or Automatic Restart actions are available for virtual machines running on a Hyper-V cluster from within Virtual Machine Manager.
    From within Virtual Machine Manager, bring up the Virtual Machine's properties:
    Click "Hardware Configuration"
    Click "Availability"
    Click "High", "Medium", or "Low" to enable automatic start/restart or
    Click "Do not restart automatically" to disable automatic start/restart
    Screenshot from VMM 2012 for a VM running in a Server 2012 R2 Hyper-V cluster:
    VMs running on a cluster have to be marked "Highly Available" and logically, Microsoft assumes that you'll want these VMs to be running all the time when this setting is selected.  If the cluster fails or needs to be restarted, you can set the priority
    by which a VM restarts, or you can set the VM to not restart at all when cluster services are restored by using the settings above.

  • Export to Swf (how do I insert a stop action in IND)?

    So I've exported the swf's. But when they come up (in a pop-up window) on my site, all I see is a grey screen. I right click and and unclick "play" and then they appear.
    I assumed, from reading other posts people have posted that I needed to insert a stop action. Can anyone tell me if this is possible to do in IND CS4?
    I don't have CS4-Flash, I have CS3_Flash. I do have CS4 IND, so if I could insert a stop action here I would do so. Anyone know how to go about doing so? And will this fix my problem?
    Thanks a ton people!
    Matt

    I wanted to use a special character in an email; I used to do it but had forgotten how.  I figured it out:
    Place the cursor where you want to special character to be.
    Open the special characters page and drag the symbol to where you want it to appear.  Then double click on the symbol, and voilé the character appears.  At that point you can print as many special characters as you want without dragging them first, just double click on them.

  • Stop action, stop looping

    I'm new to Flash and I created my first flash doc. today.
    [Here
    is my movie. Can anyone tell me how to stop the movie from looping.
    I tried putting a stop() action but it stoped the whole movie from
    playing. Please Help

    "ShesAuthentic" <[email protected]> wrote in
    message news:e9gtlt$3i8$[email protected]..
    > I'm new to Flash and I created my first flash doc.
    today.
    > ]http://www.freewebs.com/denishalynn/jessika.html is my
    movie. Can anyone tell
    > me how to stop the movie from looping. I tried putting a
    stop() action but it
    > stoped the whole movie from playing. Please Help
    You must make a keyframe at the last frame of your movie and
    put the stop() command there. If you just go to the last frame and
    type stop(); without making a keyframe there it will actually
    put the stop command on the first frame, not the last frame. Look
    to
    see what frame the little 'a' symbol is located.
    tralfaz

  • Flash CS5 Won't Stop Looping, Even with Stop Action in Place

    The timeline has a stop action at the end of the movie (frame 770), but continues to loop. Publish Settings HTML tab has "loop" unchecked as well.
    The movie has a lightning storm that plays throughout the entire timeline that was purchased from iStockPhoto. Perhaps some of their coding is conflicting (see below coding). Other than those two codes for the storm, the only other code in the Action script is a stop action at the end of the movie. Hope someone can help me out. Thanks!
    ACTION: LAYER FRAME 1
    setProperty("", _x, random(420));
    if (random(2) == 0)
        setProperty("", _xscale, -100);
    else
        setProperty("", _xscale, 100);
    } // end else if
    ACTION: LAYER FRAME 13
    if (random(50) != 0)
        gotoAndPlay(12);
    } // end if
    ACTIONS FRAME 770
    stop();

    Hi, I noticed your thread. Did you know you are on the Flash Player Forum that is for the browser plugins?
    I'm not even sure which Adobe Forum would be the best but you can choose from here:
    http://forums.adobe.com/index.jspa
    Thanks,
    eidnolb

  • Movie Clips as buttons – ignoring my stop actions and event listeners

    Ok, so I think I am hear with the proper linked files to show you guys! Pretty much learning everything, so forgive my ignorance thus far!
    Anyway, I am just trying to figure out movie clips as buttons, and have been following along on Lynda.com – however, I seem to be doing these things right, but when i test my movie, the button just loops regardless of rollovers or stop actions.
    You can check this address www.midnyc.com to see the failed anim, and you should be able to import it as well. Here is my coding:
    function rollover (e:EVENT){
        myBtn.gotoAndPlay ("in");
    myBtn.addEventListener (MouseEvent.MOUSE_OVER, rollover);
    function rollout (e:EVENT){
        myBtn.gotoAndPlay ("out");
    myBtn.addEventListener (MouseEvent.MOUSE_OUT, rollout);
    thank you in advance for your help. And to KGLAD, thanks for recommending how to post a bit better! Since I never had links etc... sorry about that.

    Do you get any kind of error messages?  Normally if there's a coding error, movieclips and other things go haywire.
    For you event handler functions, try specifying the event that matches the listener event...
    function rollout (e:MouseEvent){
    I think "EVENT" would be wrong anyways... "Event" would be correct

  • Stop action on a layer

    hello forumers.
    its been a while since ive used flash,and im struggeling with a command id normaly do within seconds.
    im trying to add a stop action on one of my layers,i know the action script is stop ( ) ;
    but i cant recall how to add it only to the particular layer.
    im affecting the whole scene when i add  a new layer and do the action.
    how do i get around this?
    thank you.

    The stop() function is a timeline command, not a layer function, so if you place it on any layer of a timeline the entire timeline will stop at whatever frame that it is in.  If you want something to stop independently of anything else in a timeline that is animating you need to create it as a movieclip with its own timeline that you can command to stop().

  • How to find runtime stop() action on frame

    Hi All,
    I want to stop all running movies in swf on pressing stop
    button , but when i press stop button some movie all ready stoped
    because of stop() action on it , So after pressing play action I
    want to play all the movies excluding thouse movie which had stop()
    action. I dont want to use any other variable on frame wich had
    stop() action on it , like isstop=1; So pls help me out for this
    problem , its very argent.
    Thanks and regards
    tay shk

    Please read if it helps:
    http://kr.forums.oracle.com/forums/thread.jspa?threadID=629696

  • Stop Action

    I know there must be a string about this, but couldn't find
    one.
    I started this file in AS 2 and had to switch to 3 while I
    was adding a scroll bar MC - following tutorial and saw I had to
    use AS 3. But, now none of my stop actions work. ??? I've looked
    all over and some sites even say that it's the same - stop(); I
    have a preloader like this:
    stop();
    this.onEnterFrame = function() {
    var amount:Number = this.getBytesLoaded() /
    this.getBytesTotal() *100;
    loader._xscale = amount;
    if(amount == 100) {
    this.gotoAndPlay(3);
    delete this.onEnterFrame;
    on frame one and then on frame 3 a stop(); with a MC on it
    that contains everything.
    Any help:

    Your problem isn't caused by stop, but by a different approch
    to events and handling of bytes loaded. You might use this piece of
    code:

Maybe you are looking for

  • Custom fields in ESS webdynpro applications

    Hi Experts, Can you please suggest me where I am going wrong in this scenario? I have a standard application Family member application. We enhanced the infotype 0021 with new fields and corresponding fields are added in screen structures and HCMT_BSP

  • Pro*c selecting XMLElement strangeness

    I've had a pro*c problem that I can't figure out. Hopefully, one of you might be able to do so. I am trying to create a XML output from a select statement. I having several problems, but the first one is that I can't get a simple XMLElement to work.

  • ASA to ACS Radius - restrict by group

    Hi Everyone, this may not be the correct forum for this, but since it relates to the ASA... So we currently use RADIUS to authenticate users accessing our AnyConnect access... the thing is, with everything working, we want to restrict the access to o

  • Software cannot be installed on this computer

    Hello all I've been looking around this forum for a while now and have found similar problems to mine but there haven't been any exact answers to my question I was horsing around with my computer and managed to somehow foul up my btree on my internal

  • Labview 32bitDLL not loading in non32XP environment

    I created a labview DLL  using LabVIEW 2010 32 bit development environment. Then I loaded it on different computer that does not have LabVIEW, but has LabVIEW runtime engine 2010 only I treid to load it on 32bit WinXP, LV Runtime 32 bit 2010.........