Jump to content

Help wit a Flash function


Edward

Recommended Posts

Hi,

 

I'm using a Flash component to create a flip book. Sometimes, I want the book to turn to a specific page when it's loaded, and I'm using the URL to initiate this, i.e. index.php?page=25. I can get this to work, but unfortunately everytime the page is changed manually, it runs the function and goes back to page 25. I've tried to set up a variable to stop this happening after the first time, and I've also tried overwriting the page variable, but to no avail. Can anyone think how this can be fixed? Here are the codes I've tried:

 

onEnterFrame = function() {
if (goto == 25) {
	if( zoomed )return;	
	myBook.flipGotoPage(25); 
}
}
stop();

 

onEnterFrame = function() {
if (goto_void != 1) {
	if (goto == 25) {
		if( zoomed )return;	
		myBook.flipGotoPage(25); 
	}
}
$goto_void = 1;
}
stop();

 

Perhaps I shouldn't be using onEnterFrame, but I don't know what else there is to choose from? I guessed and tried 'onLoad' and '_root.onLoadl' but that didn't work at all. Please can someone help?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.