Remove MC when leaving the frame

Hi I have a frame that AS this:
this.createEmptyMovieClip("news",1)
news.loadMovie("news.swf")
when i click on a btn and gets to another frame this news.swf
file still stays on top of other elements.
is there a way to remove it when i'm leave the current frame?
(thanks in advance)

heheh kglad, thanks again. that's what i thought and it's
good to have you to back that up.
actually i decided to load movie into a pre-created empty mc
instead of using createEmptyMovieClip
then the swf disappear after changing frame. guess that
solved the problem.

Similar Messages

  • 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

  • Is there any listener when leaving the page?

    Hi,
    I use JDev 11g,
    I use this
    *((DCIteratorBinding)this.getBindings.get("MyIterator1")).getViewObject().getApplicationModule().getTransaction.isDirty();*
    to know if there is a change happen in database or not
    I want to check this change when I leave the page.Where can I write this code? Is there any listener when leave the page or not?
    Thank You.
    Sameh Nassar

    Thank You Sireesha,
    I make a class which implements interface PhaseListener and implement 2 methods (beforePhase and afterPhase).
    then I write
    <lifecycle>
    <phase-listener>MyClass</phase-listener>
    </lifecycle>
    in faces-config.xml file
    thank you.
    Sameh Nassar

  • Make video stop video when leaving a frame = problem as not all frames have this video

    I know how to make a video (instanced as showreel) stop when clicking on a button that that navigates to another section/frame, since otherwise I would still listen to that video while not visible. The problem is when I'm in another frame that doesn't have that video, when clicking on the menu to go to whichever other frame, it looks for that it to stop if it's playing and it and doesn't find it, and so there's an error.
    How can solve this? Maybe I should put an order saying something like if there exists a video in that frame instanced as sowreel, stop it, otherwise don't do anything as there is nothing to be stopped. Or assign the order to the frame (which is called motion), but I don't know how to do that, can someone help? The code I have is:
    import fl.video.VideoEvent;
    function onClick(evt:MouseEvent):void {
        if( showreel.playing ){
            showreel.stop();}
        gotoAndStop(evt.currentTarget.name);
    motion.addEventListener(MouseEvent.CLICK, onClick);
    web.addEventListener(MouseEvent.CLICK, onClick);
    logo.addEventListener(MouseEvent.CLICK, onClick);
    photo.addEventListener(MouseEvent.CLICK, onClick);

    all assets, as far as possible, should be removed from the display list and readied for gc when no longer in use.  that includes flvplayback instances.
    and yes, when you return to a frame or situation where you create an flvplayback instance, it will be created.  the removedfromstage event doesn't do anything except detect when something is removed from the stage:
    flv.addEventListener(Event.REMOVED_FROM_STAGE,f);
    function f(e:Event){
    flv.stop();
    that's it.
    for a typical beginner to intermediate coder, flv will be on one frame of the main timeline.   adding those lines of code will ensure that when you move from a frame that contains flv (and that code), any video playing in flv will be stopped so you won't hear it when you navigate to another frame.

  • Get pop up window when leave the WD page

    HI,
       I always get a pop up window says "Please wait! Closing the application" when i leave the page which is inital running Web Dynpro applicaton url.
       Is there any way we can disable the pop up?
    thanks
    yi

    Hello Martin,
    I have used this DLL before and wasn't asked to choose a codec. Maybe if you use all three functions (init, write, close), it works without problems. Here's a example that uses IMAQ hardware to acquire an 8-bit image at 30fps and writes each image to an avi file.
    There are utilities to examine dlls (see what functions are exported and what the dependencies are, but you can't see source code since it is compiles.) Check out QuickView or DependencyWalker.
    Attachments:
    avigrab.zip ‏66 KB

  • Seem to have difficulty sending email when leaving the house

    In my home, my iphone is connected via wifi. Emails from my pop accounts send fine...no problems. It seems that whenever I leave the house and it switches to 3G, my emails don't want to send. I actually have to go into each account's settings and either turn on or turn off the SSL setting. It just happens to be whatever it's set at. It'll work both ways so it's not like it's requiring SSL.

    Unless this email account has an authenticated SMTP server regardless if the SMTP server supports SSL or not, you will have problems sending with the account when not connected to the internet via your internet service provider.
    I access two email accounts with the iPhone's mail client. One account supports SSL for the incoming and outgoing mail server, and the other account does not, but each account has an authenticated SMTP server. I've never experienced any problems sending with either account regardless my internet connection.

  • Stop the cursor from leaving the frame/panel?

    Im making a simple target game where you shoot targets with the mouse. What I'd like to do is stop the mouse cursor from leaving the panel/frame. I've tried moving the cursor there with the Robot class, but 1) it doesnt lock it directly to the edge, 2) it doesnt stop at the top edge and left edge, 3) the bottom edge results in the cursor being placed in the wrong place and finally, 4) if u move the cursor fast enough it breaks out anyway :(
    Hope someone can help,
    Thanx.

    Wow nice responses. I have two questions:
    1) What is native code?Write the code to capture the mouse in C/C++ (Windows supports capturing the mouse cursor - dunno about linux or solaris), then write a JNI wrapper function so you can call it from within Java.
    >
    2) Is it difficult to make it full screen? I was
    thinking of doing that but the thought of rescaling
    everything (i.e. fonts, images etc) made me think
    otherwise.Fullscreen is easy, simply graphicsDevice.setFullscreenWindow(window);
    Once in fullscreen, you can change the resolution to whatever you like (limited to what is supported by the gfx card ofcourse :p), so you shouldn't have to worry about rescaling gfx 2much.
    >
    Thanx,
    Jon

  • How to remove music added to the frame

    I have added music (in loop) to the first frame of main timeline (through property panel), So it keeps playing till the last frame, but when the control jumps to first frame again after finishing all frames there are two musics playing, How can that be stopped?

    You don't have a lot of control if you dragged the sound to the stage and then set it to loop in the properties panel. You can either jump back to frame 2, so you don't play the sound at frame 1 when you loop the timeline or you can control the sound yourself using AS. Here's a little sample you could place in frame 1 that loops the sound 'libSound' 999 times, and only plays one time by using a flag variable:
    var a:Sound;
    var c:SoundChannel;
    var isPlaying:Boolean;
    if(!isPlaying){
        isPlaying = true;
        playSound();
    function playSound()
        a = new libSound(); //sound from library
        c = new SoundChannel();
        c = a.play(0,999);   

  • Error "Comatose" when leave the master node.

    Hi All,
    I'm trying to configured cluster on OES11 and i have many problems with it. this is one of:
    OES5:~ # cluster status
    Master_IP_Address_Resource Running OES1 3
    DATAP_SERVER Comatose OES5 6
    The error "commatose" show on status of data resource when i try to migrate DATAP_SERVER to the second node (OES5) with command: "cluster migrate DATAP_SERVER OES5"
    The same problem occurs when i "cluster leave" with the master node, and the Master_IP_Address_Resource is running on second node but DATAP_SERVER.
    My system:
    Openfire(10.10.5.56) : ISCSI target with: 1GB for SBD, 19GB for DATA
    OES1(10.10.5.155): Master Node, eDirectory
    IP Cluster: 10.10.5.44
    Data Resource: 10.10.5.43
    Mounted ISCSI initiator SBD and DATA From Openfire
    OES5(10.10.5.123): Second Node.
    Mounted ISCSI initiator SBD and DATA From Openfire
    i saw in the log file of the second node OES5:
    Apr 26 23:31:15 oes1 ncs-resourced: DATAP_SERVER.load: Error opening NSS management file (No such file or directory) on server at /sbin/nss line 49.
    it's because of the folder "_admin" doesn't exit on the second node.
    i wonder how can make an _admin folder on the second node, it's not a normal folder. ????
    do you have anyidea??
    thanks for reading.
    ndhuynh

    This is a NSS problem (likely caused by eDir not running correctly at the time the server started up).
    The easiest way to fix this is to reboot the node and check NSS with this command "nss /pools". If the command fails, you can further check eDir status with this command "ndsstat".
    If reboot comes back good, you don't need to do anything. If it doesn't, please contact NTS.
    Regards,
    Changju
    Originally Posted by ndhuynh
    Hi All,
    I'm trying to configured cluster on OES11 and i have many problems with it. this is one of:
    The error "commatose" show on status of data resource when i try to migrate DATAP_SERVER to the second node (OES5) with command: "cluster migrate DATAP_SERVER OES5"
    The same problem occurs when i "cluster leave" with the master node, and the Master_IP_Address_Resource is running on second node but DATAP_SERVER.
    i saw in the log file of the second node OES5:
    it's because of the folder "_admin" doesn't exit on the second node.
    i wonder how can make an _admin folder on the second node, it's not a normal folder. ????
    do you have anyidea??
    thanks for reading.
    ndhuynh

  • Prompt to save the chages when leaving the page

    Hi all,
    I have the following scenario:
    I have a plsql region with 15 records pro page with text fields and checkboxes.
    When the user does update any field and navigate to other page (or clicks to other pagination page) without click on the button "SAVE" or "CANCEL" I would like to show him the confirm dialog "The changes was not saved. Save it?" or anything like this.
    Is it possible?
    Thanks

    Hi,
    Have a look at this thread to see if it helps you:
    Re: detecting changes to items prior to submitting page
    Andy

  • How to remove java icon from the frame and put own incon instead

    H Everybody
    Please tell me how can I remove standard java logo from JFrame and put my company's log instead
    Thanks in advance

    Hi,
    yourFrame.setIconImage((new ImageIcon("yours.gif")).getImage());Phil

  • FireFox, despite being in a separate window, which is suponque a separate instance, when leaving the menu "exit" All the windows are closed, why is that? It has some configuration that prevents this?

    open FireFox
    press [CTRL]+[N]
    (now are 2 Window of FireFox, ok?)
    click on Menu
    click exit
    Ops! All Window of FireFox are closed?

    bbatman wrote:
    jschell wrote:
    My guess is that someone was trying to protect the system properties and then they wanted to add on the top of that. Thus they came up with that idea.Yeah, I was thinking that too. I bet you are right.
    But Properties exposes no API to restore defaults to the current instance. If some key/value gets "overwritten" by a put in the current instance, shadowing a key/value in defaults, there is no way to bring the default value back to the foreground except by deleting key (and thus restoring visibility to defaults).Err...although true I doubt it is relevant.
    Consider.
    1. Something grabbed a property value before you did anything. Nothing you do will change that. I suspect most VM stuff works this way.
    2. Something grabbed the properties and kept a reference. Nothing you do will change that.
    3. You changed it, so why would you want the other value?
    4. Deleting it does restore it.
    Given the above what situation from that do you think is relevant to your question? Or is there some other situation that you are considering?

  • Removing event listeners on leaving a frame

    Hi team,
    I am having a bit of trouble, I have l modded some code that I am really happy with, it makes buttons bounce around for the user to try to click on when entering a certain frame...
    Problem.. I notice tha the code adds eventlisteners ENTER_FRAME to make this work, when you leave that frame there are now problems with null objects becuase the listeners are still on but the objects are not there anymore..
    Ok so attempted solution - I can use a currentLabel on the main timeline to check if the correct frame is reached then use a function if (label is x) put listeners on else take them off... works but then I have to have these objects hidden on the timeline  and then add visible=true/false to my framelabel listener.. This works but part of my functionality here is that these movieclips that move are buttons that the user clicks on and they explode and dissapear- but now they dont because I have a code that says on that frame they should be visible..
    The only thing I can think of is to have a blank frame at the end of the explode and put a stop on it.  Then add a gotoAndPlay(1) into my frame label code.  Seems very ugly, you guys got a better way?  Can I remove eventlisteners on leaving a frame?  Is there a code like LEAVE_FRAME????
    cheers
    sub

    yes, it goes in the keyframe where those movieclips exist.  if the movieclips exist on a main timeline frame, that's where that code should be placed.
    that code should execute when the movieclip exists.  the listeners wait for the movieclips to be removed from the display list.  that happens when you navigate away from the frame that contains those movieclips.

  • Detecting when you leave a frame

    How can i detect when a particular frame is left? i.e. The
    user is viewing fram x, they click one of several buttons or
    perform a particular action which causes the swf to move to a
    different frame how can i detect when it exits the original frame
    x?

    I'm not sure I quite understand your question ... if the user
    clicks a button that will move the playhead ... the playhead will
    leave the frame then, at that time, playhead gone ...?
    unless you have something else that runs before it moves the
    main timeline's playhead ... but in that case then, at the end of
    that action is when the palyhead will leave the frame, place a call
    there to the item that needs notification ...? You don't really
    need anything to detect it.

  • Listeners - Entering a Frame and leaving a Frame to Call a function

    OK, I am trying to get the following functions to load and unload the video to my main timeline when I go in and out of a frame. I tried on Enter_FRAME but it is now working properly and load many instances.
    What are the listeners I need to do to call the functions of oCoach when enetering a frame and fclickCV when leaving a frame? Many thanks in advance!
    //========Scenario Movie===================
    var pCoach:coach_mc = new coach_mc();
    var spriteCoach:Sprite= new Sprite();
    spriteCoach.x = 5;
    spriteCoach.y = 30;
    //----------open scenario---------
    function oCoach(myevent:MouseEvent):void{
         stage.addChild(spriteCoach);
         spriteCoach.addChild(pCoach);
        pCoach.myVideo = myVideo1;
         pCoach.my_ns.play(myVideo1);
         coach_btn.visible = false;
    //     pCoach.scenario_txt.htmlText = myScenario;
    stage.addEventListener(Event.ENTER_FRAME,oCoach);
    //coach_btn.addEventListener(MouseEvent.CLICK,oCoach);
    function fclickCV(myevent:MouseEvent):void{
         coach_btn.visible = true;
         pCoach.my_ns.close();
         stage.removeChild(spriteCoach);
         pCoach.removeChild(videoVO);
         pCoach.clearInterval(loaded_interval);
    pCoach.closeCoach_btn.addEventListener(MouseEvent.CLICK,fclickCV);
    forward_btn.addEventListener(MouseEvent.CLICK,fclickCV);
    back_btn.addEventListener(MouseEvent.CLICK,fclickCV);

    enterframe and exitframe are loops.  they aren't one time events like their names suggest.
    to execute code upon entering a frame, attach the code to the frame or, better, create a function containing the code and call that function from the frame.  to execute code upon exiting a frame, create an object that is removed from the display list when you exit the frame.  you can then apply a removedfromstage listener to the object to call a function that will execute when exiting the frame.

Maybe you are looking for