Hi all,
this is my time posting here so apologies if I've posted it in the wrong place or something, please let me know!
I'm a student working on a game project similar to Japanese visual novel games, Phoenix Wright and Hotel Dusk on the Nintendo DS. Basically it's very visual and text heavy with not a lot of animation and heavy duty programming (which is great because I'm not a programmer haha).
I've use a tutorial which I've modified it so that the button would jump to the next frame instead of going back and replaying the animation.
I couldn't work out how to make the animation of the 1st text box stop before the second load of text appears so I changed the 1st textbox from dynamic to static text when the playhead jumps to the next frame because of its reliance on the timeline. This change then creates the visual discrepancy which is what I'm trying to get rid of, which results in several questions:
1. Is there a code to stop the animation and make it static while the playhead jumps to the next frame? If so, could someone kindly explain it to me please?
2. Is there an easier method to implement text just by typing into a fixed area of the textbox instead of working out where I need the next line by typing '\n'?
3. Lastly, since this current method is dependent on the timeline, is there possibly another way to get this animation effect without it being on the timeline (would it work if it's in its own movie clip symbol)?
I'll keep testing it out because I'll be implementing sound/audio into it. As the playhead keeps going back to a certain frame to check when the animation has finished it also messes up the audio.
I have a .zip file containing the .fla (CS5) with its audio files but I think it's slightly too big to attach ... I'll do my best to attach the code I've used in that case.
Script on Frame1
Code:
q = 1;
text = "Dialogue babble for textbox1";
stop();
nextpage1_btn.onRelease = function(){
gotoAndPlay(1);
}
Script on Frame2:
Code:
if (q < text.length) {
textbox = text.substring(0, q);
q++
} else {
textbox = text;
gotoAndStop(10);
}
Script on Frame3:
When all the text has appeared, the playhead will jump to frame10, if not the playhead will keep replaying back to make sure all the text has been written out which somehow affects the animation/coding used for the next lot of text as well as messing up the audio that I've put on the main timeline. Basically, is there a way to keep the text from textbox1 static as the textbox2 is being typed out?
Thank you for reading, hope to have replies soon!
-Wasabi
(it seems that I can't post links unless my post count is 50 or greater, sorry I couldn't make this post easier for viewing :/)