Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 06-07-2008, 17:55   #1 (permalink)
Neuer User
 
Registriert seit: Apr 2003
Beiträge: 230
GEht nicht??

PHP-Code:
var wurfrundegesamt
_root
.wurf 0;
_root.runde 0;
_root.gesamt 0;
_root.wuerfeln.onPress = function() {
    
_root.wurf Math.ceil(Math.random()*6);
    if(
_root.wurf==6){
        
_root.runde 0;
    }
    if(
_root.wurf<6){
        
_root.runde _root.runde _root.wurf;
    }
}
/*
function(dice) {
    _root.wurf = Math.ceil(Math.random()*6);
    if(_root.wurf==6){
        _root.runde = 0;
    }
    if(_root.wurf<6){
        _root.runde = _root.runde + _root.wurf;
    }
}*/
_root.wuerfeln.onPress dice;
_root.rundesichern.onPress = function() {
    
_root.gesamt _root.gesamt _root.runde;
    
_root.runde 0;


PHP-Code:
var wurfrundegesamt
_root
.wurf 0;
_root.runde 0;
_root.gesamt 0;
/*_root.wuerfeln.onPress = function() {
    _root.wurf = Math.ceil(Math.random()*6);
    if(_root.wurf==6){
        _root.runde = 0;
    }
    if(_root.wurf<6){
        _root.runde = _root.runde + _root.wurf;
    }
}*/

function(dice) {
    
_root.wurf Math.ceil(Math.random()*6);
    if(
_root.wurf==6){
        
_root.runde 0;
    }
    if(
_root.wurf<6){
        
_root.runde _root.runde _root.wurf;
    }
}
_root.wuerfeln.onPress dice;
_root.rundesichern.onPress = function() {
    
_root.gesamt _root.gesamt _root.runde;
    
_root.runde 0;

Real2k ist offline   Mit Zitat antworten
Alt 06-07-2008, 18:47   #2 (permalink)
undefined
 
Benutzerbild von mildesign
 
Registriert seit: Jul 2001
Ort: Stuttgart
Beiträge: 1.839
wenn die Funktion dice heissen soll schreibt man das so


PHP-Code:
function dice() { 
    
_root.wurf Math.ceil(Math.random()*6); 
    if(
_root.wurf==6){ 
        
_root.runde 0
    } 
    if(
_root.wurf<6){ 
        
_root.runde _root.runde _root.wurf
    } 

andernfalls ist dice der name eines parameters einer unbenannten Funktion
__________________
mfg Frank
mildesign ist offline   Mit Zitat antworten
Alt 06-07-2008, 18:53   #3 (permalink)
Der Wunderhund
 
Benutzerbild von gaspode
 
Registriert seit: Jun 2002
Ort: Hattingen
Beiträge: 10.515
Hier auch mal wieder ein Hinweis auf diesen Thread.

Bitte in Zukunft aussagekräftigere Titel als z.B: »geht nicht??« benutzen.

gruß, gaspode
gaspode ist offline   Mit Zitat antworten
Alt 06-07-2008, 20:08   #4 (permalink)
Neuer User
 
Registriert seit: Apr 2003
Beiträge: 230
hallo,
danke für die antworten, und sorry für den nichtssagenden titel. hatte es vorhin sehr eilig und musste dringend weg. konnte daher keinen "roman" schreiben und wollte die frage schonmal gestellt haben
aber danke auf jedenfall
Real2k 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 14:14 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele