import problem

View: New views
1 Messages — Rating Filter:   Alert me  

import problem

by Jean-Christophe CORNIC :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

HEllo, i have two classes, one used in the other. In Eclipse, no problem, no warning but when i compile with mtasc, this is the problem
 
type error class not found : frame2
 
my code is
 
leJeu.as
/**
* C'est la classe principale qui contient tout
*/
class leJeu {
static public var monJeu:leJeu;
var deuxiemeFrame:frame2;
/**
* Constructeur
*/
function leJeu()
{
deuxiemeFrame = new frame2();
}
/**
* C'est la fonction de départ.
*/
public static function main()
{
monJeu = new leJeu();
}
}
 
 
 
frame2.as
/**
*
*/
class frame2 {
var global_nom_joueurs = new Array();
var _lvEnvoit = new LoadVars();
var _lvRecoit = new LoadVars();
var newGame:MovieClip;
public function envoiLaSauce()
{
_lvEnvoit.sendAndLoad("inscriptionPartie.php", _lvRecoit);
}
function frame2()
{
_lvEnvoit.attentePartie = 1;
_lvEnvoit.demandeInscription=0;
_lvEnvoit.IDPartie=-1;
_lvEnvoit.IDJoueur=-1;
_lvEnvoit.oldIDPartie=-1;
_lvEnvoit.nbPartiesEnTout=0;
_lvEnvoit.nbJoueursPartie=0;
_lvEnvoit.nbJoueursEnTout=2; // par défaut, c'est 2
_lvEnvoit.typeDePartie = "debutant"; // par défaut, la partie est une partie de débutant
_lvEnvoit.nouvellePartie=0;
_lvRecoit.pointer = this;
_lvRecoit.onLoad = function(ok:Boolean)
{
if (ok)
{
_root.titreInscription.text += "nbParties PHP = " + this.nbPartieEnTout + "\n";
if (this.pointer._lvEnvoit.nbPartiesEnTout != this.nbPartieEnTout)
{
this.pointer._lvEnvoit.nbPartiesEnTout=this.nbPartieEnTout;
}
}
}
// Le titre est statique donc pas de variable
_root.createTextField("titreInscription", _root.getNextHighestDepth(), 100, 10, 300, 20);
_root.titreInscription.text = "S'INSCRIRE A UNE PARTIE";
_root.titreInscription.size = 24;
_root.titreInscription.textColor = 0xEEDDDD;
newGame = _root.createEmptyMovieClip("test",_root.getNextHighestDepth());
newGame.attachMovie("nouvellePartieBouton", "test2", _root.getNextHighestDepth());
newGame.pointer=this;
//newGame.loadMovie("./images/jaune_jc.gif");
newGame._x = 150;
newGame._y = 180;
newGame.onPress = function()
{
this.pointer._lvEnvoit.nouvellePartie=1;
}
var intervalId = setInterval(this, "envoiLaSauce", 1000);
}
}
 
 
 
 
Thanks for ur help !!!!!
 
leJeu.as and frame2.as are both in the "src\" directorie. I thought i didn't need the "import" function, no ??? (i also tried with "import frame2; but it doesn't work too)
 
++
JC


Ne gardez plus qu'une seule adresse mail ! Copiez vos mails vers Yahoo! Mail
--
MTASC : no more coffee break while compiling