Greetings,

I am writing as I am hoping to get away from timeline coding and into classes, but can't seem to get there.

Here is what I have:

Functions like this in frame 1, layer 1, that extends the entire timeline which consists of 21 frames:

Code:
var qFunc:Number;
var ansN:Number;
var ansB:Number;
var Score:Number = 0;
var q:Object = new Object();
var qSnd:Array = new Array();
var NItems:Number;
function nextQuest()
{
	this["Q" + qFunc]();
	listen_btn.enabled = true;
	nextAudio();
}
And functions like this on subsequent frames of the main timeline on layer 2:
Code:
// this allows for questions and info to be presented to user. As user progresses, the timeline playhead advances to another frame with similar code, just different values for the qFunc and NItems vars and the Q functions.

stop();
ClearAllHandler();
qFunc = 1;
NItems = 10;
Score = 0;
enableListenBtn();

Q1();
function Q1()
{
	ansN = 2;
}
function Q2()
{

	ansN = 1;
}
function Q3()
{

	ansN = 2;
}

//etc...

//On the next frame there is this:

stop();
ClearAllHandler();
qFunc = 11;
NItems = 10;
Score = 0;
enableListenBtn();

Q11();
function Q11()
{
	ansN = 2;
}
function Q12()
{

	ansN = 1;
}
function Q13()
{

	ansN = 2;
}

// and so on for a total of 21 frames with code on each
I have considered placing all the main functions in a document class and separate class files for each set of question functions. Not having enough experience with class files except for simple one-offs with a single function, this has been a real brain buster for me.

Any advice will be greatly appreciated.