PDA

View Full Version : Pageflip V22 removeML();


BenWorbs
09-07-2007, 04:46 PM
Hi,

I've read every post that google throws at me wrt the removal of the mouse listener on pageflip and I have got nowhere.

It seems I've got the same problem as many people who sucessfully load a pageflip movie into a main movie but when trying to reload it the pages are hard to turn. I understand I have to call the removeML function and have tried countless things but I'm having no success.

The code I'm using is

btn_on.onPress = function () {
loadMovieNum("exports/myclipname.swf", 1);
}

btn_off.onPress = function () {
unloadMovieNum(1);
}

stop();

Where do I put removeML() ?? I just can't get this to work

The boss is getting seriously stressed with me today cos this is taking me so long I can't wait to go home...:)

Help me someone please :o


Thanks in advance

Ben

atomic
09-07-2007, 05:22 PM
According to this at the bottom of frame 7 in pageflip...

/* you can use these functions:

gotoPage( destinationPageNo, skip ); //quick jump to the page number: destinationPageNo; values = 0-maxpages; skip: boolean; if true, pages will be skipped to the destination!
autoflip(); //start autoflip (direction is calculated from _xmouse)

canflip //it's a variable. setting its value to false disables flipping

other functions of page turning is automatic;

WARNING!!!
if you want to unload/reload tha pageflip, before unloading call function: removeML(); to remove mouse listener!

*/

It should be when you unload the movie, thus...

btn_off.onPress = function () {
removeML();
unloadMovieNum(1);
}

Which should call the removeML() function on frame 8...

function removeML() { //removes mouse listener
//Call this function before unloading the pageflip
//if you don't do that, the next time you load a
//pageflip, the mouselistener will not work!
Mouse.removeListener(mousecontroll);
}

BenWorbs
09-19-2007, 07:49 PM
Thanks for the reply atomic I have sorted this now

Ben

atomic
09-20-2007, 03:40 AM
;)