Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 08-03-2006, 11:50   #1 (permalink)
FMK
O.o rly ?!
 
Benutzerbild von FMK
 
Registriert seit: Oct 2005
Beiträge: 130
Scrip, Flash 7 tauglich machen !

Wen ich in meinem Tollen spiel mit diesem Script versuche es auf flash 7 zu exportieren bewegt sich mein ball nicht mehr ^^ ?!

Woran liegt das ?!

PHP-Code:
movieclip.prototype.jumpholder = function (divgravfaktorlinksrechtsobenuntenobj)
{
    
this [obj]._x;
    
this [obj]._y;
    
posy += (grav div);
    
+= (posx 10);
    
+= (posy 10);
    if (
oben)
    {
        
oben;
        
posx *= faktor;
        
posy = - (posy faktor);
    }if (
unten)
    {
        
unten;
        
posx *= faktor;
        
posy = - (posy faktor);
        
_root.gotoandstop (3);
    }if (
links)
    {
        
links;
        
posx = - (posx faktor);
        
posy *= faktor;
    }if (
rechts)
    {
        
rechts;
        
posx = - (posx faktor);
        
posy *= faktor;
    }
this [obj]._x x;
    
this [obj]._y y;
    if (
kick == 1)
    {
        
posx = (_xmouse) * 15;
        
posy = - 200 + (_ymouse);
        
kick 0;
    }
}; 
Vielen dank für die Antwort !

MFG
FMK
FMK ist offline   Mit Zitat antworten
Alt 08-03-2006, 12:12   #2 (permalink)
...
 
Benutzerbild von one2tim
 
Registriert seit: Jan 2005
Ort: Köln
Beiträge: 187
PHP-Code:
MovieClip
__________________
chris haslam & daewon song in cheese and crackers
part 1
part 2
ohne worte...
one2tim ist offline   Mit Zitat antworten
Alt 08-03-2006, 12:31   #3 (permalink)
agedoubleju
Gast
 
Beiträge: n/a
Flash 7 ist nicht nur case-sensitiv, unterscheidet also bei Bezeichnern in der Groß- und Kleinschreibung, sondern erwartet vor dem Inkrementieren/Dekrementieren von Werten einen Initialwert. posy += (grav / div); funzt also nur, wenn posy einen Wert hat, bspw. initialisiert mit posy = 0;
  Mit Zitat antworten
Alt 09-03-2006, 02:38   #4 (permalink)
Achim Math.PI
 
Benutzerbild von bloba
 
Registriert seit: Jul 2001
Ort: cool Colonia
Beiträge: 11.642
so in etwa
PHP-Code:
MovieClip.prototype.jumpholder = function(divgravfaktorlinksrechtsobenuntenobj) {
    
xp this[obj]._x;
    
yp this[obj]._y;
    
posy += (grav/div);
    
xp += (posx/10);
    
yp += (posy/10);
    if (
yp<oben) {
        
yp oben;
        
posx *= faktor;
        
posy = -(posy*faktor);
    }
    if (
yp>unten) {
        
yp unten;
        
posx *= faktor;
        
posy = -(posy*faktor);
        
this.gotoAndStop(3);
    }
    if (
xp<links) {
        
xp links;
        
posx = -(posx*faktor);
        
posy *= faktor;
    }
    if (
xp>rechts) {
        
xp rechts;
        
posx = -(posx*faktor);
        
posy *= faktor;
    }
    
this[obj]._x xp;
    
this[obj]._y yp;
    if (
kick == 1) {
        
posx = (xp-this._xmouse)*15;
        
posy = -200+(yp-this._ymouse);
        
kick 0;
    }
}; 
__________________
gruß bloba

2 x onkel² b_d
bloba 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 05:18 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele