dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: removing mouseListener on pageflip

  1. #1
    Senior Member
    Join Date
    Aug 2004
    Posts
    289

    removing mouseListener on pageflip

    I have searched high and low for a sloution to this problem:

    I have attempted to insert the code for removing the mouseListener, on unloding the pageflip, in order to load it again...to no avail.

    Basically, I have 6 buttons on my main movie, one of which loads the pageflip. The others unload the pageflip, while loading other swf's.

    The code that worked (i'm loading through levels), but disabled one of the "unload" buttons entirely after clicking on it once was:



    Code:
    btn_5.onRelease = function() {
    unloadMovieNum(6);
    Mouse.removeListener(_level6.mousecontroll);
    delete this.onRelease;
    };
    The code that did nothing was:



    Code:
    function removeML() {	
    	_level6.Mouse.removeListener(level6.mousecontroll);	
    }
    Does anyone know what I'm doing wrong?

    I appreciate any response.

    Thank you.

    bluej2

  2. #2
    Flashmatics silentweed's Avatar
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    4,876
    try

    function removeML() {
    Mouse.removeListener(_level6.mousecontroll) ;
    }
    Flashmatics | Flashmatics Library (free downloads)
    -----------------------------------------------------
    Latest Projects:
    The Dead Room | Are You Smarter | Prison Break (Frame A Friend) | Beck's Fusions | The 24 Experience

    -----------------------------------------------------
    Flash Certified Developer

  3. #3
    Senior Member
    Join Date
    Aug 2004
    Posts
    289
    Thanks soooo much for answering...

    I've tried that too. Both on a separate frame, as well as inside the onRelease coded frame...below it's just on the same frame...

    This is what all the code for my button looks like...the one where I want to unload the pageflip...perhaps there's a conflict:

    Code:
    function removeML() {
    	Mouse.removeListener(_level6.mousecontroll);
    }
    my_btn5.onRelease = function() {
    	_level3.gotoAndStop("then");
    	_level1.gotoAndStop("leaving");
    	_level9.gotoAndPlay("curtains");
    	_level2.gotoAndStop("stopper");
    	loadMovieNum("confeti.swf", 4);
    	_root.background.gotoAndStop("backstart");
    	unloadMovieNum(5);
    	unloadMovieNum(6);
    };
    The other swf's I have loading on the first frame of this main movie.

    The site is incomplete but if you click on reviews, it's there:
    http://www.myslang.com/circ02.html

    The link "contact" has the code for unloading...it won't do it.

    Thanks

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