Principales actions sur les boutons

Sommaire
I- Introduction
Voici un tutoriel sur les principales actions sur les boutons.
Informations :
- Difficulté : Facile
II- Tutoriel
Lorsque vous créer un bouton, pensez à nommer l’occurrence de ce bouton.
Ex : bouton_btn , play_btn , etc..
Action Play et Stop
L’action play fait démarrer une animation
- Code : Tout sélectionner
- on (press) {
- play_btn.onRelease = function() {
- play();
- };
- }
L’action stop arrête l’animation
- Code : Tout sélectionner
- on (press) {
- stop_btn.onRelease = function() {
- stop();
- };
- }
GotoAndPlay
L’action GotoAndPlay amène l’animation à une image précise.
- Code : Tout sélectionner
- bouton_btn.onRelease = function() {
- gotoAndPlay(1);
- }
GotoAndStop
L’action stop saute à une autre image et arrête la lecture
- Code : Tout sélectionner
- bouton_btn.onRelease = function() {
- gotoAndStop(30);
- }
getURL
GetURL appelle une page web
- Code : Tout sélectionner
- bouton_btn.onRelease = function() {
- getURL("http://.................");
- }