Bonjour,
J'ai débuté il y a peut AS3.
J'ai le message d'erreur suivant :
TypeError: Error #1010: Un terme n'est pas défini et n'a pas de propriété.
at GammedeVinsbis_fla::MainTimeline/GammedeVinsbis_fla::frame1()
voici le code en AS3 :
stop()
import flash.display.MovieClip;
import flash.events.EventDispatcher;
//Navigation
this.Navigation.RetourCarte.addEventListener(MouseEvent.CLICK,BtnRetourCarte);
function BtnRetourCarte(event:MouseEvent):void {
gotoAndStop("Carte");
}
this.Navigation.back.addEventListener(MouseEvent.CLICK,BtnBack);
function BtnBack(event:MouseEvent):void {
prevFrame();
}
this.Navigation.Next.addEventListener(MouseEvent.CLICK,BtnNext);
function BtnNext(event:MouseEvent):void {
nextFrame();
}
//ScrollPane
this.PaneCarte
PaneCarte.source=ClipCarte
PaneCarte.setSize(750,510)
//Carte
this.ClipCarte.CoteRotie
this.ClipCarte.CoteRotie.addEventListener(MouseEvent.CLICK,BtnCoteRotie);
function BtnCoteRotie(event:MouseEvent):void {
this.ClipCarte.gotoAndStop("CoteRotie");
}
this.ClipCarte.Condrieu
this.ClipCarte.Condrieu.addEventListener(MouseEvent.CLICK,BtnCondrieu);
function BtnCondrieu(event:MouseEvent):void {
this.ClipCarte.gotoAndStop("Condrieu");
}
this.ClipCarte.ChateauGrillet
this.ClipCarte.ChateauGrillet.addEventListener(MouseEvent.CLICK,BtnChateauGrillet);
function BtnChateauGrillet(event:MouseEvent):void {
this.ClipCarte.gotoAndStop("Rien");
}
this.ClipCarte.Hermitage
this.ClipCarte.Hermitage.addEventListener(MouseEvent.CLICK,BtnHermitage);
function BtnHermitage(event:MouseEvent):void {
this.ClipCarte.gotoAndStop("Rien");
}
this.ClipCarte.Croze
this.ClipCarte.Croze.addEventListener(MouseEvent.CLICK,BtnCroze);
function BtnCroze(event:MouseEvent):void {
this.ClipCarte.gotoAndStop("Rien");
}
this.ClipCarte.Cornas
this.ClipCarte.Cornas.addEventListener(MouseEvent.CLICK,BtnCornas);
function BtnCornas(event:MouseEvent):void {
this.ClipCarte.gotoAndStop("Rien");
}
this.ClipCarte.StPeray
this.ClipCarte.StPeray.addEventListener(MouseEvent.CLICK,BtnStPeray);
function BtnStPeray(event:MouseEvent):void {
this.ClipCarte.gotoAndStop("Rien");
}
this.ClipCarte.StJoseph
this.ClipCarte.StJoseph.addEventListener(MouseEvent.CLICK,BtnStJoseph);
function BtnStJoseph(event:MouseEvent):void {
this.ClipCarte.gotoAndStop("StJoseph");
}
this.ClipCarte.ClairettedeDie
this.ClipCarte.ClairettedeDie.addEventListener(MouseEvent.CLICK,BtnClairettedeDie);
function BtnClairettedeDie(event:MouseEvent):void {
this.ClipCarte.gotoAndStop("ClairettedeDie");
}
this.ClipCarte.Tricastin
this.ClipCarte.Tricastin.addEventListener(MouseEvent.CLICK,BtnTricastin);
function BtnTricastin(event:MouseEvent):void {
this.ClipCarte.gotoAndStop("Rien");
}
this.ClipCarte.Vivarais
this.ClipCarte.Vivarais.addEventListener(MouseEvent.CLICK,BtnVivarais);
function BtnVivarais(event:MouseEvent):void {
this.ClipCarte.gotoAndStop("Rien");
}
this.ClipCarte.Villages
this.ClipCarte.Villages.addEventListener(MouseEvent.CLICK,BtnVillages);
function BtnVillages(event:MouseEvent):void {
this.ClipCarte.gotoAndStop("Villages");
}
this.ClipCarte.Rasteau
this.ClipCarte.Rasteau.addEventListener(MouseEvent.CLICK,BtnRasteau);
function BtnRasteau(event:MouseEvent):void {
this.ClipCarte.gotoAndStop("Rasteau");
}
this.ClipCarte.Cairanne
this.ClipCarte.Cairanne.addEventListener(MouseEvent.CLICK,BtnCairanne);
function BtnCairanne(event:MouseEvent):void {
this.ClipCarte.gotoAndStop("Cairanne");
}
this.ClipCarte.Gigondas
this.ClipCarte.Gigondas.addEventListener(MouseEvent.CLICK,BtnGigondas);
function BtnGigondas(event:MouseEvent):void {
this.ClipCarte.gotoAndStop("Gigondas");
}
this.ClipCarte.BeaumesdeVenise
this.ClipCarte.BeaumesdeVenise.addEventListener(MouseEvent.CLICK,BtnBeaumesdeVenise);
function BtnBeaumesdeVenise(event:MouseEvent):void {
this.ClipCarte.gotoAndStop("BeaumesdeVenise");
}
this.ClipCarte.Vacqueyras
this.ClipCarte.Vacqueyras.addEventListener(MouseEvent.CLICK,BtnVacqueyras);
function BtnVacqueyras(event:MouseEvent):void {
this.ClipCarte.gotoAndStop("Rien");
}
this.ClipCarte.Ventoux
this.ClipCarte.Ventoux.addEventListener(MouseEvent.CLICK,BtnVentoux);
function BtnVentoux(event:MouseEvent):void {
this.ClipCarte.gotoAndStop("Ventoux");
}
this.ClipCarte.CotesduRhone
this.ClipCarte.CotesduRhone.addEventListener(MouseEvent.CLICK,BtnCotesduRhone);
function BtnCotesduRhone(event:MouseEvent):void {
this.ClipCarte.gotoAndStop("CotesduRhone");
}
this.ClipCarte.ChateauneufduPape
this.ClipCarte.ChateauneufduPape.addEventListener(MouseEvent.CLICK,BtnChateauneufduPape);
function BtnChateauneufduPape(event:MouseEvent):void {
this.ClipCarte.gotoAndStop("ChateauneufduPape");
}
this.ClipCarte.Lirac
this.ClipCarte.Lirac.addEventListener(MouseEvent.CLICK,BtnLirac);
function BtnLirac(event:MouseEvent):void {
this.ClipCarte.gotoAndStop("Rien");
}
this.ClipCarte.Tavel
this.ClipCarte.Tavel.addEventListener(MouseEvent.CLICK,BtnTavel);
function BtnTavel(event:MouseEvent):void {
this.ClipCarte.gotoAndStop("Rien");
}
this.ClipCarte.Luberon
this.ClipCarte.Luberon.addEventListener(MouseEvent.CLICK,BtnLuberon);
function BtnLuberon(event:MouseEvent):void {
this.ClipCarte.gotoAndStop("Rien");
}
Je dois préciser que le même fichier sans le ScrollPane fonctionne très bien. Je pense que je ne dois pas définir ma cible correctement, mais je ne vois pas comment faire.
Merci de m'aider