Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 10-02-2005, 20:50   #1 (permalink)
tracer
 
Benutzerbild von andretti
 
Registriert seit: Jun 2004
Beiträge: 4.415
ein created mc in variable ansprechen...

ich habe von hier im forum dieses wirklich wunderbare fade-in-fade-out script, auf reiner AS-Basis;nun stellt mich das aber vor ein problem:


wie(kann ich überhaupt) spreche ich dieses per AS erstellte mc an? ich möchte/muss einen rollOver mit copyright einbauen;

es funzt momentan funzt aber auch nicht so, wie sich das der kleine andreas so vorstellt , siehe script...._x & _y kann ich verändern, aber rollOver oder so is nix....
ActionScript:
  1. var tl = this;
  2. var fadespeed = 5;
  3. var bildanzahl = 3;
  4. _global.old_conti;
  5. _global.ct = 1;
  6. function reload_x() {
  7.     clearInterval(SID);
  8.     tl.createEmptyMovieClip("container"+ct, ct+10);
  9.     tl["container"+ct]._x = 1;//das ist von mir
  10.              tl["container"+ct]._y = 1;//das ist von mir
  11.     //**rollOver-rollOut**///ab da auch von mir
  12.     tl["container"+ct].onRollover = function() {
  13.     _root.copyright._visible = true;
  14.     };
  15.     tl["container"+ct].onRollout = function() {
  16.     _root.copyright._visible = false;
  17.     };//wieder normal
  18.     tl["container"+ct].loadMovie("pan"+ct+".jpg");
  19.     tl["container"+ct]._alpha = 0;
  20.     this.loader_funk = function() {
  21.         if (tl["container"+ct].getBytesLoaded()>=4) {
  22.             gesamt = tl["container"+ct].getBytesTotal();
  23.             bereits = tl["container"+ct].getBytesLoaded();
  24.             prozent = Math.ceil((bereits/gesamt)*100);
  25.             if (prozent>=100) {
  26.                 tl["container"+ct]._alpha += fadespeed;
  27.                 old_conti._alpha -= fadespeed;
  28.                 if (tl["container"+ct]._alpha>=100 && old_conti._alpha<=0) {
  29.                     old_conti.unloadMovie();
  30.                     _global.old_conti = tl["container"+ct];
  31.                     clearInterval(loadID);
  32.                     _global.ct++;
  33.                     SID = setInterval(reload_x, 10000);
  34.                 }
  35.                 if (ct == (bildanzahl+1)) {
  36.                     _global.ct = 1;
  37.                 }
  38.             }
  39.         }
  40.     };
  41.     loadID = setInterval(loader_funk, 40);
  42. }
  43. reload_x();
__________________
Viola per Sempre
Alle Angaben ohne Gewehr!
trace your open mind in variables !
andretti
ActionScript Dictionary

Geändert von andretti (11-02-2005 um 05:52 Uhr)
andretti ist offline   Mit Zitat antworten
Alt 10-02-2005, 21:02   #2 (permalink)
front.pictures
 
Registriert seit: Oct 2004
Ort: hier ;-)
Beiträge: 17
Cool hm, eigentlich...

Hallo andretti,

eigentlich reicht es aus, wenn Du das MC mit _root["container"+ct] ansprichst. Werden mehrere MC's erstellt, musst Du Dir entweder die entsprechende Zählvariable (hier ct) 'merken' oder, mit einer Zählschleife bei Bedarf alle MC's der Reihe nach...

Tschü
Peter
peter_k ist offline   Mit Zitat antworten
Alt 10-02-2005, 21:10   #3 (permalink)
tracer
 
Benutzerbild von andretti
 
Registriert seit: Jun 2004
Beiträge: 4.415
hallo, peter_k;

funganiert leider nicht;
momenatane notlösung:
ActionScript:
  1. _root.attachMovie("copyright1", "copyright1", 50, {_x:672, _y:1});
  2. _root.copyright1.onEnterFrame = function() {
  3.     if (_root._xmouse>=0 && _root._xmouse<=750 && _root._ymouse>=0 && _root._ymouse<=80) {
  4.         this._visible = true;
  5.     } else {
  6.         this._visible = false;
  7.     }
  8. };
__________________
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 06:46 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele