Показать сообщение отдельно
Старый 03.01.2009, 19:39
AlexCooper вне форума Посмотреть профиль Отправить личное сообщение для AlexCooper Найти все сообщения от AlexCooper
  № 2  
Ответить с цитированием
AlexCooper
 
Аватар для AlexCooper

Регистрация: Sep 2008
Адрес: Черкассы
Сообщений: 1,167
Записей в блоге: 1
Отправить сообщение для AlexCooper с помощью ICQ Отправить сообщение для AlexCooper с помощью Skype™
Типизация ХМЛ

<?xml version="1.0" encoding="UTF-8"?>
<question1 id="3" Nname="Вопрос1"></question1>
<question2 id="3" Nname="Вопрос2"></question2>
...................
<question3 id="3" Nname="Вопрос3"></question3>

Код AS1/AS2:
index= new XML(); 
 
    index.load('http://путь/имя.xml');
 
    index.ignoreWhite=true;
 
    function razbor_xml (xml)
    {
 
        if (xml.status != 0)
        {
            trace ('XML документ содержит ошибку');
            return;
        }
 
        array = [];
        array = xml.childNodes;
 
        i=Math.round(Math.random()*array.length);
        DataXML= index.childNodes[i].attributes["Nname"];
    }
 
    index.onLoad = function ()
    {
        razbor_xml (index);
    };
Проверьте интервал Раднома.
__________________
return this...