Skip to main content
Inspiring
June 14, 2006
Answered

Classes

I building this kind of little world cup chart. So you type in the scores and it will work out everything. I have successfully done this for group a but i need to make it more universal so i can save memory and i don't have to repeat 600 lines of code.
I decided on using a class but i have already reached a problem. At the moment i am playing about but is there away to make a function inside the class access another function that is also inside the class like the code below. (it doesn't work)
This topic is closed to new replies. Start a new post to keep the conversation going.
Star_Tail_ProCorrect answer
Inspiring
June 15, 2006
Well i did figure it out myslef
var c:cup = new cup();
c.changed(a,c);
//class
class cup {
function changed(a,c) {
c.foot();
}
function foot() {
trace("hello");
}

that works its a jist of it anyway

2 replies

Star_Tail_ProAuthorCorrect answer
Inspiring
June 15, 2006
Well i did figure it out myslef
var c:cup = new cup();
c.changed(a,c);
//class
class cup {
function changed(a,c) {
c.foot();
}
function foot() {
trace("hello");
}

that works its a jist of it anyway
Translate
Inspiring
June 15, 2006
I could create the functions in an .as file but for every group, 2nd round, quater final, semi final, 3rd or 4th and fina and #include it but that take up a lot of memory.
Translate