Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 25-05-2004, 08:30   #1 (permalink)
möchty
 
Registriert seit: Sep 2003
Ort: NA (Hessen)
Beiträge: 169
crossfading

hi, ich will in meine automatische bildergallerie ein crossfading script einbauen, aber kriege es leider nicht hin.

ich habe 2 mcs: imgbox1 und imgbox2
jedesmal wenn das script durchlaufen wird, sollen die beiden mcs crossfaden, beim ersten mal imgbox1 von alpha 100 auf 0 und imgbox2 umgekehrt (gleichzeitig), beim zweiten mal genau anders rum. Um zu bestimmen welcher mc der 'aktive' ist, bzw. von 100 auf 0 gefaded werden soll habe ich eine variable "aktiv" (entweder boolsche oder int. 1 / 2 )

könnt ihr mir da bitte am code helfen?

if (aktiv=1) {
for.... imgbox1 ausfaden, imgbox2 einfaden;
}

else {
for... imgbox2 ausfaden, imgbox1 einfaden;
}

danke schonmal im voraus für jede hilfe!

PS: per suche habe ich nur sehr komplizierte und komplexe übergreifende scripts dazu gefunden, ich brauche aber keinen schnickschnack, nur 'simples' faden.
abcde12345 ist offline   Mit Zitat antworten
Alt 25-05-2004, 09:07   #2 (permalink)
Phlasher
 
Benutzerbild von gerard
 
Registriert seit: Nov 2001
Ort: Unna-Königsborn (NRW)
Beiträge: 466
OK
ActionScript:
  1. if (aktiv) {
  2.  imgbox1.onEnterFrame=function(){
  3. if(this._alpha<=0){
  4. this.onEnterFrame=null
  5. }
  6. this._alpha-=5
  7.  
  8. }
  9.  imgbox2.onEnterFrame=function(){
  10. if(this._alpha>=100){
  11. this.onEnterFrame=null
  12. }
  13. this._alpha+=5
  14.  
  15. }
  16. ;
  17. }else{
  18.  imgbox2.onEnterFrame=function(){
  19. if(this._alpha<=0){
  20. this.onEnterFrame=null
  21. }
  22. this._alpha-=5
  23.  
  24. }
  25.  imgbox1.onEnterFrame=function(){
  26. if(this._alpha>=100){
  27. this.onEnterFrame=null
  28. }
  29. this._alpha+=5
  30.  
  31. }
  32. ;
  33. }
  34.  
  35.  
  36. }
__________________
Keep on Flashing
gerard ist offline   Mit Zitat antworten
Alt 25-05-2004, 17:43   #3 (permalink)
möchty
 
Registriert seit: Sep 2003
Ort: NA (Hessen)
Beiträge: 169
hey, vielen dank für deine antwort, weiss aber nich genau wie ich das in meinen code einbaue..

hier mein code bis jetzt (ohne fading):

ActionScript:
  1. this.onEnterFrame=function()
  2. {
  3.  i++;
  4.  if (i==wechseldauer)
  5.  {
  6.   if(aktiv)
  7.   {
  8.   imgbox1.attachMovie("bigbenmc"+current, "bigbenmc0", 1);
  9.   aktiv=false;
  10.   imgbox1._alpha=100;
  11.   imgbox2._alpha=0;
  12.   }
  13.   else
  14.   {
  15.   imgbox2.attachMovie("bigbenmc"+current, "bigbenmc0", 1);
  16.   aktiv=true;
  17.   imgbox1._alpha=0
  18.   imgbox2._alpha=100;
  19.   }
  20.       
  21.   current++; i=0;
  22.   if (current==anzahl+1) {current=1};
  23.  }
  24. }

funzt das denn wenn ich onEnterFrames verschachtel?? hat bei mir jedenfalls nich hineghaun
abcde12345 ist offline   Mit Zitat antworten
Alt 26-05-2004, 10:38   #4 (permalink)
möchty
 
Registriert seit: Sep 2003
Ort: NA (Hessen)
Beiträge: 169
hm.. kann mir da noch jemand sagen, wie ich den fade korrekt einbaue, mit dem onEnterFrame??? wie soll das gehen?
abcde12345 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:06 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele