Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 16-01-2005, 20:06   #1 (permalink)
tracer
 
Benutzerbild von andretti
 
Registriert seit: Jun 2004
Beiträge: 4.415
createTextfield? zeit

Zitat:
Zitat von meldung
**Warnung** Szene=Szene 1, Ebene=action, Bild=3:Zeile 68: Der Bezeichner 'date', bei dem es nicht auf die Groß-/Kleinschreibung ankommt, verdeckt das integrierte Objekt 'Date'.
var date = myDate.getDate()<10 ? "0"+myDate.getDate() : myDate.getDate();

Anzahl der ActionScript-Fehler: 1 Gemeldete Fehler: 1
bekomme obenstehenden warnhinweis, wenn ich folgenden script in das _root eines filmes einbaue, bei dem aber sonst nix bzgl date oder time gescriptet ist;
wenn ich in einer neuen leeren fla das time script teste, dann habe ich diese meldung aber nicht........

hier der code inklusive timescript:
ActionScript:
  1. stop();
  2. ////////////********Tabulator-deactivate******///////////
  3. MovieClip.prototype.tabEnabled = false;
  4. ///////////**********header********/////////
  5. wert1 = .1;
  6. MC_waage.MC_balken.onEnterFrame = function() {
  7.     this._rotation += wert1;
  8.     this._rotation>=8 ? wert1=-.25 : 0;
  9.     this._rotation<=-8 ? wert1=.25 : 0;
  10. };
  11. //////////*******picHolder-MC*********////////////
  12. MC_mainHolder.loadMovie("home.swf");
  13. /////////*********active-MC********//////////////////
  14. MC_active.T_active.autoSize = "left";
  15. MC_active.T_active.text = "Home";
  16. /////////////******linkdefinition******///////////////////////
  17. MovieClip.prototype.link = function(pagename, input) {
  18.     this._alpha = 65;
  19.     this.T_linkname.text = pagename;
  20.     this.T_linkname.textColor = "0xCCCCCC";
  21.     this.onRollOver = function() {
  22.         this.T_linkname.textColor = "0xCCCC66";
  23.         this.onEnterFrame = function() {
  24.             this._alpha<=100 ? this._alpha += 12 : 0;
  25.         };
  26.     };
  27.     this.onRollOut = function() {
  28.         this.T_linkname.textColor = "0xCCCCCC";
  29.         this.onEnterFrame = function() {
  30.             this._alpha>=65 ? this._alpha -= 12 : 0;
  31.         };
  32.     };
  33.     this.onPress = function() {
  34.         //_root.MC_mainHolder.unloadMovie();
  35.         _root.MC_mainHolder.loadMovie(input);
  36.         this.T_linkname.textColor = "0xFFCC66";
  37.         /////***das T_active befüllen***/////
  38.         _root.MC_active.T_active.text = pagename;
  39.     };
  40. };
  41. ////////////////////////*******linkaufrufe*********//////////////////////////////////
  42. MC_home.link("Home", "home.swf");
  43. MC_kanzlei.link("Kanzlei");
  44. MC_aktuell.link("Aktuell");
  45. MC_service.link("Service");
  46. MC_jung.link("Jungunternehmer");
  47. MC_formulare.link("Formulare");
  48. MC_newsletter.link("Newsletter");
  49. MC_kontakt.link("Kontakt", "formmailer.swf");
  50. /////////////*********Copyright********////////////
  51. MC_copyright.T_copyright.autoSize = "left";
  52. MC_copyright.onPress = function() {
  53.     getURL("http://www.small-pages.at", "_blank");
  54. };
  55. /////////////*********Zeit_und_Datum********/////////
  56. _root.createTextField("T_time", 5, 20, 520, 65, 20);
  57. T_time.selectable = false;
  58. timeText = new TextFormat();
  59. timeText.font = "Verdana";
  60. timeText.align = "left";
  61. timeText.color = 0xFFFFFF;
  62. timeText.size = 11;
  63. T_time.setNewTextFormat(timeText);
  64. function showTime() {
  65.     time = setInterval(function () {
  66.         var myDate = new Date();
  67.         var year = myDate.getFullYear()<10 ? "0"+myDate.getFullYear() : myDate.getFullYear();
  68.         var date = myDate.getDate()<10 ? "0"+myDate.getDate() : myDate.getDate();
  69.         var month = myDate.getMonth()<10 ? "0"+myDate.getMonth() : myDate.getMonth();
  70.         var hours = myDate.getHours()<10 ? "0"+myDate.getHours() : myDate.getHours();
  71.         var minutes = myDate.getMinutes()<10 ? "0"+myDate.getMinutes() : myDate.getMinutes();
  72.         var seconds = myDate.getSeconds()<10 ? "0"+myDate.getSeconds() : myDate.getSeconds();
  73.         var milliseconds = myDate.getMilliseconds<10 ? "0"+myDate.getMilliseconds() : myDate.getMilliseconds();
  74.         T_time.text = hours+":"+minutes+":"+seconds;
  75.     }, 10);
  76. }
  77. showTime();
__________________
Viola per Sempre
Alle Angaben ohne Gewehr!
trace your open mind in variables !
andretti
ActionScript Dictionary
andretti ist offline   Mit Zitat antworten
Alt 16-01-2005, 20:12   #2 (permalink)
Neuer User
 
Benutzerbild von dr_gonzo
 
Registriert seit: Apr 2004
Ort: Pforzheim
Beiträge: 69
Hey

die Variable date ist eine Variable die ebenfalls Bestandteil der ActionScript Syntax ist. Um solche Überschneidungen zu vermeiden gibt dir der Compiler den Fehler aus.
nene die var date2 oder so

greetz seb
dr_gonzo ist offline   Mit Zitat antworten
Alt 16-01-2005, 20:34   #3 (permalink)
tracer
 
Benutzerbild von andretti
 
Registriert seit: Jun 2004
Beiträge: 4.415
oki, danke erstmal ;

aber schon ist das nächste prob da:

bei der datumsanzeige, die ich von folgendem thread habe:


hier

,habe ich den wahrscheinlich schon legendären "falsches-monat-effekt";

hier das angebotene script:

ActionScript:
  1. function showDate() {
  2.     time = setInterval(function () {
  3.         var myDate = new Date();
  4.         var year = myDate.getFullYear()<10 ? "0"+myDate.getFullYear() : myDate.getFullYear();
  5.         var date = myDate.getDate()<10 ? "0"+myDate.getDate() : myDate.getDate();
  6.         var month = myDate.getMonth()<10 ? "0"+myDate.getMonth() : myDate.getMonth();
  7.         var hours = myDate.getHours()<10 ? "0"+myDate.getHours() : myDate.getHours();
  8.         var minutes = myDate.getMinutes()<10 ? "0"+myDate.getMinutes() : myDate.getMinutes();
  9.         var seconds = myDate.getSeconds()<10 ? "0"+myDate.getSeconds() : myDate.getSeconds();
  10.         var milliseconds = myDate.getMilliseconds<10 ? "0"+myDate.getMilliseconds() : myDate.getMilliseconds();
  11.         T_datum.text = date+"."+month+"."+" "+year;
  12.     }, 10);
  13. }
  14. showDate();

um dies vorzubeugen, habe ich folgendermaßen getrickst:
ActionScript:
  1. var month = myDate.getMonth()<10 ? ""+myDate.getMonth()+1 : myDate.getMonth();//ist das konform....?
  2.  

habe ich da was falsch gemacht?

wie kann man das sonst umgehen bei diesem date-script?
__________________
Viola per Sempre
Alle Angaben ohne Gewehr!
trace your open mind in variables !
andretti
ActionScript Dictionary
andretti ist offline   Mit Zitat antworten
Alt 16-01-2005, 23:35   #4 (permalink)
querdenker
 
Benutzerbild von kelor
 
Registriert seit: Jun 2001
Ort: formel1-stadt hockenheim
Beiträge: 4.731
ActionScript:
  1. var month = (myDate.getMonth())+1;
  2. var month = month <10 ? "0"+month : month;





greetz

kelor
kelor ist offline   Mit Zitat antworten
Alt 17-01-2005, 06:26   #5 (permalink)
tracer
 
Benutzerbild von andretti
 
Registriert seit: Jun 2004
Beiträge: 4.415
Exclamation

thx, kelor;

spricht etwas gegen meine lösung?
__________________
Viola per Sempre
Alle Angaben ohne Gewehr!
trace your open mind in variables !
andretti
ActionScript Dictionary
andretti 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 03:05 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele