Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 13-04-2005, 15:25   #1 (permalink)
Blitzuser
 
Registriert seit: Feb 2004
Beiträge: 468
Simple Alpha function will nicht

Hallo,

will jetzt endlich mal functions lernen:
habe in dem ersten frame:

HTML-Code:
function animation(alpha){
  this._alpha = alpha;
}
und einen MC mit dem as:
HTML-Code:
onClipEvent (load) {
	animation(25);
}
warum geht das nicht?
nxfxcom ist offline   Mit Zitat antworten
Alt 13-04-2005, 15:59   #2 (permalink)
Blitzuser
 
Registriert seit: Feb 2004
Beiträge: 468
Keiner ne idee?
nxfxcom ist offline   Mit Zitat antworten
Alt 13-04-2005, 16:21   #3 (permalink)
mod_rewrite
 
Benutzerbild von sonar
 
Registriert seit: Feb 2003
Ort: München
Beiträge: 15.621
Pfad zur Funktion!
ActionScript:
  1. onClipEvent (load) {
  2.     this._parent.animation (25);
  3. }
__________________
RTFM
Wie man Fragen richtig stellt.

Achim Bindannmalweg

Money makes the world go round, fear makes it turn much faster.
(New Model Army)
sonar ist offline   Mit Zitat antworten
Alt 13-04-2005, 16:28   #4 (permalink)
Blitzuser
 
Registriert seit: Feb 2004
Beiträge: 468
Danke,
aber jetzt ist alles auf der buehne alpha

>>
nxfxcom ist offline   Mit Zitat antworten
Alt 13-04-2005, 16:35   #5 (permalink)
Blitzuser
 
Registriert seit: Feb 2004
Beiträge: 468
OK now i do it that way:
ActionScript:
  1. stop();
  2. function animation(alpha,which){
  3.     var mc = which;
  4. mc._alpha = alpha;
  5. }
  6.  
  7. IMG_A.onLoad = function(){
  8.     animation(25,this);
  9. }

and it works

thx..
nxfxcom ist offline   Mit Zitat antworten
Alt 13-04-2005, 16:46   #6 (permalink)
Blitzuser
 
Registriert seit: Feb 2004
Beiträge: 468
Warum geht das nicht?
ActionScript:
  1. stop();
  2. function animation(which,alphas,alphae,alphaspeed){
  3. var mc = which;
  4. mc._alpha = alphas;
  5. mc.onEnterFrame = function(){
  6. mc._alpha += (mc.alphae-mc._alpha)/alphaspeed;
  7. }
  8. }
  9.  
  10. IMG_A.onLoad = function(){
  11.     animation(this,10,100,5);
  12. }
nxfxcom 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:59 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele