Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 24-07-2006, 14:11   #1 (permalink)
Neuer User
 
Registriert seit: Aug 2002
Beiträge: 88
Unhappy as frage

hallo... jemand ne ahnung wie ich das script schlanker bekomm?



on (press) {
gotoAndStop (32);
_parent.attachMovie ("works", "works", 6);
_parent.works._x = 506;
_parent.works._y = 430;
_parent.works._alpha = 100;
_parent.start.onEnterFrame = function ()
{
this._alpha -= 5;
if (this._alpha <= 0)
{
this.removeMovieClip ();
}
};
_parent.profil.onEnterFrame = function ()
{
this._alpha -= 5;
this._parent;
if (this._alpha <= 0)
{
this.removeMovieClip ();
}
};
_parent.contact.onEnterFrame = function ()
{
this._alpha -= 5;
if (this._alpha <= 0)
{
this.removeMovieClip ();
}
};
_parent.welcome.onEnterFrame = function ()
{
this._alpha -= 5;
if (this._alpha <= 0)
{
this.removeMovieClip ();
}
};
}
andregoodtime ist offline   Mit Zitat antworten
Alt 24-07-2006, 14:40   #2 (permalink)
:Void
 
Benutzerbild von janoshnosh
 
Registriert seit: Jun 2005
Ort: börlin
Beiträge: 931
so vielleicht...
ActionScript:
  1. on (press) {
  2.     gotoAndStop (32);
  3.     _parent.attachMovie ("works", "works", 6);
  4.     _parent.works._x = 506;
  5.     _parent.works._y = 430;
  6.     _parent.works._alpha = 100;
  7.    
  8.     var arr = new Array (_parent.start, _parent.profil, _parent.contact, _parent.welcome);
  9.     apply (arr);
  10. }
  11.  
  12. function apply (array) {
  13.     for (var i=0; i<array.length; i++) {
  14.         fade_remove(array[i]);
  15.     }
  16. }
  17.  
  18. function fade_remove (mc) {
  19.     mc.onEnterFrame = function () {
  20.         this._alpha -= 5;
  21.         if (this._alpha <= 0) {
  22.             this.removeMovieClip ();
  23.         }
  24.     }
  25. }
gruß janosch
janoshnosh ist offline   Mit Zitat antworten
Alt 24-07-2006, 14:42   #3 (permalink)
Neuer User
 
Registriert seit: Aug 2002
Beiträge: 88
danke dir ;-) werd ich gleich mal testen!
andregoodtime ist offline   Mit Zitat antworten
Alt 24-07-2006, 14:54   #4 (permalink)
Neuer User
 
Registriert seit: Aug 2002
Beiträge: 88
das kommt bei mir... wo liegt der fehler???


**Fehler** Symbol=menue_auf, Ebene=Layer 3, Bild=30:Zeile 13: Anweisung muss innerhalb einer on-Prozedur vorliegen
function apply (array) {

**Fehler** Symbol=menue_auf, Ebene=Layer 3, Bild=30:Zeile 18: Anweisung muss innerhalb einer on-Prozedur vorliegen
function fade_remove (mc) {

Anzahl der ActionScript-Fehler: 2 Gemeldete Fehler: 2
andregoodtime ist offline   Mit Zitat antworten
Alt 24-07-2006, 15:07   #5 (permalink)
angry > always
 
Benutzerbild von ingohill
 
Registriert seit: Jul 2001
Ort: NRW
Beiträge: 1.635
die beiden functionen gehören auf die hzl, das event auf einen button.

-ingo
__________________

on air: caliban | neaera | heaven shall burn | hatebreed | the agony scene
ingohill ist offline   Mit Zitat antworten
Alt 24-07-2006, 15:24   #6 (permalink)
Neuer User
 
Registriert seit: Aug 2002
Beiträge: 88
danke funkt... kann man das ausfaden eigentlich noch
irgendwie beschleunigen?
andregoodtime ist offline   Mit Zitat antworten
Alt 24-07-2006, 15:26   #7 (permalink)
angry > always
 
Benutzerbild von ingohill
 
Registriert seit: Jul 2001
Ort: NRW
Beiträge: 1.635
sicher:
PHP-Code:

fade_out 
10;
function 
fade_remove (mc) {
    
mc.onEnterFrame = function () {
        
this._alpha -= fade_out;
        if (
this._alpha <= 0) {
            
this.removeMovieClip ();
        }
    }

jetzt einfach nur noch den wert fade_out verändern, je höher desto schneller ist das out-faden.

-ingo
__________________

on air: caliban | neaera | heaven shall burn | hatebreed | the agony scene
ingohill ist offline   Mit Zitat antworten
Alt 24-07-2006, 15:32   #8 (permalink)
Neuer User
 
Registriert seit: Aug 2002
Beiträge: 88
geil ;-) danke dir!
andregoodtime 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 12:14 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele