Zurück   Flashforum > Flash > ActionScript > ActionScript 1

Antwort
 
LinkBack Themen-Optionen Ansicht
Alt 23-09-2003, 10:41   #1 (permalink)
Sightgiver
 
Benutzerbild von Arator
 
Registriert seit: Aug 2001
Beiträge: 368
Question Sound Problem (mittelschwer)

HI!

Habe hier folgendes Problem. Ich hab 2 swf Files. Das eine dient nur dazu dem anderen Variablenwerte zu übergeben sobald es aufgerufen wird. Das sind ein Filename, eine Zahl, ein Funktionsname und noch eine Zahl. Alles per LocalConnection. Funzt..ist kein Problem.

Das anderes swf nimmt diese Zahlen pushed sie in das jeweilige Array und erstellt dann ein neues Sound Object und lädt das mp3 von dem es grad den fielnamen bekommen hat. Geht auch aber irgendwie kennt es die duration nicht.

Hier mal das Script:
1. swf:
ActionScript:
  1. Verbindung = new LocalConnection();
  2. Verbindung.send("container", "getData", m, v, f, l);
  3. Verbindung.close();

2.swf:
ActionScript:
  1. //local Connection und Arrays
  2. count = new Array();
  3. ma = new Array();
  4. va = new Array();
  5. fa = new Array();
  6. la = new Array();
  7. Verbindung2 = new LocalConnection();
  8. Verbindung2.getData = function(m, v, f, l) {
  9.     ma.push(m);
  10.     va.push(v);
  11.     fa.push(f);
  12.     la.push(l);
  13.     count.push(count.length);
  14.     playMP3(ma[ma.length-1], va[va.length-1], fa[fa.length-1], la[la.length-1]);
  15. };
  16. Verbindung2.connect("container");
  17. //Sound laden und abspielen
  18. playMP3 = function (m, v, f, l) {
  19.     location = m+".mp3";
  20.     _root["mySound"+count[count.length-1]] = new Sound(this);
  21.     _root["mySound"+count[count.length-1]].onLoad = function() {
  22.         this.start(0,l);
  23.         this.setVolume(v);
  24.         getURL ("javascript:"+f);
  25. trace (this.duration);
  26.     };
  27.     _root["mySound"+count[count.length-1]].loadSound(location, false);
  28. };
  29. stop();

Warum ist die duration nicht bekannt??
__________________
The issue is not whether you are paranoid. The issue is whether you are paranoid enough.
Arator ist offline   Mit Zitat antworten
Alt 23-09-2003, 15:55   #2 (permalink)
[Ernst Reiter]
 
Benutzerbild von Scrawer
 
Registriert seit: Jul 2001
Ort: austria
Beiträge: 3.691
tja.. ich denke da ist was verdreht

_root["mySound"+count[count.length-1]] = new Sound(this);

was ist this?
this sollte ja das ziel mc sein in deinem fall wäre das _root["mySound"+count[count.length-1]]

daher versuch mal
var snd = new Sound(_root["mySound"+count[count.length-1]]);
snd.start(0,l);
usw.....

kann mich nun aber auch auf die schnelle täuschen.. aber auf alle fälle hat es da was mit dem sound object und deinem container...
__________________
Das Gesetz des Lebens liegt im Notwendigen. Der Reiz des Lebens liegt im Überflüssigen
m.f.g Scrawer (www.thinkspace.at)
Scrawer 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:10 Uhr.

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


Copyright ©1999 – 2012 Marc Thiele