Problem z Buttonem

Technologia Flash, czyli animacja na potrzeby stron WWW to świat daleko odbiegły od zwykłego programowania i kodu. Zapytaj o pomoc i podziel się z nami Twoimi problemami z zakresu Flasha.
Rafileus
Posty: 3
Rejestracja: czw cze 07, 2007 3:36 pm

Problem z Buttonem

Post autor: Rafileus »

Co jest zle w tej akcji?

on (press) {gotoAndPlay
Scene=Scene 1, layer=Layer 1, frame=1:Line 2:

wyskakuje mi błąd;
**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 2: Syntax error.
Scene=Scene 1, layer=Layer 1, frame=1:Line 2:

Total ActionScript Errors: 1 Reported Errors: 1

Ma to być button na odtworzenie flasha. Czekam na odpowiedź
Marek_bf
Administrator
Posty: 4419
Rejestracja: czw lut 24, 2005 2:14 am
Kontakt:

button

Post autor: Marek_bf »

Kod: Zaznacz cały

instancjaButtoba.onPress = function() {
	// kod do wykonania
};
Rafileus
Posty: 3
Rejestracja: czw cze 07, 2007 3:36 pm

Re: Problem z Buttonem

Post autor: Rafileus »

onPress = function(gotoAndPlay )
{ // Scene=Scene 1, layer=Layer 1, frame=1:Line 2:
};

błąd:

**Error** Scene=Scene 1, layer=Layer 1, frame=1:Line 1: Statement must appear within on handler
onPress = function(gotoAndPlay )

Total ActionScript Errors: 1 Reported Errors: 1


Dodano:

Najlepiej byłoby jakby ktoś napisał mi jak ta akcja ma wyglądac ;]
Marek_bf
Administrator
Posty: 4419
Rejestracja: czw lut 24, 2005 2:14 am
Kontakt:

Re: Problem z Buttonem

Post autor: Marek_bf »

Kod: Zaznacz cały

instancjaButtona.onPress = function() { 
   instancja_mc.gotoAndStop("numer/nazwa klatki");
};
Rafileus
Posty: 3
Rejestracja: czw cze 07, 2007 3:36 pm

Re: Problem z Buttonem

Post autor: Rafileus »

robie tak jak piszesz i nadal jest ten sam błąd ;<
Marek_bf
Administrator
Posty: 4419
Rejestracja: czw lut 24, 2005 2:14 am
Kontakt:

Re: Problem z Buttonem

Post autor: Marek_bf »

ODPOWIEDZ