penguinsarecool200
02-20-2008, 08:57 PM
At the moment, I have two .fla files.
The first is my game, and the second is a congratulations screen, which you have to manually type in a password. If the password is right, then it will move into a movie clip. If it is wrong, it will reset itself and ask for the password again.
This works by loading text from a .txt file.
when i play both on their own, they work fine.
when i copy the frames from the second across to the game, suddenly, the actionscript goes crap.
When I have the actionscript:
on (release, keyPress "<Enter>")
{
if (user add pass != ""pass"")
{
gotoAndPlay(1177);
}
else
{
gotoAndStop(1194);
} // end else if
}
on the button, when put into the movie, i get four compiler errors.
1) ')' expected
2) Statement must appear within on handler
3) 'else' encountered without matching 'if'
4) Unexpected '}' encountered
These dont appear when the .fla is played separately.
I have tryed to import the .swf through a movie clip.
it loads up ok, but when i put in the password, it doesn't recognise it, and refuses to go tothe congrats screen, as if it cannot read the .txt file.
PLEASE SOMEONE HELP ME!
The first is my game, and the second is a congratulations screen, which you have to manually type in a password. If the password is right, then it will move into a movie clip. If it is wrong, it will reset itself and ask for the password again.
This works by loading text from a .txt file.
when i play both on their own, they work fine.
when i copy the frames from the second across to the game, suddenly, the actionscript goes crap.
When I have the actionscript:
on (release, keyPress "<Enter>")
{
if (user add pass != ""pass"")
{
gotoAndPlay(1177);
}
else
{
gotoAndStop(1194);
} // end else if
}
on the button, when put into the movie, i get four compiler errors.
1) ')' expected
2) Statement must appear within on handler
3) 'else' encountered without matching 'if'
4) Unexpected '}' encountered
These dont appear when the .fla is played separately.
I have tryed to import the .swf through a movie clip.
it loads up ok, but when i put in the password, it doesn't recognise it, and refuses to go tothe congrats screen, as if it cannot read the .txt file.
PLEASE SOMEONE HELP ME!