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
;)

lgravett
01-26-2010, 12:55 PM
I know this is an old thread but perhaps someone can help me...this is driving me crazy.

On the 4th page of the movie, there are 3 buttons that load external
movies. These movies are just the pages so that book still looks and works
the same. These movies are being loaded into a container. The code for the
buttons is below:

//The River Button
button1.onRelease=function(){
loadMovie ("river.swf", "myContainer");
}
//Watering Hole Button
button2.onRelease=function(){
loadMovie ("wateringHole.swf", "container");
}
//The Plains Button
button3.onRelease=function(){
loadMovie ("plains.swf", "container");
}

My problem is that when the new movie (lets say river.swf) loads, as soon
as I try and flip the page for the this movie, it flips the cover of the
initial movie. I need to remove the flipping of the first movie in order
for the 2nd movies pages to flip normally.

Could you please help me as I have no idea how to achieve this and am
running out of time.

I would so greatly appreciate it.

tacos
01-26-2010, 02:44 PM
You might want to attach your .fla and I'll have a look.

ASWC
01-26-2010, 03:02 PM
[ut]