Форум Flasher.ru

Форум Flasher.ru (http://www.flasher.ru/forum/index.php)
-   Action script 2.0 (http://www.flasher.ru/forum/forumdisplay.php?f=49)
-   -   Login/Password (http://www.flasher.ru/forum/showthread.php?t=59066)

Sanich™ 06.06.2004 22:31

Login/Password
 
Вот такая проблемка.
Код:

function loadFile() {
        _root.createEmptyMovieClip("holder", 1);
        sound_1 = new Sound(holder);
        sound_1.onLoad = function(success) {
                if (success) {
                        loadStatus.text = "The MP3 file has loaded.";
                } else {
                        loadStatus.text = "Invalid URL. Try again.";
                        clearInterval(checkProgress);
                }
        };
        sound_1.onSoundComplete = function() {
                loadStatus.text = "The MP3 file has finished playing.";
        };
        sound_1.loadSound(fileURL.text, true);
        loadStatus.text = "The MP3 file is loading.";
        checkProgress = setInterval(checkLoad, 50);
}
function checkLoad() {
        var obj = sound_1;
        var lBytes = obj.getBytesLoaded();
        var tBytes = obj.getBytesTotal();
        var percentLoaded = (lBytes/tBytes)*100;
        progressBar._xscale = percentLoaded;
        if (lBytes>=tBytes) {
                clearInterval(checkProgress);
        }
}

А если для файла нужен Login и Password?
Причем через WinXP обычный доступ.
Нельзя сразу в код вставить?

Geniot 08.06.2004 01:50

Просто получаешь от пользователя логин и пароль и приклеиваешь их в виде переменных к урлу (можно предварительно закодировать или постом). Перед тем как отдать файл проверяешь по базе данных.


Часовой пояс GMT +4, время: 13:13.

Copyright © 1999-2008 Flasher.ru. All rights reserved.
Работает на vBulletin®. Copyright ©2000 - 2026, Jelsoft Enterprises Ltd. Перевод: zCarot
Администрация сайта не несёт ответственности за любую предоставленную посетителями информацию. Подробнее см. Правила.