PDA

View Full Version : frame navigation problem...


Vagabond
02-26-2008, 05:51 AM
First off, I'm not exactly a newb... but that just makes this problem all the more annoying -_-

See, I'm trying to make a simple program to collect data through question and answer. Overall it's a gigantic character development tool for creative role playing games. I'm collecting and storing the data just fine, but my issue is with the time line controls.

I made some very simple buttons, a next and a previous. They're just button symbols named "next_btn" and "prev_btn" and they work fine. The handling script changes with each frame because the button not only moves to the next question, it also captures the imputed data for storage. It's all superficial though, merely different names but the same code.

data.text = scene_VAR;

next_btn.onPress = function(){
scene_VAR = data.text;
trace("VAR set to " + scene_VAR);
nextFrame();
}

prev_btn.onPress = function(){
scene_VAR = data.text;
trace("VAR set to " + scene_VAR);
prevFrame();
}

stop();

Each scene is named for the section, and each variable has a name to distinguish it (for instance "introduction_charName")

Now this is the code I use consistently through the application, and it works for the first two scenes (introduction and physical traits), but it breaks for some reason in the third (personality). The next button works fine, and the previous button collects data, but rather than simply move to the previous frame, it skips the last one and moves two frames back instead (moving from question 5 to question 3 for example).

I've gone over the code again and again, checking, double checking, checking the paths, the instance names, and everything I can think of. I can not figure why 1) it's moving back twice and 2) why this problem is isolated to this scene and none of the others... Any advice?