Tout ce qui concerne le logiciel E-anim
 
AccueilPortailDernières imagesS'enregistrerConnexion
Le deal à ne pas rater :
ETB Pokémon Fable Nébuleuse : où acheter le coffret dresseur ...
Voir le deal

Partagez
 

 [Resolu] bug programmation (if)

Voir le sujet précédent Voir le sujet suivant Aller en bas 
AuteurMessage
maverick
Accro
Accro
maverick

Nombre de messages : 296
Date d'inscription : 06/03/2010

[Resolu] bug programmation (if) Empty
Message Sujet: [Resolu] bug programmation (if)   [Resolu] bug programmation (if) Icon_minitimeLun 08 Nov 2010, 21:38

Bonjour,

je suis désespéré, j'ai fait un petit bout de code tout con que j'utilise tous les jours et aujourd'hui il ne veut rien savoir.
Ça fait une journée que je suis bloqué.. Evil or Very Mad Evil or Very Mad  :twisted: "/$/$%?&

Voici le code :

class visibl{


static function ecrandebase0(mc:MovieClip):Void{
/* <1289247705335/0> ne pas supprimer ni déplacer ce commentaire / don't supress or move this comment.*/
if(_root.visible==4){
_root.bouton.gotoAndPlay(3);
}else{
_root.bouton.gotoAndPlay(15);
}
}
}


Avouez qu'il y a de quoi rire..Si le gr. visible est au temps 3 ( 4 dans la console ) le gr bouton va au temps 2. Le problème est que la condition if n'est jamais remplie et que je suis certain que le groupe visible est au temps 3 !!!

Si une âme charitable à deux minutes peut-être que j'ai loupé un truc mais honnêtement j'ai repris complétement cette petite anim bien simple plusieurs fois et rien n'y fait.

À tout hasard voici le zip :

http://serviceweb3d.com/upload/4.rar


Merci

Mav.
Revenir en haut Aller en bas
TORAK
Accro
Accro
TORAK

Nombre de messages : 1453
Age : 35
Localisation : Ain
Loisirs : prog, soft, hardware, sciences physiques & cosmologie
Date d'inscription : 23/12/2008

[Resolu] bug programmation (if) Empty
Message Sujet: Re: [Resolu] bug programmation (if)   [Resolu] bug programmation (if) Icon_minitimeMar 09 Nov 2010, 15:10

Lu!
comment définis tu _root.visible ?

Il peut être fort utile d'insérer un ea_text.traceLn ("visible = "+_root.visible); dans ta fonction histoire de voir se que vaut ton _root.visible Wink
(résultat dans la console de compilation)
Revenir en haut Aller en bas
http://torak01.fr/
maverick
Accro
Accro
maverick

Nombre de messages : 296
Date d'inscription : 06/03/2010

[Resolu] bug programmation (if) Empty
Message Sujet: Re: [Resolu] bug programmation (if)   [Resolu] bug programmation (if) Icon_minitimeMar 09 Nov 2010, 16:50

Le visible est en fait le nom de mon groupe..Si je comprend bien la question.

En fait non je ne comprend pas :oops: Razz

Pour le ea_text.traceLn non plus. Bref j'ai toujours utiliser ce petit code sous cette forme,(je n'en vois pas d'autre) et maintenant il ne fonctionne plus.

Je doit louper un truc Sad

Revenir en haut Aller en bas
maverick
Accro
Accro
maverick

Nombre de messages : 296
Date d'inscription : 06/03/2010

[Resolu] bug programmation (if) Empty
Message Sujet: Re: [Resolu] bug programmation (if)   [Resolu] bug programmation (if) Icon_minitimeMar 09 Nov 2010, 17:40

Voici un exemple de code que j'utilise présentement et qui fonctionne bien. Il est identique dans sa forme. (Désolé s'il est mal conçu ) Bizarre que celui-ci marche bien.. :?:

Code:
class train_princi{
   

   static function anim__16510(mc:MovieClip):Void{
      /* <id method> <1288631550598/0> ne pas supprimer ni déplacer ce commentaire / don't supress or move this comment.*/
      
if(_root._currentframe==2){
_root.gotoAndPlay(8);
}else{
http://_root.bouton.gotoAndPlay(19);
   }
   if(_root.bouton._currentframe==7 && _root.bit_onglet._currentframe==4){
_root.train2.gotoAndPlay(66);
_root.visible.gotoAndPlay(6);
http://_root.train2.recule.gotoAndPlay(25);
}else{
http://_root.gotoAndStop();
   }
   if(_root.bouton._currentframe==10 && _root.bit_onglet._currentframe==4){
_root.train3.gotoAndPlay(69);
_root.visible.gotoAndPlay(9);
}else{
http://_root.gotoAndStop();
   }
   if(_root.bouton._currentframe==13 && _root.bit_onglet._currentframe==4){
_root.train4.gotoAndPlay(71);
_root.visible.gotoAndPlay(12);
}else{
http://_root.gotoAndStop();
   }
   if(_root.bouton._currentframe==16 && _root.bit_onglet._currentframe==4){
_root.train5.gotoAndPlay(72);
_root.visible.gotoAndPlay(15);
}else{
http://_root.gotoAndStop();
   }
   if(_root.bouton._currentframe==4 && _root.bit_onglet._currentframe==7){
_root.train2.gotoAndPlay(145);
_root.train2.recule.gotoAndPlay(25);
_root.train2.prin.gif.gotoAndPlay(41);
http://_root.visible.gotoAndPlay(7);
}else{
http://_root.gotoAndStop();
   }
   if(_root.bouton._currentframe==10 && _root.bit_onglet._currentframe==7){
_root.train3.gotoAndPlay(141);
_root.visible.gotoAndPlay(9);
}else{
http://_root.gotoAndStop();
   }
   if(_root.bouton._currentframe==13 && _root.bit_onglet._currentframe==7){
_root.train4.gotoAndPlay(145);
_root.visible.gotoAndPlay(12);
}else{
http://_root.gotoAndStop();
   }
   if(_root.bouton._currentframe==16 && _root.bit_onglet._currentframe==7){
_root.train5.gotoAndPlay(147);
_root.visible.gotoAndPlay(15);
}else{
http://_root.gotoAndStop();
   }
   if(_root.bouton._currentframe==4 && _root.bit_onglet._currentframe==10){
_root.train3.gotoAndPlay(197);
http://_root.visible.gotoAndPlay(6);
_root.train3.recule.gotoAndPlay(25);
_root.train3.prin.gif.gotoAndPlay(41);
}else{
http://_root.gotoAndStop();
   }
   if(_root.bouton._currentframe==7 && _root.bit_onglet._currentframe==10){
_root.train3.gotoAndPlay(197);
_root.train3.recule.gotoAndPlay(30);
http://_root.visible.gotoAndPlay(9);
}else{
http://_root.gotoAndStop();
   }
   if(_root.bouton._currentframe==13 && _root.bit_onglet._currentframe==10){
_root.train4.gotoAndPlay(198);
_root.visible.gotoAndPlay(12);
}else{
http://_root.gotoAndStop();
   }
   if(_root.bouton._currentframe==16 && _root.bit_onglet._currentframe==10){
_root.train5.gotoAndPlay(198);
_root.visible.gotoAndPlay(15);
}else{
http://_root.gotoAndStop();
   }
   if(_root.bouton._currentframe==4 && _root.bit_onglet._currentframe==13){
_root.train4.gotoAndPlay(249);
http://_root.visible.gotoAndPlay(12);
_root.train4.recule.gotoAndPlay(25);
_root.train4.prin.gif.gotoAndPlay(41);
}else{
http://_root.gotoAndStop();
   }
   if(_root.bouton._currentframe==7 && _root.bit_onglet._currentframe==13){
_root.train4.gotoAndPlay(249);
_root.train4.recule.gotoAndPlay(30);
http://_root.train4.prin.gif.gotoAndPlay(41);
http://_root.visible.gotoAndPlay(9);
}else{
http://_root.gotoAndStop();
   }
   if(_root.bouton._currentframe==10 && _root.bit_onglet._currentframe==13){
_root.train4.gotoAndPlay(249);
_root.train4.recule.gotoAndPlay(35);
http://_root.visible.gotoAndPlay(12);
}else{
http://_root.gotoAndStop();
   }
   if(_root.bouton._currentframe==16 && _root.bit_onglet._currentframe==13){
_root.train5.gotoAndPlay(243);
_root.visible.gotoAndPlay(15);
}else{
http://_root.gotoAndStop();
   }
   if(_root.bouton._currentframe==4 && _root.bit_onglet._currentframe==16){
_root.train5.gotoAndPlay(301);
http://_root.visible.gotoAndPlay(12);
_root.train5.recule.gotoAndPlay(25);
_root.train5.prin.gif.gotoAndPlay(41);
}else{
http://_root.gotoAndStop();
   }
   if(_root.bouton._currentframe==7 && _root.bit_onglet._currentframe==16){
_root.train5.gotoAndPlay(301);
_root.train5.recule.gotoAndPlay(30);
http://_root.train4.prin.gif.gotoAndPlay(41);
http://_root.visible.gotoAndPlay(9);
}else{
http://_root.gotoAndStop();
   }
   if(_root.bouton._currentframe==10 && _root.bit_onglet._currentframe==16){
_root.train5.gotoAndPlay(301);
_root.train5.recule.gotoAndPlay(35);
http://_root.visible.gotoAndPlay(12);
}else{
http://_root.gotoAndStop();
   }
   if(_root.bouton._currentframe==13 && _root.bit_onglet._currentframe==16){
_root.train5.gotoAndPlay(301);
_root.train5.recule.gotoAndPlay(40);
}else{
http://_root.gotoAndStop()}
}
}
   static function ecrandebase0(mc:MovieClip):Void{
      /* <id method> <1288806033340/0> ne pas supprimer ni déplacer ce commentaire / don't supress or move this comment.*/
      
   if(_root.train1._currentframe==73 && _root.bit_onglet._currentframe==4 && _root.visible==4){
_root.bouton.gotoAndPlay(1);
}else{
_root.bouton.gotoAndPlay(17);
   }
   if(_root.train2._currentframe==65 && _root.train2._currentframe==145 && _root.bit_onglet._currentframe==7 && _root.visible==7){
http://_root.bouton.gotoAndPlay(1);
}else{
http://_root.bouton.gotoAndPlay(17);
   }
   if(_root.train3._currentframe==69 && _root.train3._currentframe==141 && _root.train3._currentframe==197 && _root.bit_onglet._currentframe==10 && _root.visible==10){
http://_root.bouton.gotoAndPlay(1);
}else{
http://_root.bouton.gotoAndPlay(17);
   }
   if(_root.train4._currentframe==71 && _root.train4._currentframe==145 && _root.train4._currentframe==192 && _root.train4._currentframe==249 && _root.bit_onglet._currentframe==13 && _root.visible==13){
http://_root.bouton.gotoAndPlay(1);
}else{
http://_root.bouton.gotoAndPlay(17);
   }
   if(_root.train5._currentframe==72 && _root.train5._currentframe==147 && _root.train5._currentframe==194 && _root.train5._currentframe==242 && _root.train5._currentframe==301 && _root.bit_onglet._currentframe==16 && _root.visible==16){
http://_root.bouton.gotoAndPlay(1);
}else{
http://_root.bouton.gotoAndPlay(17);
   }
      /* ecrire ici / write here */
   }
}
Revenir en haut Aller en bas
TORAK
Accro
Accro
TORAK

Nombre de messages : 1453
Age : 35
Localisation : Ain
Loisirs : prog, soft, hardware, sciences physiques & cosmologie
Date d'inscription : 23/12/2008

[Resolu] bug programmation (if) Empty
Message Sujet: Re: [Resolu] bug programmation (if)   [Resolu] bug programmation (if) Icon_minitimeMar 09 Nov 2010, 17:51

heu.. alors tu as sans doute voulu écrire _root.visible._currentframe==4 ?

parce que ton groupe _root.visible ne pourra jamais être égal a 4 sauf si tu fais _root.visible = 4; quelque part...

ps: tu as du t'amuser a écrire ton script Shocked
Revenir en haut Aller en bas
http://torak01.fr/
maverick
Accro
Accro
maverick

Nombre de messages : 296
Date d'inscription : 06/03/2010

[Resolu] bug programmation (if) Empty
Message Sujet: Re: [Resolu] bug programmation (if)   [Resolu] bug programmation (if) Icon_minitimeMar 09 Nov 2010, 18:24


COMMENT CE currentframe A-T-IL DISPARUE !!!! MDR. Sad ( dans les quatre dernier if du code ci-haut il y sont pourtant et c'est l'à que cela ne marchait plus"/$

Désolé.

ouais je me suis amusé. Je crois même que le prochain sera fait avec un Grafset.
Grafset permet d'éliminer les conflits de signaux avec des étapes et transition..

C'est un train où chaque wagon est un onglet. Alors oui je me suis amusé Crying or Very sad avec marche arrière et avant .....

Merci et désolé du dérangement. Je suis mal.
Revenir en haut Aller en bas
Contenu sponsorisé




[Resolu] bug programmation (if) Empty
Message Sujet: Re: [Resolu] bug programmation (if)   [Resolu] bug programmation (if) Icon_minitime

Revenir en haut Aller en bas
 
[Resolu] bug programmation (if)
Voir le sujet précédent Voir le sujet suivant Revenir en haut 
Page 1 sur 1
 Sujets similaires
-
» [Résolu] programmation
» programmation
» Programmation
» [résolu]Programmation - rotationde texte
» [Résolu] programmation action script

Permission de ce forum:Vous ne pouvez pas répondre aux sujets dans ce forum
E-anim :: Utiliser E-anim :: Problème, bug :: Sujets résolus-
Sauter vers: