Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 28-12-2003, 08:42   #1 (permalink)
Freelancer
 
Benutzerbild von komashooter
 
Registriert seit: Oct 2001
Ort: Germany - Berlin
Beiträge: 1.777
Exclamation Class namen trace

Wie kann ich den Class namen "day" tracen lassen ?

ActionScript:
  1. function day(mc) {
  2.     mc.__proto__ = this;
  3.     trace("Erstellung der Klasse day");
  4.     mc.onEnterFrame = function() {
  5.          //Cat.prototype.testing();
  6.         this.testing();
  7.         // trace(this.a);
  8.         delete this.onEnterFrame;
  9.         // Intervall Schaltung !
  10.     };
  11. }
  12. day.prototype.get_termine = function() {
  13.     trace("get_termine");
  14.     //
  15.     // laterZzzz ;)
  16.     if(day.termine == null){
  17.         this.set_termine();
  18.     }
  19.     //trace(day.termine);
  20.     status = day.termine;
  21.     return day.termine;
  22.     //Geht nicht weil verlauf beim Werte erhalten die  function get_termine aufruft ! ( endlosschleife )
  23.     //deswegen  muss man  return benutzen !
  24.     //this.verlauf = day.termine
  25. };
  26. day.prototype.set_termine = function() {
  27.     trace("set_termine");
  28.     day.termine = "segeln gehen";
  29.     this.set_wirkung();
  30. };
  31. day.prototype.set_wirkung = function() {
  32.     trace("set_wirkung !!!");
  33.     this.wirkung = "erholung";
  34. };
  35. day.prototype.getTitle = function() { 
  36.   return "Catcher in the Rye";
  37. }
  38. day.prototype.testing = function() { 
  39.   trace("called from "+this+" = day Klasse");
  40.   trace("name "+this._name);
  41.   if(this._name == undefined){
  42.       // How can i trace the Class name called "day" ?
  43.       trace("call from Object "+ _parent._parent._name);
  44.       }
  45. }
  46. day.prototype.addProperty("bookname", day.prototype.getTitle, null);
  47. day.prototype.addProperty("verlauf", day.prototype.get_termine, day.prototype.set_termine);
  48. this.createEmptyMovieClip ("Montag",1)
  49. Montag = new day(Montag);
  50. Montag.testing();
  51. order = Montag.bookname;
  52. trace("verlauf "+Montag.verlauf);
  53. trace("wirkung "+Montag.wirkung);

Geändert von komashooter (28-12-2003 um 08:43 Uhr)
komashooter ist offline   Mit Zitat antworten
Alt 28-12-2003, 08:55   #2 (permalink)
Freelancer
 
Benutzerbild von komashooter
 
Registriert seit: Oct 2001
Ort: Germany - Berlin
Beiträge: 1.777
ich hab nun eine Lösung gefunden ( Beweis: trace("call from Object "+this.namor());
- Trace: call from Object day) , vieleicht geht es aber doch noch besser.

day.prototype.namor = function() {
return "day";
}


geht das nicht besser ?

MovieClips haben ja auch _name als Variable


ActionScript:
  1. function day(mc) {
  2.     mc.__proto__ = this;
  3.     trace("Erstellung der Klasse day");
  4.     mc.onEnterFrame = function() {
  5.          //Cat.prototype.testing();
  6.         this.testing();
  7.         // trace(this.a);
  8.         delete this.onEnterFrame;
  9.         // Intervall Schaltung !
  10.     };
  11. }
  12. day.prototype.get_termine = function() {
  13.     trace("get_termine");
  14.     //
  15.     // laterZzzz ;)
  16.     if(day.termine == null){
  17.         this.set_termine();
  18.     }
  19.     //trace(day.termine);
  20.     status = day.termine;
  21.     return day.termine;
  22.     //Geht nicht weil verlauf beim Werte erhalten die  function get_termine aufruft ! ( endlosschleife )
  23.     //deswegen  muss man  return benutzen !
  24.     //this.verlauf = day.termine
  25. };
  26. day.prototype.set_termine = function() {
  27.     trace("set_termine");
  28.     day.termine = "segeln gehen";
  29.     this.set_wirkung();
  30. };
  31. day.prototype.set_wirkung = function() {
  32.     trace("set_wirkung !!!");
  33.     this.wirkung = "erholung";
  34. };
  35. day.prototype.getTitle = function() { 
  36.   return "Catcher in the Rye";
  37. }
  38. day.prototype.namor = function() { 
  39.   return "day";
  40. }
  41. day.prototype.testing = function() { 
  42.   trace("called from "+this+" = day Klasse");
  43.   trace("name "+this._name);
  44.   if(this._name == undefined){
  45.       // How can i trace the Class name called "day" ?
  46.       trace("call from Object "+this.namor());
  47.       }
  48. }
  49. day.prototype.addProperty("bookname", day.prototype.getTitle, null);
  50. day.prototype.addProperty("verlauf", day.prototype.get_termine, day.prototype.set_termine);
  51. this.createEmptyMovieClip ("Montag",1)
  52. Montag = new day(Montag);
  53. Montag.testing();
  54. order = Montag.bookname;
  55. trace("verlauf "+Montag.verlauf);
  56. trace("wirkung "+Montag.wirkung);

Geändert von komashooter (28-12-2003 um 09:02 Uhr)
komashooter 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 23:08 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele