Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 09-06-2005, 16:25   #1 (permalink)
Neuer User
 
Registriert seit: Mar 2005
Beiträge: 105
bestimmte Frames/Bilder eines MCs spielen??

also:

ich habe einen Film mit mehreren Buttons... und einen weitern Film (Instanzname ausgabe)
beim pressen der jeweiligen Buttons soll folgendes passieren:

button1:
abspielen der Frames 1-10 der Instanz ausgabe und anschließend 20-29 der
Instanz Ausgabe

button 2:
abspielen der Frames 1-10 der Instanz ausgabe und anschließend 30-39 der
Instanz Ausgabe

button 3:
abspielen der Frames 1-10 der Instanz ausgabe und anschließend 40-49 der
Instanz Ausgabe


ist sowas möglich oder muss ich mehrere MCs basteln und Bild 1-10 in jedem MC gleich gestalten?
Souldelivery ist offline   Mit Zitat antworten
Alt 09-06-2005, 16:38   #2 (permalink)
aufdemwegnachberlin
 
Benutzerbild von purewhite
 
Registriert seit: Jul 2004
Beiträge: 591
hi,
2 mc, 1= ausgabe, 2=ausgabe2:


button 1

on(release){
_root.ausgabe.gotoAndPlay(2);

// auf Frame 10 von ausgabe
_root.ausgabe2.gotoAndPlay(20);

// auf Frame 29 von ausgabe2
stop();

usw.
gruß
pw
purewhite ist offline   Mit Zitat antworten
Alt 09-06-2005, 16:51   #3 (permalink)
................
 
Benutzerbild von Der Frager
 
Registriert seit: Jun 2004
Beiträge: 15.890
Hi!
Hatte heute einen Patienten, der es ein wenig "komplizierter" wollte. Passt aber auch auf dein Problem:
ActionScript:
  1. this.B1.onRelease = function() {
  2.         _root.ausgabe.onEnterFrame = function() {
  3.                 this.nextFrame()
  4.                 this._currentframe == 10 ? this.gotoAndStop(19) : this._currentframe ==29? (this.stop(), delete this.onEnterFrame):0;
  5.         };
  6. };
  7. //
  8. this.B2.onRelease = function() {
  9.         _root.ausgabe.onEnterFrame = function() {
  10.                 this.nextFrame()
  11.                 this._currentframe == 10 ? this.gotoAndStop(29) : this._currentframe ==39? (this.stop(), delete this.onEnterFrame):0;
  12.         };
  13. };
  14. //
  15. this.B3.onRelease = function() {
  16.         _root.ausgabe.onEnterFrame = function() {
  17.                 this.nextFrame()
  18.                 this._currentframe == 10 ? this.gotoAndStop(39) : this._currentframe ==49? (this.stop(), delete this.onEnterFrame):0;
  19.         };
  20. };
__________________

ternärer Konditionaloperator

+++ Bitte keine Privat-Nachrichten bezüglich Flashfragen! +++
Der Frager ist offline   Mit Zitat antworten
Alt 09-06-2005, 17:29   #4 (permalink)
Neuer User
 
Registriert seit: Mar 2005
Beiträge: 105
Zitat:
Zitat von purewhite
hi,
2 mc, 1= ausgabe, 2=ausgabe2:


button 1

on(release){
_root.ausgabe.gotoAndPlay(2);

// auf Frame 10 von ausgabe
_root.ausgabe2.gotoAndPlay(20);

// auf Frame 29 von ausgabe2
stop();

usw.
gruß
pw


entweder stehe ich auf dem Schlauch oder Du hast Dich vertan...
wie gehts denn jetzt mit Button 2 weiter?
Souldelivery ist offline   Mit Zitat antworten
Alt 09-06-2005, 17:55   #5 (permalink)
................
 
Benutzerbild von Der Frager
 
Registriert seit: Jun 2004
Beiträge: 15.890
Hallo!
Mein Script funktioniert zwar eingentlich, aber habe es jetzt nochmal als Funktion gemacht...
ActionScript:
  1. function MC_Jumper(MC:Object, Jump1, Jump2, Ende) {
  2.     if (!running) {
  3.         running = true;
  4.         MC.gotoAndStop(1);
  5.         MC.onEnterFrame = function() {
  6.             this._currentframe == Jump1 ? this.gotoAndStop(Jump2) : this._currentframe == Ende ? (delete this.onEnterFrame, running=false) : 0;
  7.             this.nextFrame();
  8.         };
  9.     }
  10. }
  11. //
  12. this.B1.onRelease = function() {
  13.     MC_Jumper(_root.ausgabe, 10, 20, 29);
  14. };
  15. //
  16. this.B2.onRelease = function() {
  17.     MC_Jumper(_root.ausgabe, 10, 30, 29);
  18. };
  19. //
  20. this.B3.onRelease = function() {
  21.     MC_Jumper(_root.ausgabe, 10, 40, 49);
  22. };
Die Zahlen sind halt die Frames im MC... Viel Spaß!
__________________

ternärer Konditionaloperator

+++ Bitte keine Privat-Nachrichten bezüglich Flashfragen! +++

Geändert von Der Frager (10-06-2005 um 11:57 Uhr)
Der Frager ist offline   Mit Zitat antworten
Antwort

Lesezeichen

Themen-Optionen
Ansicht

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks sind an
Pingbacks sind an
Refbacks sind an



Alle Zeitangaben in WEZ +1. Es ist jetzt 19:52 Uhr.

Domains, Webhosting & Vserver von Host Europe
Unterstützt das Flashforum!
Adobe User Group


Copyright ©1999 – 2012 Marc Thiele