Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 12-03-2005, 17:04   #1 (permalink)
class public{}
 
Benutzerbild von public
 
Registriert seit: Feb 2004
Ort: dessau
Beiträge: 1.406
typewriter mit Sound

Hab mir einen typwriter mit Sound gebaut.
Nun das Problem :

Ich möchte nicht das der Sound nach jedem durchlauf (i++) erklingt, sondern z.B. nach jedem vierten.
Wie macht man das?

PHP-Code:
MovieClip.prototype.typewriter = function(pTextFeldpSndpDeeppVolpSpeedpIntervalpInhalt) {
    var 
1;
    
this.createEmptyMovieClip("snd_mc"pDeep);
    var 
snd = new Sound(snd_mc);
    
snd.attachSound(pSnd);
    
snd.setVolume(pVol);
    function 
write() {
        if (
i<=pInhalt.length) {
            
snd.start(01);
            
pTextFeld.text pInhalt.substring(0i);
            
pTextFeld.scroll pTextFeld.maxscroll;
            
+= pSpeed;
            if (
i<=pInhalt.length) {
                
pTextFeld.text += "_";
            }
        } else if (
i>=pInhalt.length) {
            
clearInterval(ID);
            
pTextFeld.scroll 1;
            
removeMovieClip(snd_mc);
        }
    }
    var 
ID setInterval(writepInterval);
}; 

Ciao Public
public ist offline   Mit Zitat antworten
Alt 12-03-2005, 17:10   #2 (permalink)
agedoubleju
Gast
 
Beiträge: n/a
ActionScript:
  1. _global.re = 0;
  2.  MovieClip.prototype.typewriter...
  3. ...
  4.    function write() {
  5.         if (i<=pInhalt.length) {
  6.             if(_global.re == 3){
  7.                _global.re = 0;
  8.                snd.start(0, 1);
  9.              }
  10.              else{
  11.                 _global.re ++;
  12.              }
  13. ...
  Mit Zitat antworten
Alt 12-03-2005, 17:24   #3 (permalink)
class public{}
 
Benutzerbild von public
 
Registriert seit: Feb 2004
Ort: dessau
Beiträge: 1.406
Danke Schön!!!!!

Funktioniert.

Cioa Public
public 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 07:41 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele