PDA

Просмотр полной версии : Загрузка звука по HTTP!


Artyom from Kiev
16.03.2006, 20:53
Пмогите пожалуйста, кто с таким сталкивался
загружаю во флеш *.mp3
примерно таким образом:
var my_sound:Sound = new Sound();
my_sound.loadSound("http://192.0.0.40:8080/mus_shop/music_rep/1142288276773_5127373179318972910.mp3", true);

локально работает, а по HTTP не хочет..
помогите кто знает в чём проблема.. и вообще возможно ли это

может дело в настройках 8-го плэера? поделитесь как это побороть..

заранее благодарен.

PIRIS
16.03.2006, 22:44
изучи allowDomain

Antares
17.03.2006, 03:02
изучи allowDomain
Изучаем:

allowDomain (security.allowDomain method)
public static allowDomain(domain1:String) : Void

Lets SWF files and HTML files in the identified domains access objects and variables in the SWF file that contains the allowDomain() call.

If two SWF files are served from the same domain -- for example, http://mysite.com/movieA.swf and http://mysite.com/movieB.swf -- then movieA.swf can examine and modify variables, objects, properties, methods, and so on in movieB.swf, and movieB.swf can do the same for movieA.swf. This is called cross-movie scripting or simply cross-scripting.

If two SWF files are served from different domains -- for example, http://mysite.com/movieA.swf and http://othersite.com/movieB.swf -- then, by default, Flash Player does not allow movieA.swf to script movieB.swf, nor movieB.swf to script movieA.swf. A SWF file gives SWF files from other domains permission to script it by calling System.security.allowDomain(). This is called cross-domain scripting. By calling System.security.allowDomain("mysite.com"), movieB.swf gives movieA.swf permission to script movieB.swf.


И ни слова -- про обычную загрузку данных. Это к слову. При 8м плеере я бы советовал посмотреть, под сетевой сэндбокс ( Publish Settings > Access Network Only ) ли происходит публикация.