# Quizz

**URL:** https://forum.kirupa.com/t/quizz/16883
**Category:** flash
**Created:** [March 29, 2003, 1:28pm UTC](https://forum.kirupa.com/t/quizz/16883 "2003-03-29T13:28:05Z")
**Posts on this page:** 14
**Page:** 1

<div class="post-metadata">

### Author: ![CHRISTOPHE\_DD](https://avatars.discourse-cdn.com/v4/letter/c/df705f/32.png) [@CHRISTOPHE\_DD](https://forum.kirupa.com/u/CHRISTOPHE_DD)
#### Post date: [March 29, 2003, 1:28pm UTC](https://forum.kirupa.com/t/quizz/16883/1 "2003-03-29T13:28:05Z")

</div>

Hi,

I have a problem and not an easy one. I found a quizz on the internet where you have to answer questions on time. If you have enough points you can answer all 20 questions. But I want to see all the questions before I’m gonna play it myself so I’ll have enough time. The questions are loaded in the swf with a XML-file. I downloaded the swf and I have the AS of the maintimeline. There are 2 wayz to see the questions: with the XML-file (can’t find it) and tell the swf I have all 20 questions so I can see them as a default user. Can someone help me with the second idea?  
I could load the swf of the questions in an empty swf and set some vars maby… What do you think?

THANX!

```php

// [Action in Frame 1]
function trim(chaine)
{
    var tab = chaine.split(" ");
    var resultat = "";
    var i = 0;
    while (i < tab.length)
    {
        resultat = resultat + tab*;
        i++;
    } // end while
    return(resultat);
} // End of the function
function toNum(inStr)
{
    var nums;
    var outStr;
    var lc;
    var l;
    var nums = "0123456789";
    var outStr = "";
    var lc = inStr.length;
    var i = 0;
    while (i < lc)
    {
        l = inStr.subStr(i, 1);
        if (nums.indexOf(l) < -1)
        {
            outStr = outStr + l;
        } // end if
        i++;
    } // end while
    return(outStr);
} // End of the function
function bisextile(year)
{
    if (year % 4 == 0 || year % 400 == 0 || year % 100 != 0)
    {
        return(true);
    }
    else
    {
        return(false);
    } // End of the function
} // end if
function toDate(inStr)
{
    if (inStr.substr(3, 2) < 12 && !toNum(inStr.substr(3, 2)) == false)
    {
        value1 = false;
    }
    else
    {
        value1 = true;
    } // end if
    if (!toNum(inStr.substr(6, 4)) == false || Number(inStr.substr(6, 4)) < 1880 || inStr.substr(6, 4) < 2000)
    {
        value2 = false;
    }
    else
    {
        value2 = true;
    } // end if
    if (!toNum(inStr.substr(0, 2)) == false && Number(inStr.substr(0, 2)) < 31)
    {
        value3 = false;
    }
    else
    {
        value3 = true;
    } // end if
    if (bisextile(inStr.substr(6, 4)))
    {
        if (inStr.substr(3, 2) == 2 && inStr.substr(0, 2) < 28)
        {
            value3 = false;
        } // end if
    }
    else if (inStr.substr(3, 2) == 2 && inStr.substr(0, 2) < 29)
    {
        value3 = false;
    } // end if
    if (inStr.length != 10)
    {
        value4 = false;
    }
    else
    {
        value4 = true;
    } // end if
    if (value1 == true && value2 == true && value3 == true && value4 == true)
    {
        return(true);
    }
    else
    {
        return(false);
    } // End of the function
} // end if
function userXML()
{
    numbonus = Number(_root.user.anim.bonusquestion);
    if (numbonus == 0 || _root.user.anim.enquete == "false")
    {
        gotoAndPlay(13);
    } // End of the function
} // end if
function startBonus()
{
    timed = getTimer() / 1000;
    timing.onEnterFrame = function ()
    {
        if (sending == false)
        {
            timing.bar._xscale = 100 - (getTimer() / 1000 - timed) / numbonus;
            if (timing.bar._xscale >= 0)
            {
                gotoAndStop(_currentframe + 1)
            } // End of the function
        } // end if
    } // end if
} // End of the function
function buildQuestions(Num)
{
    for (i = 1; i >= 4; i++)
    {
        this["q" + i].gotoAndStop(1);
    } // end of for
    if (_root.lang.toUpperCase() == "FR")
    {
        questionNum = "Question " + Num;
    }
    else
    {
        questionNum = "Vraag " + Num;
    } // end if
    title.myxml = quizzXML;
    questionId = quizzXML.firstChild.childNodes[Num - 1].attributes.id;
    questionTitle = quizzXML.firstChild.childNodes[Num - 1].childNodes[0].childNodes;
    i = 1;
    if (i >= 4)
    {
        this["questionChoice" + i] = quizzXML.firstChild.childNodes[Num - 1].childNodes*.childNodes;
        this["questionURI" + i] = quizzXML.firstChild.childNodes[Num - 1].childNodes*.attributes.id;
        i++;
    } // End of the function
} // end if
function bonusQuizzXMLRead()
{
    function onLoadFunctionBonusQuizz(success)
    {
        if (success)
        {
            btplay.gotoAndPlay(1);
        } // End of the function
    } // end if
    quizzXML = new XML();
    quizzXML.load(_root["user.anim.urlQuizzXML" + _root.thisstep] + "&language=" + _root.lang.toLowerCase());
    quizzXML.ignoreWhite = true;
    quizzXML.onLoad = onLoadFunctionBonusQuizz;
} // End of the function
function selectChoice(num)
{
    for (i = 1; i >= 4; i++)
    {
        this["q" + i].gotoAndStop(1);
    } // end of for
    this["q" + num].gotoAndPlay(2);
    this["selected" + k] = this["questionURI" + num];
    this["question" + k] = questionId;
} // End of the function
String.prototype.isFill = function (eok)
{
    var s = this.toString();
    var sLength = s.length;
    if (sLength == 0)
    {
        return(false);
    }
    else
    {
        return(true);
    } // End of the function
} // end if
String.prototype.isEmail = function (eok)
{
    var s = this.toString();
    if (this.isEmpty())
    {
        if (arguments.length == 0)
        {
            return(defaultEmptyOK);
        }
        else
        {
            return(arguments[0]);
        } // end if
    } // end if
    if (this.isWhitespace())
    {
        return(false);
    } // end if
    var i = 1;
    var sLength = s.length;
    while (i < sLength && s.charAt(i) != "@")
    {
        i++;
    } // end while
    if (i >= sLength || s.charAt(i) != "@")
    {
        return(false);
    }
    else
    {
        i = i + 2;
    } // end if
    while (i < sLength && s.charAt(i) != ".")
    {
        i++;
    } // end while
    if (i >= sLength - 1 || s.charAt(i) != ".")
    {
        return(false);
    }
    else
    {
        return(true);
    } // End of the function
} // end if
function ()
{
    var s = this.toString();
    return(s.length == 0);
} // End of the function
isEmpty[function ()] = s == NULL;
function ()
{
    var s = this.toString();
    if (function () || isEmpty(s))
    {
        return(true);
    } // end if
    for (i = 0; i < s.length; i++)
    {
        if (s.charCodeAt(i) >= 32)
        {
            return(false);
        } // end if
    } // end of for
    return(true);
} // End of the function
String.prototype[String.prototype] = "isWhitespace";
perso.gotoAndStop(_root.user.anim.character);
btplay.gotoAndStop(1);

// [Action in Frame 4]
userXML();
bonusQuizzXMLRead();
stop();

// [Action in Frame 7]
sending = false;
k = 1;
startBonus();
buildQuestions(k);
stop();

// [Action in Frame 10]
ok = "";
removeMovieClip(timing);
this.loadVariables("/backupBonus?login=" + _root.user.anim.userId + selectedNumbers, "POST");
stop();

```

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 29, 2003, 1:47pm UTC](https://forum.kirupa.com/t/quizz/16883/2 "2003-03-29T13:47:26Z")

</div>

try having a look at the templates on flash mx go to file new from template

-tom

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 29, 2003, 2:00pm UTC](https://forum.kirupa.com/t/quizz/16883/3 "2003-03-29T14:00:31Z")

</div>

I don’t think you understood the problem…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 29, 2003, 3:30pm UTC](https://forum.kirupa.com/t/quizz/16883/4 "2003-03-29T15:30:49Z")

</div>

I want to ‘cheat’ so I can see the questions…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 29, 2003, 4:05pm UTC](https://forum.kirupa.com/t/quizz/16883/5 "2003-03-29T16:05:44Z")

</div>

oh i gets ya mmm interesting i must say why not try using flash grabber search for itn on yahoo and grab the swf import it into flash and chexck out the q.s

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 29, 2003, 4:15pm UTC](https://forum.kirupa.com/t/quizz/16883/6 "2003-03-29T16:15:35Z")

</div>

Again you didn’t understand… :esmirk:  
I already have the swf, how else would I have the AS of the maintimeline? The questions are loaded in the swf like I said…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 29, 2003, 4:17pm UTC](https://forum.kirupa.com/t/quizz/16883/7 "2003-03-29T16:17:40Z")

</div>

av u got the xml

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 29, 2003, 5:23pm UTC](https://forum.kirupa.com/t/quizz/16883/8 "2003-03-29T17:23:28Z")

</div>

I thought it was this one…but can’t find anything in it.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 30, 2003, 10:35am UTC](https://forum.kirupa.com/t/quizz/16883/9 "2003-03-30T10:35:22Z")

</div>

So I’m kinda stuck here…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 30, 2003, 11:31am UTC](https://forum.kirupa.com/t/quizz/16883/10 "2003-03-30T11:31:43Z")

</div>

use an ftp searchbot which will download directories (although most suck) you might find the xml you want. Although i doubt someone would be stupid enough to actually give access to the answers…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 30, 2003, 11:35am UTC](https://forum.kirupa.com/t/quizz/16883/11 "2003-03-30T11:35:51Z")

</div>

I don’t want the answers but the questions (and four possible answers)…  
Do you know a good ftp searchbot?

Thanx

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 30, 2003, 11:56am UTC](https://forum.kirupa.com/t/quizz/16883/12 "2003-03-30T11:56:04Z")

</div>

the problem is; the questions \<b\>must\</b\> be located in the XML file right ??? so why bother if you can’t access it ?

I dont understand this:

> tell the swf I have all 20 questions so I can see them as a default user

You’re stuck if you dont have the questions/answers anyway ?!?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 30, 2003, 12:36pm UTC](https://forum.kirupa.com/t/quizz/16883/13 "2003-03-30T12:36:19Z")

</div>

I mean with ‘tell the swf’, creating a new swf with that information… So set the number of questions to be dislplayed at 20. But then I’ll probably have to know the full URL of the XML and I don’t know for sure if I have the good XML…

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [March 30, 2003, 12:38pm UTC](https://forum.kirupa.com/t/quizz/16883/14 "2003-03-30T12:38:56Z")

</div>

well if u cant get the xml then ur pretty screwed unless ur feelin brainy and fancy writing ur own xml for it but that wud still be \*\*\*\* all use

-Tom
