Stop videoplayback in flash on frame exit?

Is there a way to stop video playback from a video when I leave the frame?
On the first frame a video plays, but I when click the button to goto the second frame, it stills plays sound. I can't add a stop action like flv_mc.stop because on the next frame there is no video so the flv_mc does not exist. I tried putting it on the frame but outside the stage but it disrupts the tweens I have on the stage. I even tried putting the video player inside a movie clip with two frame, one with the vido player and a blank one, to see if I could rig it to exist on both main frames but on the one it would be stopped and set to a blank frame but the video player doenst work when nested 2 movieclips deep. The video player is not on the main timeline but inside of a content_mc and it works put putting it inside of its own movieclip broke it.
I have also tried REMOVED_FROM_STAGE and that works but give me output errors. I have buttons (with gotoandStop actions) and only two of them have videos. At first I used removed from stage and copy and pasted on the frames the buttons navigate two, but it gave me and error of duplicate function, so I have three functions for REMOVED_FROM_STAGE. And they seemingly work and then I get output errors saying:
TypeError: Error #1009: Cannot access a property or method of a null object reference.
          at Woomer_DisneyCruiseUPDATE_fla::content_mc_12/frame2()
          at flash.display::MovieClip/gotoAndStop()
          at Woomer_DisneyCruiseUPDATE_fla::MainTimeline/goOne()
The file name is Woomer_DisneyCruiseUPDATE_fla.
BTW the buttons are on the main timeline and they control navigation on the inside of a movieclip called content_mc

That gave me errors because is said it was duplicate function even though it was on different frames, and also o nthe frame without the video it didn't know what to stop.
I found away around it though. I set variables for each button command and then on added and extra frame inside the content that function as a navigation. On this frame it stops the video and the checks boolean variables on the main timeline set by the buttons. It basically checks to see which button was pushed and then finishes the button command by going to that frame. Basically it takes a detour rather than going directly to the disired frame, on that detour frame it stops and videos that are playing and uses if/then statments to check for boolean that alternate based on the button that was pressed in the main timeline.
this is an example:
Main time line-->
var my_btnOne:boolean=true;
var my_btnTwo:boolean=false;
my_btn.addEventListener(MouseEvent.CLICK, buttonGo);
function buttonGo(e:MouseEvent):void{
     my_btnOne=true;
     my_btnTwo=false;
     content_mc.gotoAndStop(nav);
my_btnTwo.addEventListener(MouseEvent.CLICK, buttonGoTwo);
function buttonGoTwo(e:MouseEvent):void{
     my_btnOne=true;
     my_btnTwo=false;
     content_mc.gotoAndStop(nav);
inside content_mc:-->
if(my_btnOne){
gotoAndPlay("two");

Similar Messages

  • Timewarp effect in Ae CS6 causing footage to flash (some frames darker than those on either side)

    I have a clip sent from Pr CS6 to Ae CS6 that had some time remapping applied to speed up a portion of the clip. Although the dynamic link didn't work as expected, moving the in/out points of my clip from Pr in Ae, so that the footage in Ae was wrong, I was able to work around that by manually adjusting the footage in Ae to match what I started with in Pr (so much for dynamic link). That's not the worst of it, however. I sent this clip to Ae in order to add some motion blur to the newly faster footage to remove the strobing, using the timewarp effect. There is something funky going on when rendered, and it is different each time it is rendered. This is true in Ae AND in the clip that appears back in Pr. Sometimes it is perfect, but others some frames get darker, as if they are 2-3 stops darker, but only individual frames, and the placement is rather random between renders. I've checked the original clip in Ae, as well as the first comp of the original clip (2 of 3 pieces created in the project by dynamic link), and neither show these artifacts. Only the final comp, which has the timewarp effect on it to add motion blur, has this artifact, even in Ae. So, it must be related to the timewarp effect.
    I've added 3 consecutive frames of one instance so you can see what I mean. Check out the middle frame.
    When played back at full speed, this produces a very noticeable and annoying flashing. The last render I did had 5-6 of these weird frames. Any ideas on what could be causing this?
    Thanks,
    Shane

    you have written a lot, but said very little. Rather than vague descriptions of the blue sky, exact info about framerates, exact settings, render settings, system info and so on would be much more useful. The answer probably is that either your footage is interlaced or you are using crooked values for your Timewarp, resulting in adjacent semi-transparent frames.
    Mylenium

  • SWF Frames and Flash Player Frames

    Hi,
    Could I have the definition about these concepts?
    What is the relationship between them?
    In particular, I would know if they are paired each other or not during execution.
    Thanks in advance.
    Cheers.

    I'll try to explain what i need to understand.
    Could you underscore when the Flash Player Frames (understood as the time period between two consecutive enterFrame events) take place?
    Suppose an application with two frames (FR1 and FR2) and a specific frame rate
    The Flash Player streams in the SWF:
    1 Flash Player starts to load FR1
    2 FR1 is completely loaded
    3 FR1 calls stop() method
    4 Flash Player is waiting to load FR2
    5 FR2 is completely loaded
    6 FR2 calls stop() method
    To summarize: Can Flash Player Frames can be took place many times per SWF Frame?
    Thank you again
    LangDetecten>it YahooC
    ricapitolize
    Message was edited by: Bilbo1984

  • HTML link to a Flash file frame

    > This message is in MIME format. Since your mail reader
    does not understand
    this format, some or all of this message may not be legible.
    --B_3299492325_1333456
    Content-type: text/plain;
    charset="US-ASCII"
    Content-transfer-encoding: 7bit
    Hi
    I've got a client who has a HTML site on a laptop for a
    presentation and
    within this site he's wants a link that attaches to a AS2
    .swf that I've
    developed.
    The thing is it he wants it to link to specific area of the
    file and not to
    play it all. How would I do this as he's just asked for the
    specific address
    of the area it needs to jump to.
    Any help would be much appreciated bearing in mind my
    ActionScript is pure
    novice so a step by step would be handy.
    thanks
    --B_3299492325_1333456
    Content-type: text/html;
    charset="US-ASCII"
    Content-transfer-encoding: quoted-printable
    <HTML>
    <HEAD>
    <TITLE>HTML link to a Flash file frame</TITLE>
    </HEAD>
    <BODY>
    <FONT FACE=3D"Calibri, Verdana, Helvetica,
    Arial"><SPAN STYLE=3D'font-size:11pt=
    '>Hi<BR>
    I've got a client who has a HTML site on a laptop for a
    presentation and wi=
    thin this site he's wants a link that attaches to a AS2 .swf
    that I've devel=
    oped.<BR>
    <BR>
    The thing is it he wants it to link to specific area of the
    file and not to=
    play it all. How would I do this as he's just asked for the
    specific addres=
    s of the area it needs to jump to.<BR>
    <BR>
    Any help would be much appreciated bearing in mind my
    ActionScript is pure =
    novice so a step by step would be handy.<BR>
    <BR>
    thanks</SPAN></FONT>
    </BODY>
    </HTML>
    --B_3299492325_1333456--

    What do you mean about opening a flash file? Do you want the
    .fla file
    to open in flash? Or is it a swf that you imported into
    Director? Or
    is it an exe that was published from flash? Or a website that
    was
    created with Flash?
    If you are opening a .exe and you know the path to it, then
    you can use
    Director's built-in open command
    open the moviePath&"flashFile.exe"
    for most other things, I would use BuddyAPI. To open an exe,
    baRunProgram(). To open a fla or swf, baOpenFile.
    To make Director open a swf on the stage, import it and
    simply tell the
    button to go to that frame.

  • Why does flash drop frames ??

    I have been conducting some tests and am totally lost as to why flash based broadcasting drops frames.
    The genral formula for calculating bitrate is :
    bitrate = Width x Height x FPS
    Now if this value is lower than  Camera.bandwidth then why should flash still drop frames ?? Any assistance/ideas is greatly appreciated.
    I have checked with FMS performance tab: bytes in is well bellow Camera.bandwidth as well , but still flash drops frames... why??

    oh! you dont have to be an engeer to answer that. I reported you because i saw you had 306 points. Which means you had to be a serious guy giving a serious answer. If you had read my question (you may want to read it again just in case).. here is the answer to it that i could find on my own. There is no need to get things complicated, god created things simple eniough
    Refer to http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/media/Camera.html
    You will see that when we apply setMode funtion to request a width, height and fps, flash will request the device for closest native settings of the camera.  I am pasting it here so everyone can read:
    By default, Flash Player drops frames as needed to maintain image size. To minimize the number of dropped frames, even if this means reducing the size of the image, pass false for the favorArea parameter.
    When choosing a native mode, Flash Player tries to maintain the requested aspect ratio whenever possible. For example, if you issue the commandmyCam.setMode(400, 400, 30), and the maximum width and height values available on the camera are 320 and 288, Flash Player sets both the width and height at 288; by setting these properties to the same value, Flash Player maintains the 1:1 aspect ratio you requested.
    So as you see its a simple thing, nothing so complicated as NETWORKING, ALOHA , TCP/IP etc etc . If you wil notice all the situations i have stated, it clearly implies frame drop happens regardless of any bandwidth settings as soon as i go over a certain resolution.
    Haver a nice day! Cheers

  • Flash with frames

    I read a Flash with Frames tutorial and got what i wanted to
    do, but soon realized there was a problem. The code used only works
    with Actionscript 1.0. The code is: getURL("page.html","kirupa");
    where kirupa is the frame name. In actionscript 2.0, this page
    opens in a new window. I'm guessing there is a new way to do this
    in 2.0, any ideas???

    can you be more specific on what you are doing or using the
    code for?

  • Using Flash's frame anchors problem

    I have problem using flash's frame anchors with firefox
    2.0.0.7
    I have following "
    http://probertson.com/articles/2006/12/14/deep-linking-flash-application-states/"
    those instructions and i can't get this thing work. Those flash's
    frame anchors does work in IE 6.0. Any solutions? I have Flash CS3.
    LINK: http://www.students.tut.fi/~sillan25/t.html

    I don't know how you'd do this using a Flash object, but
    Director's
    built-in NetLingo xtra can handle SOAP requests as of version
    10.1 and
    this, in conjunction with the proxyServer() command, should
    be all you
    need - assuming you have access to proxy details.
    <
    http://www.adobe.com/devnet/director/articles/webservices.html>

  • Log and Capture in FCP 6.0.5 flash red frames

    So I have been having a very odd and troubling issue during my log and capture stage in post production, whenever I try to import a tape into FCP I get this intermittent red colored frame that flashes for what I could only guess is a frame and it happens probably every ten frames or so; I've tried every combination of hardware troubleshooting from a different deck and camera, tapes from all different times and cameras and formats, different firewire cables and even different firewire ports.
    Has anyone has any experience with this or even anything like this, and if so how can I make it stop, I have even tried that final cut maintenance program and basically everything short of a clean reinstall... do I really have to go that far!?

    Some users have success with the newer drivers others not so fortunate.
    Read through this thread:
    http://discussions.apple.com/thread.jspa?threadID=2676952&tstart=0
    Al

  • How to stop animation sequence at a frame number?

    Hi all
    I've just recently started learning Flash (I have CS4) and I
    have a small simple animated sequence at the start which then leads
    to the main home page.
    now the animation part works fine but when I test it it just
    runs right through - it doesn't stop at my main page which then the
    viewer will click a button to go to a different part of the site
    etc.
    I've tried adding a stop actionscript but I'm sure I'm not
    doing it right! how do I refer the stop to the animation... do I
    have to enter the frame number I want it stopped at etc?
    if anyone can make any suggestions or point me in the
    direction of a tutorial (or the correct wording for me to do a
    search myself) then I would be very grateful!
    Thank you for your time :-)

    Thanks.. I manage to miss off the semi-colon and put the
    double dotted one (I've just gone blank on it's name) *sigh*
    I always manage to miss something 'small' off and then takes
    forever to spot it!
    thanks for your help.

  • Stop flv when leaving a frame

    i want to stop a video from playing,when leaving a frame
    i tried to use SoundMixer.stopAll(); but it only stops the sound,
    i think my video is still streaming in the background because im starting to notice performance problems when i go back and open the video again
    the website gets very slow.
    please help

    I am sorry, my answer may be too late.
    Anyway, I guess you have to stop streaming by calling close() method.
    Have a look at
    http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/NetStream.html#include ExamplesSummary
    Then you can call stream.close() to stop it.
    Or if you have a flvPlayBack component on stage then you have to call stop() on that.
    For an example, if flvPlayBack component on stage has been named as "myVideoObj" then you have to call myVideoObj.stop();
    Also may be you have to set
    myVideoObj.autoPlay = false;
    Good luck
    getnaleen

  • Stop motion with flash

    Hi everyone.
    i want to create an animation with stop motion. Create a sequence with 160 photos  numbered continuous.
    It's with flash cs3.
    thanks a lot!

    It will be easy if you have your photos all named in a similar and sequential manner (ex: img1, img2, img3, etc) located in the same folder.  All you need to do is start the process of importing the first image to the stage, and midway thru that the program should recognize it is part of a series of images and will ask if you want to import the whole series, which you will say yes to.  I think it also asks if you want them arranged frame after frame (or assumes it), so you should end up with all of the images planted in the timeline for you in sequence.

  • Playback stopped working in Flash Professional

    I was working with Flash Professional CC with no issues and I either accidentally changed a setting I cannot seem to change back or something wonky is going on.
    All of a sudden, when I try to playback my video in Flash Professional, nothing happens. I click the play button and the program seems to do everything as if it were playing back (minus the playback cursor moving) but it isn't playing anything! I tried to see if it would play when exported to an swf and the same thing happens. The "play" button is clicked and the program acts as if it is playing but nothing is going on. When I click move forward/back a frame it works but the play feature does not work. I am doing the exact same things I did earlier on in the project and they worked without any issue.
    Could it be that my file hit a certain size and now it isn't playing? That doesn't seem possible, my fle is only 6MB.
    Please help!!
    Flash Professional Ned Murphy - I saw you answer a few other questions, I hope you might know!

    Hi kglad, thanks for replying!
    It actually wasn't working when playing the swf AND while trying to playback the animation while still in the Flash timeline. It seemed like something happened with that particular file. After restarting my computer and Flash several times, I tried an older version I saved of the project and that one was playing correctly in Flash and in the swf. I worked off that version and finished the project. Still no idea what caused my other file to stop playing back...I think it was either corrupted somehow or I hit an unknown setting.
    Thanks in advance if you have any ideas!

  • Show a Flash animation frame when opening a Powerpoint presentation

    Hi all,
    I have a Powerpoint presentation that embeds a Flash
    animation (swf file). I use Powerpoint 2003 and a Flash 9
    animation.
    The problem is that when the presentation is opened, no image
    (in fact a frame of the Flash animation) appears on the slide that
    contains the Flash object. Instead, a blank rectangle is displayed.
    To make it appear, I must start the presentation in slide
    show mode (here the animation is playing) and then return to
    'Normal' view. The last animation image is then shown on the slide.
    From now, if I save the presentation, close it and then reopen it,
    no image is shown.
    I have tried with different Flash animation versions and
    noticed that an image is displayed for Flash animation when
    compiled in Flash 7. In a Flash 8 animation, no image appears too.
    It seems that a change since Flash version 8 avoids an image to be
    displayed when opening the Powerpoint presentation.
    Has anyone already met this ? Are there security or other
    changes that will prevent a frame to be displayed when opening the
    presentation ? Any ideas or Internet links will be appreciated.
    Thanks

    Hi Dave and thanks for the answer.
    My embedded movie is playing well when we start the slideshow
    mode for the presentation, because it uses the installed activeX
    component (version 9 installed) to render it.
    My problem is that no image (ie the last movie frame
    displayed before exiting the slide show) is displayed the next time
    the presentation opens, even if the file is saved.
    Did you mean that, because the activeX version is newer than
    the PowerPoint 2003 release date, the PowerPoint application is not
    able to get the image (frame) the next time the presentation opens
    (that is, the image to display is embedded into the activeX at a
    specific location, which has changed between Flash player version 7
    and 8) ?
    PS: 1) I have opened the Flash 8 presentation in PowerPoint
    2007 and an image is shown on the slide, which might confirm that
    PowerPoint 2003 is too old to find the frame to be displayed.
    2) I searched into the in-line/off-line documentation and I
    found no paragraph speaking of the Flash version limitation.
    Let me know if I am right.
    Thanks again for the time taken to answer me.
    Rico

  • FLVPlayer stop when redirecting to another frame. AS3

    Hi
    I am new in AS3, but now i have problem to stop plaing FLVPlayback.
    In main time line i have first frame used for preloader and second for intro.
    Frame 3 is first screen with videoand my MainMenu with buttons inside mc.
    Now when I click on button it successfully redirect screen to next frame and load my page, but I still hear music from video.
    I need to stop playing video when i redirect to frames 4, 5 ....28 where are pages frame by frame.
    In MainMenu i use
    import flash.events.MouseEvent;
    import flash.display.MovieClip;
    //menu Domov
    function btnHome(event:MouseEvent):void
        (root as MovieClip).gotoAndPlay(4);
    function btnOnas(event:MouseEvent):void
        (root as MovieClip).gotoAndPlay(5);
    function btnBoard(event:MouseEvent):void
        (root as MovieClip).gotoAndPlay(6);
    btnHome_btn.addEventListener (MouseEvent.CLICK, btnHome);
    btnOnas_btn.addEventListener (MouseEvent.CLICK, btnOnas);
    btnBoard_btn.addEventListener (MouseEvent.CLICK, btnBoard);
    website have 24 pages than i don't copy next buttons.
    sorry for my english.

    First include the SoundMixer class:
    import flash.media.SoundMixer;
    Then to stop the sounds call the stopAll method:
    SoundMixer.stopAll();

  • Imovie 06 Flash between frames

    I am using imovie HD (06) with OS10.5.2. I have constructed a movie using stills and the Ken Burns effect. The problem is that there is a flash of white between each frame. Very annoying. Why is this happening and how do I fix it.
    Thanks!

    Took a quick screen capture, resetting the workspace or changing what sequence is loaded seems to make the issue stop, but it's obviously not preferable to have to do this all the time.

Maybe you are looking for

  • Iphone and ipad Lync Client Randomly cannot sign in to Lync 2013 Server

    I have a Lync 2013 environment that will allow all clients to connect from inside and outside of the network except for ios devices. iOS devices are sometimes able to connect and sometimes not. When they are not able to sign in they receive a message

  • Messages window does not open in Mavericks.

    When I close the messages window, I am not able to open it again from the dock. The only way I can open the window is to right click on the messages icon and then click on New message. This way the chat window opens up but with a new window. This is

  • I just got a new mac and my purchase on itunes have not come up

    can't finded my movies i have purchase  !!

  • One swf plays on web server, another does not

    I have a little .swf file (created from video via the Flash encoder) here: www.arveson.com/expt/flash/page1.htm and it does not play on the remote server, but it plays locally. I have placed an Adobe sample Flash file in the same location, called by

  • Stamps in the same place on every page

    Lets say we have a 10 page electrical wiring diagram document. On each page there's space for our client's logo and address. As a service, we are now thinking of adding that logo and address before we print the document and send it to our client. I k