Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 23-07-2003, 22:39   #1 (permalink)
...
 
Registriert seit: Oct 2002
Ort: Nürnberg
Beiträge: 3.611
functionen aus prototype heraus steuern

hi, ich suche eine moeglichkeit eine function (test()) aus einem prototype heraus zu steuern.
wie mache ich das am bloedsten?

mit der aktuellen version gehts nicht, da ja der functions-aufruf schon autom. erfolgt...
ActionScript:
  1. function test() {
  2.     trace("test");
  3. }
  4. MovieClip.prototype.btn_ctrl = function(name_fnc) {
  5.     this.onRollOver = function() {
  6.         this.gotoAndStop(2);
  7.     };
  8.     this.onRollOut = this.onReleaseOutside=function () {
  9.         this.gotoAndStop(1);
  10.     };
  11.     this.onPress = function() {
  12.         this.gotoAndStop(3);
  13.     };
  14.     this.onRelease = function() {
  15.         this.gotoAndStop(1);
  16.         name_fnc;
  17.     };
  18. };
  19. this.test_btn.btn_ctrl(test());
thorben.schmitt ist offline   Mit Zitat antworten
Alt 23-07-2003, 23:04   #2 (permalink)
_//\\#//\\_
 
Benutzerbild von warrantmaster
 
Registriert seit: Jan 2003
Beiträge: 7.060
ActionScript:
  1. function test() {
  2.         trace("test");
  3. }
  4. MovieClip.prototype.btn_ctrl = function(name_fnc) {
  5.         this.onRollOver = function() {
  6.                 this.gotoAndStop(2);
  7.         };
  8.         this.onRollOut = this.onReleaseOutside=function () {
  9.                 this.gotoAndStop(1);
  10.         };
  11.         this.onPress = function() {
  12.                 this.gotoAndStop(3);
  13.         };
  14.         this.onRelease = function() {
  15.                 this.gotoAndStop(1);
  16.                 name_fnc();
  17.         };
  18. };
  19. this.test_btn.btn_ctrl(test);

grz
warrantmaster ist offline   Mit Zitat antworten
Alt 24-07-2003, 20:01   #3 (permalink)
_//\\#//\\_
 
Benutzerbild von warrantmaster
 
Registriert seit: Jan 2003
Beiträge: 7.060
..hätte mich ja mal interessiert, ob das so ist, wie du meinst...?
warrantmaster ist offline   Mit Zitat antworten
Alt 25-07-2003, 08:52   #4 (permalink)
...
 
Registriert seit: Oct 2002
Ort: Nürnberg
Beiträge: 3.611
ups sorry, ja hat wunderbar funktioniert, big thx
thorben.schmitt 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 13:34 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele