begin process at 2012 05 26 13:39:05
  Trouver un code source :
 
dans
 
Accueil > Forum > 

Flash / Flash MX

 > 

Scripts

 > 

ActionScript

 > 

addFrameScript-stop-bouton cliquable


Derniers messages déposésPoser une question dans le forum ou lancer une discussion

addFrameScript-stop-bouton cliquable

mercredi 4 juin 2008 à 13:03:25 | addFrameScript-stop-bouton cliquable

ournik

Bonsoir-bonjour


Tout d'abord l'adresse de mon site avec un swf Lien pour voir où ça cloche.

Quand on clique sur les titres/liens en haut (parcours, photos,...) le personnage fait descendre un écran/parchemin qui découvre un bouton cliquable.
Quand je n'utilise pas la fonction :

function onInitStop( ):void {
stop();
}

le parchemin ne reste pas déroulé.

Par contre quand je l'utilise les boutons ne sont pas cliquables...

C'est le stop(); qui désactive la code du bouton apparemment, mais comment faire autrement pour insérer un stop sans bloquer le bouton?

Désolée pour le code mais je débute en AS3...

Merci d'avance

- code AS3 d'un bouton :

Action Script

  1. butexhib.addEventListener (MouseEvent.CLICK, exhibonClick); 
  2.  
  3. function exhibonClick ( pEvt:MouseEvent ):void 
  4.  
  5.  
  6. var myRequest:URLRequest = new URLRequest("http://jlienard.webdesign.free.fr/exhibitions"); 
  7.  
  8. navigateToURL ( myRequest, "_parent"); 
  9.  
butexhib.addEventListener (MouseEvent.CLICK, exhibonClick);

function exhibonClick ( pEvt:MouseEvent ):void

{

var myRequest:URLRequest = new URLRequest("http://jlienard.webdesign.free.fr/exhibitions");

navigateToURL ( myRequest, "_parent");

}

- code as3 général :

Action Script

  1. var mesRecups:Object = loaderInfo.parameters; 
  2. //pas encore utilisé mais servira pour faire commencer l'animation  
  3. //à un endroit précis définit par un bouton de retour à l'accueil 
  4. mesRecups.o ;//  « quel bouton ?» 
  5.  
  6. /*if (mesRecups.maVar1 == "graph") { 
  7. gotoAndPlay(52); 
  8. }*/ 
  9. switch (mesRecups.o) { 
  10.     case "graph" : 
  11.         this.gotoAndPlay(52); 
  12.         break
  13.     case "parcours" : 
  14.         this.gotoAndPlay(53); 
  15.         break
  16.     default : 
  17.         play(); 
  18.         break
  19.  
  20. import flash.events.EventDispatcher; 
  21. import flash.display.MovieClip; 
  22. import fl.transitions.Tween; 
  23. import fl.transitions.easing.*; 
  24.  
  25. butexhibitions.addEventListener(MouseEvent.CLICK,butExhibAnim); 
  26. butweb.addEventListener(MouseEvent.CLICK,butWebAnim); 
  27. butgraphik.addEventListener(MouseEvent.CLICK,butGraphAnim); 
  28. butphoto.addEventListener(MouseEvent.CLICK,butPhotoAnim); 
  29. butparcours.addEventListener(MouseEvent.CLICK,butParcoursAnim); 
  30.  
  31.  
  32. function butExhibAnim(evt:MouseEvent):void { 
  33.     if (currentFrame < 52) { 
  34.         this.play(); 
  35.     } else { 
  36.         switch (currentFrame) { 
  37.             case 52 : 
  38.                 this.gotoAndPlay(53); 
  39.                 this.addFrameScript(160, onInit1);//160 stop(); --> 173 
  40.                 break
  41.             case 173 ://ouvert_exhib 
  42.                 this.stop(); 
  43.                 break
  44.             case 204 ://web 
  45.                 this.gotoAndPlay(358); 
  46.                 this.addFrameScript(367, onInit12);//367 stop(); --> 173 
  47.                 this.addFrameScript(173, onInitStop);//367 stop(); --> 173 
  48.                 break
  49.             case 240 ://graphic 
  50.                 this.gotoAndPlay(344); 
  51.                 this.addFrameScript(357, onInit1);//357 stop(); --> 358 
  52.                 this.addFrameScript(367, onInit12);//367 stop(); --> 173 
  53.                 this.addFrameScript(173, onInitStop);//367 stop(); --> 173 
  54.                 break
  55.             case 277 ://photo 
  56.                 this.gotoAndPlay(330); 
  57.                 this.addFrameScript(343, onInit1);//357 stop(); --> 358 
  58.                 this.addFrameScript(357, onInit1);//357 stop(); --> 358 
  59.                 this.addFrameScript(367, onInit12);//367 stop(); --> 173 
  60.                 this.addFrameScript(173, onInitStop); 
  61.                 break
  62.             case 311 ://parcours 
  63.                 this.gotoAndPlay(312); 
  64.                 this.addFrameScript(329, onInit1);//329 stop(); -->343 
  65.                 this.addFrameScript(343, onInit1);//357 stop(); --> 358 
  66.                 this.addFrameScript(357, onInit1);//357 stop(); --> 358 
  67.                 this.addFrameScript(367, onInit12);//367 stop(); --> 173 
  68.                 this.addFrameScript(173, onInitStop); 
  69.                 break
  70.             default : 
  71.                 break
  72.         } 
  73.     } 
  74.  
  75. function butWebAnim(evt:MouseEvent):void { 
  76.     if (currentFrame < 52) { 
  77.         this.play(); 
  78.     } else { 
  79.         switch (currentFrame) { 
  80.             case 52 : 
  81.                 this.gotoAndPlay(53); 
  82.                 this.addFrameScript(160, onInit2);//160 stop(); -> 187 prépare 
  83.                 this.addFrameScript(173, onInit1);//173 stop(); --> 186 
  84.                 this.addFrameScript(193, onInit1);//193 stop(); --> 204 
  85.                 break
  86.             case 173 ://exhib 
  87.                 this.gotoAndPlay(174); 
  88.                 this.addFrameScript(186, onInit1);//186 stop(); 
  89.                 this.addFrameScript(193, onInit1);//193 stop(); -> 204 
  90.                 break
  91.             case 204 ://ouvert_web 
  92.                 this.stop(); 
  93.                 break
  94.             case 240 ://graph 
  95.                 this.gotoAndPlay(240); 
  96.                 this.addFrameScript(240, onInit10);//240 stop(); -> 343->357 
  97.                 this.addFrameScript(357, onInit11);//357 stop(); -> 199->204 
  98.                 this.addFrameScript(204, onInitStop); 
  99.                 break
  100.             case 277 ://photo 
  101.                 this.gotoAndPlay(277); 
  102.                 this.addFrameScript(277, onInit8);//240 stop(); -> 343->357 
  103.                 this.addFrameScript(343, onInit10);//240 stop(); -> 343->357 
  104.                 this.addFrameScript(357, onInit11); 
  105.                 this.addFrameScript(204, onInitStop); 
  106.                 break
  107.             case 311 ://parcours 
  108.                 this.gotoAndPlay(312); 
  109.                 this.addFrameScript(329, onInit);//329 stop(); -->343 
  110.                 this.addFrameScript(343, onInit1);//329 stop(); -->343 
  111.                 this.addFrameScript(357, onInit11);//329 stop(); -->343 
  112.                 this.addFrameScript(204, onInitStop);//329 stop(); -->343 
  113.                 break
  114.             default : 
  115.                 break
  116.         } 
  117.     } 
  118.  
  119. function butGraphAnim(evt:MouseEvent):void { 
  120.     if (currentFrame < 52) { 
  121.         this.play(); 
  122.     } else { 
  123.         switch (currentFrame) { 
  124.             case 52 : 
  125.                 this.gotoAndPlay(53); 
  126.                 this.addFrameScript(160, onInit2);//160 stop(); -> 187 prépare 
  127.                 this.addFrameScript(173, onInit1);//173 stop(); --> 186 
  128.                 this.addFrameScript(193, onInit3);//193 stop(); -> 217 prépare 
  129.                 this.addFrameScript(204, onInit1);//204 stop(); -->216 
  130.                 this.addFrameScript(228, onInit1);//228 stop(); -->240 
  131.                 break
  132.             case 173 ://exhib 
  133.                 this.gotoAndPlay(174); 
  134.                 this.addFrameScript(186, onInit);//186 stop(); 
  135.                 this.addFrameScript(193, onInit3);//193 stop(); -> 217 prépare 
  136.                 this.addFrameScript(228, onInit);//228 stop(); -->240 
  137.                 break
  138.             case 204 ://web 
  139.                 this.gotoAndPlay(205); 
  140.                 this.addFrameScript(216, onInit1);//216 stop(); -->228 
  141.                 this.addFrameScript(228, onInit1);//228 stop(); -->240 
  142.                 this.addFrameScript(240, onInitStop); 
  143.                 break
  144.             case 240 : 
  145.                 this.stop();//ouvert_graphic 
  146.                 break
  147.             case 277 ://photo 
  148.                 this.gotoAndPlay(277); 
  149.                 this.addFrameScript(277, onInit8);//277 stop(); -->330 
  150.                 this.addFrameScript(343, onInit9);//343 stop(); -->233 
  151.                 break
  152.             case 311 : 
  153.                 this.gotoAndPlay(312); 
  154.                 this.addFrameScript(329, onInit8);//329 stop(); -->343 
  155.                 this.addFrameScript(343, onInit9);//329 stop(); -->343 
  156.                 break
  157.             default : 
  158.                 break
  159.         } 
  160.     } 
  161.  
  162. function butPhotoAnim(evt:MouseEvent):void { 
  163.     if (currentFrame < 52) { 
  164.         this.play(); 
  165.     } else { 
  166.         switch (currentFrame) { 
  167.             case 52 : 
  168.                 this.gotoAndPlay(53); 
  169.                 this.addFrameScript(160, onInit2);//160 stop(); -> 187 prépare 
  170.                 this.addFrameScript(173, onInit1);//173 stop(); --> 186 
  171.                 this.addFrameScript(193, onInit3);//193 stop(); -> 217 prépare 
  172.                 this.addFrameScript(204, onInit1);//204 stop(); -->216 
  173.                 this.addFrameScript(228, onInit4);//228 stop(); -->253 
  174.                 this.addFrameScript(264, onInit1);//264 stop(); -->264 
  175.                 break
  176.             case 173 ://exhib 
  177.                 this.gotoAndPlay(174); 
  178.                 this.addFrameScript(186, onInit);//186 stop(); 
  179.                 this.addFrameScript(193, onInit3);//193 stop(); -> 217 prépare 
  180.                 this.addFrameScript(228, onInit4);//228 stop(); -->253 
  181.                 this.addFrameScript(264, onInit1);//264 stop(); -->264 
  182.                 break
  183.             case 204 ://web 
  184.                 this.gotoAndPlay(205); 
  185.                 this.addFrameScript(216, onInit1);//216 stop(); -->228 
  186.                 this.addFrameScript(228, onInit4);//228 stop(); -->253 
  187.                 this.addFrameScript(264, onInit1);//264 stop(); -->264 
  188.                 this.addFrameScript(277, onInitPlay); 
  189.                 this.addFrameScript(277, onInitStop); 
  190.                 break
  191.             case 240 ://graphic 
  192.                 this.gotoAndPlay(241); 
  193.                 this.addFrameScript(252, onInit1);//252 stop(); -->254 
  194.                 this.addFrameScript(264, onInit1);//264 stop(); -->264 
  195.                 this.addFrameScript(277, onInitStop); 
  196.                 break
  197.             case 277 ://ouvert_photo 
  198.                 this.stop(); 
  199.                 break
  200.             case 311 : 
  201.                 this.gotoAndPlay(312); 
  202.                 //this.addFrameScript(311, onInit6);//311 stop(); -->264 
  203.                 this.addFrameScript(329, onInit6); 
  204.                 this.addFrameScript(277, onInitStop); 
  205.                 break
  206.             default : 
  207.                 break
  208.         } 
  209.     } 
  210. function butParcoursAnim(evt:MouseEvent):void { 
  211.     if (currentFrame < 52) { 
  212.         this.play(); 
  213.     } else { 
  214.         switch (currentFrame) { 
  215.             case 52 : 
  216.                 //this.gotoAndPlay(311); 
  217.                 this.gotoAndPlay(53); 
  218.                 this.addFrameScript(160, onInit2);//160 stop(); -> 187 prépare 
  219.                 this.addFrameScript(173, onInit1);//173 stop(); --> 186 
  220.                 this.addFrameScript(193, onInit3);//193 stop(); -> 217 prépare 
  221.                 this.addFrameScript(204, onInit1);//204 stop(); -->216 
  222.                 this.addFrameScript(228, onInit4);//228 stop(); -->253 
  223.                 this.addFrameScript(264, onInit5);//264 stop(); -->264 
  224.                 break
  225.             case 173 : 
  226.                 this.gotoAndPlay(174); 
  227.                 this.addFrameScript(186, onInit1);//186 stop(); 
  228.                 this.addFrameScript(193, onInit3);//193 stop(); -> 217 prépare 
  229.                 this.addFrameScript(228, onInit4);//228 stop(); -->253 
  230.                 this.addFrameScript(263, onInit5);//264 stop(); -->264 
  231.                 break
  232.             case 204 : 
  233.                 this.gotoAndPlay(205); 
  234.                 this.addFrameScript(216, onInit1);//216 stop(); -->228 
  235.                 this.addFrameScript(228, onInit4);//228 stop(); -->253 
  236.                 this.addFrameScript(264, onInit5);//264 stop(); -->264 
  237.                 break
  238.             case 240 : 
  239.                 this.gotoAndPlay(241); 
  240.                 this.addFrameScript(252, onInit1);//252 stop(); -->254 
  241.                 this.addFrameScript(264, onInit5);//264 stop(); -->290 
  242.                 break
  243.             case 277 : 
  244.                 this.gotoAndPlay(278); 
  245.                 this.addFrameScript(289, onInit5);//289 stop(); -->264 
  246.                 this.addFrameScript(311, onInitStop); 
  247.                 break
  248.             case 311 : 
  249.                 this.stop(); 
  250.                 break;//ouvert_parcours 
  251.             default : 
  252.                 break
  253.         } 
  254.     } 
  255.  
  256. /*function onInit( ):void { 
  257. gotoAndPlay(currentFrame+1); 
  258. }*/ 
  259.  
  260. /*Si on arrive en fin de piste alors play*/ 
  261. function onInit( ):void { 
  262.     if (this.position !== this.duration) { 
  263.         this.play(); 
  264.     } 
  265. function onInit1( ):void { 
  266.     gotoAndPlay(currentFrame+1); 
  267. function onInit2( ):void { 
  268.     gotoAndPlay(187); 
  269. function onInit3( ):void { 
  270.     gotoAndPlay(217); 
  271. function onInit4( ):void { 
  272.     gotoAndPlay(253); 
  273. function onInit5( ):void { 
  274.     gotoAndPlay(290); 
  275. function onInit6( ):void { 
  276.     gotoAndPlay(271); 
  277. function onInitStop( ):void { 
  278.     stop(); 
  279. function onInit8( ):void { 
  280.     gotoAndPlay(330); 
  281. function onInit9( ):void { 
  282.     gotoAndPlay(233); 
  283. function onInit10( ):void { 
  284.     gotoAndPlay(344); 
  285. function onInit11( ):void { 
  286.     gotoAndPlay(199); 
  287. function onInit12( ):void { 
  288.     gotoAndPlay(166); 
  289. function onInitPlay( ):void { 
  290.     play(); 
  291. //Fonction de pause... 
  292. //var pauseTimer:Timer = new Timer(8900, 1); 
  293. //pauseTimer.start(); 
  294. //pauseTimer.addEventListener(TimerEvent.TIMER_COMPLETE, suite); 
  295. function suite(event:TimerEvent):void { 
  296.     //ici le code qui doit être exécuté après la pause 
  297.     gotoAndPlay(currentFrame+1); 
var mesRecups:Object = loaderInfo.parameters;
//pas encore utilisé mais servira pour faire commencer l'animation
//à un endroit précis définit par un bouton de retour à l'accueil
mesRecups.o ;// « quel bouton ?»

/*if (mesRecups.maVar1 == "graph") {
gotoAndPlay(52);
}*/
switch (mesRecups.o) {
case "graph" :
this.gotoAndPlay(52);
break;
case "parcours" :
this.gotoAndPlay(53);
break;
default :
play();
break;
}

import flash.events.EventDispatcher;
import flash.display.MovieClip;
import fl.transitions.Tween;
import fl.transitions.easing.*;

butexhibitions.addEventListener(MouseEvent.CLICK,butExhibAnim);
butweb.addEventListener(MouseEvent.CLICK,butWebAnim);
butgraphik.addEventListener(MouseEvent.CLICK,butGraphAnim);
butphoto.addEventListener(MouseEvent.CLICK,butPhotoAnim);
butparcours.addEventListener(MouseEvent.CLICK,butParcoursAnim);


function butExhibAnim(evt:MouseEvent):void {
if (currentFrame < 52) {
this.play();
} else {
switch (currentFrame) {
case 52 :
this.gotoAndPlay(53);
this.addFrameScript(160, onInit1);//160 stop(); --> 173
break;
case 173 ://ouvert_exhib
this.stop();
break;
case 204 ://web
this.gotoAndPlay(358);
this.addFrameScript(367, onInit12);//367 stop(); --> 173
this.addFrameScript(173, onInitStop);//367 stop(); --> 173
break;
case 240 ://graphic
this.gotoAndPlay(344);
this.addFrameScript(357, onInit1);//357 stop(); --> 358
this.addFrameScript(367, onInit12);//367 stop(); --> 173
this.addFrameScript(173, onInitStop);//367 stop(); --> 173
break;
case 277 ://photo
this.gotoAndPlay(330);
this.addFrameScript(343, onInit1);//357 stop(); --> 358
this.addFrameScript(357, onInit1);//357 stop(); --> 358
this.addFrameScript(367, onInit12);//367 stop(); --> 173
this.addFrameScript(173, onInitStop);
break;
case 311 ://parcours
this.gotoAndPlay(312);
this.addFrameScript(329, onInit1);//329 stop(); -->343
this.addFrameScript(343, onInit1);//357 stop(); --> 358
this.addFrameScript(357, onInit1);//357 stop(); --> 358
this.addFrameScript(367, onInit12);//367 stop(); --> 173
this.addFrameScript(173, onInitStop);
break;
default :
break;
}
}
}

function butWebAnim(evt:MouseEvent):void {
if (currentFrame < 52) {
this.play();
} else {
switch (currentFrame) {
case 52 :
this.gotoAndPlay(53);
this.addFrameScript(160, onInit2);//160 stop(); -> 187 prépare
this.addFrameScript(173, onInit1);//173 stop(); --> 186
this.addFrameScript(193, onInit1);//193 stop(); --> 204
break;
case 173 ://exhib
this.gotoAndPlay(174);
this.addFrameScript(186, onInit1);//186 stop();
this.addFrameScript(193, onInit1);//193 stop(); -> 204
break;
case 204 ://ouvert_web
this.stop();
break;
case 240 ://graph
this.gotoAndPlay(240);
this.addFrameScript(240, onInit10);//240 stop(); -> 343->357
this.addFrameScript(357, onInit11);//357 stop(); -> 199->204
this.addFrameScript(204, onInitStop);
break;
case 277 ://photo
this.gotoAndPlay(277);
this.addFrameScript(277, onInit8);//240 stop(); -> 343->357
this.addFrameScript(343, onInit10);//240 stop(); -> 343->357
this.addFrameScript(357, onInit11);
this.addFrameScript(204, onInitStop);
break;
case 311 ://parcours
this.gotoAndPlay(312);
this.addFrameScript(329, onInit);//329 stop(); -->343
this.addFrameScript(343, onInit1);//329 stop(); -->343
this.addFrameScript(357, onInit11);//329 stop(); -->343
this.addFrameScript(204, onInitStop);//329 stop(); -->343
break;
default :
break;
}
}
}

function butGraphAnim(evt:MouseEvent):void {
if (currentFrame < 52) {
this.play();
} else {
switch (currentFrame) {
case 52 :
this.gotoAndPlay(53);
this.addFrameScript(160, onInit2);//160 stop(); -> 187 prépare
this.addFrameScript(173, onInit1);//173 stop(); --> 186
this.addFrameScript(193, onInit3);//193 stop(); -> 217 prépare
this.addFrameScript(204, onInit1);//204 stop(); -->216
this.addFrameScript(228, onInit1);//228 stop(); -->240
break;
case 173 ://exhib
this.gotoAndPlay(174);
this.addFrameScript(186, onInit);//186 stop();
this.addFrameScript(193, onInit3);//193 stop(); -> 217 prépare
this.addFrameScript(228, onInit);//228 stop(); -->240
break;
case 204 ://web
this.gotoAndPlay(205);
this.addFrameScript(216, onInit1);//216 stop(); -->228
this.addFrameScript(228, onInit1);//228 stop(); -->240
this.addFrameScript(240, onInitStop);
break;
case 240 :
this.stop();//ouvert_graphic
break;
case 277 ://photo
this.gotoAndPlay(277);
this.addFrameScript(277, onInit8);//277 stop(); -->330
this.addFrameScript(343, onInit9);//343 stop(); -->233
break;
case 311 :
this.gotoAndPlay(312);
this.addFrameScript(329, onInit8);//329 stop(); -->343
this.addFrameScript(343, onInit9);//329 stop(); -->343
break;
default :
break;
}
}
}

function butPhotoAnim(evt:MouseEvent):void {
if (currentFrame < 52) {
this.play();
} else {
switch (currentFrame) {
case 52 :
this.gotoAndPlay(53);
this.addFrameScript(160, onInit2);//160 stop(); -> 187 prépare
this.addFrameScript(173, onInit1);//173 stop(); --> 186
this.addFrameScript(193, onInit3);//193 stop(); -> 217 prépare
this.addFrameScript(204, onInit1);//204 stop(); -->216
this.addFrameScript(228, onInit4);//228 stop(); -->253
this.addFrameScript(264, onInit1);//264 stop(); -->264
break;
case 173 ://exhib
this.gotoAndPlay(174);
this.addFrameScript(186, onInit);//186 stop();
this.addFrameScript(193, onInit3);//193 stop(); -> 217 prépare
this.addFrameScript(228, onInit4);//228 stop(); -->253
this.addFrameScript(264, onInit1);//264 stop(); -->264
break;
case 204 ://web
this.gotoAndPlay(205);
this.addFrameScript(216, onInit1);//216 stop(); -->228
this.addFrameScript(228, onInit4);//228 stop(); -->253
this.addFrameScript(264, onInit1);//264 stop(); -->264
this.addFrameScript(277, onInitPlay);
this.addFrameScript(277, onInitStop);
break;
case 240 ://graphic
this.gotoAndPlay(241);
this.addFrameScript(252, onInit1);//252 stop(); -->254
this.addFrameScript(264, onInit1);//264 stop(); -->264
this.addFrameScript(277, onInitStop);
break;
case 277 ://ouvert_photo
this.stop();
break;
case 311 :
this.gotoAndPlay(312);
//this.addFrameScript(311, onInit6);//311 stop(); -->264
this.addFrameScript(329, onInit6);
this.addFrameScript(277, onInitStop);
break;
default :
break;
}
}
}
function butParcoursAnim(evt:MouseEvent):void {
if (currentFrame < 52) {
this.play();
} else {
switch (currentFrame) {
case 52 :
//this.gotoAndPlay(311);
this.gotoAndPlay(53);
this.addFrameScript(160, onInit2);//160 stop(); -> 187 prépare
this.addFrameScript(173, onInit1);//173 stop(); --> 186
this.addFrameScript(193, onInit3);//193 stop(); -> 217 prépare
this.addFrameScript(204, onInit1);//204 stop(); -->216
this.addFrameScript(228, onInit4);//228 stop(); -->253
this.addFrameScript(264, onInit5);//264 stop(); -->264
break;
case 173 :
this.gotoAndPlay(174);
this.addFrameScript(186, onInit1);//186 stop();
this.addFrameScript(193, onInit3);//193 stop(); -> 217 prépare
this.addFrameScript(228, onInit4);//228 stop(); -->253
this.addFrameScript(263, onInit5);//264 stop(); -->264
break;
case 204 :
this.gotoAndPlay(205);
this.addFrameScript(216, onInit1);//216 stop(); -->228
this.addFrameScript(228, onInit4);//228 stop(); -->253
this.addFrameScript(264, onInit5);//264 stop(); -->264
break;
case 240 :
this.gotoAndPlay(241);
this.addFrameScript(252, onInit1);//252 stop(); -->254
this.addFrameScript(264, onInit5);//264 stop(); -->290
break;
case 277 :
this.gotoAndPlay(278);
this.addFrameScript(289, onInit5);//289 stop(); -->264
this.addFrameScript(311, onInitStop);
break;
case 311 :
this.stop();
break;//ouvert_parcours
default :
break;
}
}
}

/*function onInit( ):void {
gotoAndPlay(currentFrame+1);
}*/

/*Si on arrive en fin de piste alors play*/
function onInit( ):void {
if (this.position !== this.duration) {
this.play();
}
}
function onInit1( ):void {
gotoAndPlay(currentFrame+1);
}
function onInit2( ):void {
gotoAndPlay(187);
}
function onInit3( ):void {
gotoAndPlay(217);
}
function onInit4( ):void {
gotoAndPlay(253);
}
function onInit5( ):void {
gotoAndPlay(290);
}
function onInit6( ):void {
gotoAndPlay(271);
}
function onInitStop( ):void {
stop();
}
function onInit8( ):void {
gotoAndPlay(330);
}
function onInit9( ):void {
gotoAndPlay(233);
}
function onInit10( ):void {
gotoAndPlay(344);
}
function onInit11( ):void {
gotoAndPlay(199);
}
function onInit12( ):void {
gotoAndPlay(166);
}
function onInitPlay( ):void {
play();
}
//Fonction de pause...
//var pauseTimer:Timer = new Timer(8900, 1);
//pauseTimer.start();
//pauseTimer.addEventListener(TimerEvent.TIMER_COMPLETE, suite);
function suite(event:TimerEvent):void {
//ici le code qui doit être exécuté après la pause
gotoAndPlay(currentFrame+1);
}

mercredi 4 juin 2008 à 13:05:59 | Re : addFrameScript-stop-bouton cliquable

ournik

oupsj'ai copié le code une fois de trop désolé ...
merci d'avance


Cette discussion est classée dans : case, break, gotoandplay, stop, addframescript


Répondre à ce message

Sujets en rapport avec ce message

affichage de flash en fonction de l'url en cours [ par okostyle ] Bonjour à tous. Voici mon problème. Je suis en train de mettre en place un intranet.Cet intranet se compose de 6 modules différents. Un bandeau flash urgent [ par mariemmedia ] mediabonjourvoici un code pour symbole clip afin de déplacer   ballon avec clavier mais il ne travaille pas je ne sais pas ou est la faute .QUI PEUT M Optimisation du code AS [ par Limack ] Bonjour les amis(es) J'ai un problème pour un long code que j'ai écrit : l'erreur envoyée par flash est la suivante (Un script de cette animation ral (Débutant) Clip qui suit un autre [ par flshnoob ] Bonjour, je suis complètement débutant en flash, Je vous explique ce que je voudrai avoir, j'ai mot qui est caché partiellement par des formes (ronde gotoandplay, stop, gotoandstop : problème [ par Killan ] Bonjour,j'ai une animation flash toute simple, à la 2ème séquence j'ai un bouton pour passer cette sequence et aller directement à la séquence suivant Quel type de fichier ?? [ par MaxusViardis ] Bonjour, voila j'utilise le code de pegase et j'aimerai le modifier pour que la partie qui aligne les 0 et les 1 (ici en rouge) viennent d'un fichier Quel type de fichier ?? [ par MaxusViardis ] Bonjour, voila j'utilise le code de pegase et j'aimerai le modifier pour que la partie qui aligne les 0 et les 1 (ici en rouge) viennent d'un fichier MC gotoandplay _root [ par PEHA ] http://www.miran-lejeu.tk gotoAndPlay() et variables [ par BananaTree ] slt tout le monde.Sur le principe de "mieux vaut 1 qui sait que 10 qui cherchent" , je voudrais pouvoir inclure  this.monClip.gotoAndStop(8) dans  maF gotoAnsStop [ par oliver7 ] slt voici mon probleme : j'ai un clip avec une condition qui fait gotoAndPlay mais sa ne le fait pas dans le calque mais dans le clip et je veut que s


Nos sponsors


Sondage...

CalendriCode

Mai 2012
LMMJVSD
 123456
78910111213
14151617181920
21222324252627
28293031   

Consulter la suite du CalendriCode

A découvrir



 
Développement réalisé par Nicolas SOREL (Nix) avec l'aide de : Cyril DURAND et Emmanuel (EBArtSoft), Merci à Vincent pour ses précieux conseils.
CodeS-SourceS.com© Toute reproduction même partielle est interdite sauf accord écrit du Webmaster
CodeS-SourceS.com© est une marque déposée tous droits réservés

Google Coop CodeS-SourceS Google Coop CodeS-SourceS
Temps d'éxécution de la page : 1,030 sec (3)

Nous contacter | Annoncer sur CodeS-SourceS | Mentions légales