The forums have permanently moved to forum.kirupa.com. This forum will be kept around in read-only mode for archival purposes. To learn how to continue using your existing account on the new forums, check out this thread.


Results 1 to 14 of 14

Thread: Quizz

  1. #1

    Quizz

    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 Code:
    // [Action in Frame 1]
    function trim(chaine)
    {
        var 
    tab chaine.split(" ");
        var 
    resultat "";
        var 
    0;
        while (
    tab.length)
        {
            
    resultat resultat tab[i];
            
    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 
    0;
        while (
    lc)
        {
            
    inStr.subStr(i1);
            if (
    nums.indexOf(l) < -1)
            {
                
    outStr outStr l;
            } 
    // end if
            
    i++;
        } 
    // end while
        
    return(outStr);
    // End of the function
    function bisextile(year)
    {
        if (
    year == || year 400 == || year 100 != 0)
        {
            return(
    true);
        }
        else
        {
            return(
    false);
        } 
    // End of the function
    // end if
    function toDate(inStr)
    {
        if (
    inStr.substr(32) < 12 && !toNum(inStr.substr(32)) == false)
        {
            
    value1 false;
        }
        else
        {
            
    value1 true;
        } 
    // end if
        
    if (!toNum(inStr.substr(64)) == false || Number(inStr.substr(64)) < 1880 || inStr.substr(64) < 2000)
        {
            
    value2 false;
        }
        else
        {
            
    value2 true;
        } 
    // end if
        
    if (!toNum(inStr.substr(02)) == false && Number(inStr.substr(02)) < 31)
        {
            
    value3 false;
        }
        else
        {
            
    value3 true;
        } 
    // end if
        
    if (bisextile(inStr.substr(64)))
        {
            if (
    inStr.substr(32) == && inStr.substr(02) < 28)
            {
                
    value3 false;
            } 
    // end if
        
    }
        else if (
    inStr.substr(32) == && inStr.substr(02) < 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 == || _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 (
    1>= 4i++)
        {
            
    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;
        
    1;
        if (
    >= 4)
        {
            
    this["questionChoice" i] = quizzXML.firstChild.childNodes[Num 1].childNodes[i].childNodes;
            
    this["questionURI" i] = quizzXML.firstChild.childNodes[Num 1].childNodes[i].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 (
    1>= 4i++)
        {
            
    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 
    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 
    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 1;
        var 
    sLength s.length;
        while (
    sLength && s.charAt(i) != "@")
        {
            
    i++;
        } 
    // end while
        
    if (>= sLength || s.charAt(i) != "@")
        {
            return(
    false);
        }
        else
        {
            
    2;
        } 
    // end if
        
    while (sLength && s.charAt(i) != ".")
        {
            
    i++;
        } 
    // end while
        
    if (>= sLength || s.charAt(i) != ".")
        {
            return(
    false);
        }
        else
        {
            return(
    true);
        } 
    // End of the function
    // end if
    function ()
    {
        var 
    this.toString();
        return(
    s.length == 0);
    // End of the function
    isEmpty[function ()] = == NULL;
    function ()
    {
        var 
    this.toString();
        if (function () || 
    isEmpty(s))
        {
            return(
    true);
        } 
    // end if
        
    for (0s.lengthi++)
        {
            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;
    1;
    startBonus();
    buildQuestions(k);
    stop();

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

  2. #2
    novatake's Avatar
    530
    posts
    Little Drummer Boy
    try having a look at the templates on flash mx go to file new from template

    -tom

  3. #3
    I don't think you understood the problem...

  4. #4
    I want to 'cheat' so I can see the questions...

  5. #5
    novatake's Avatar
    530
    posts
    Little Drummer Boy
    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

  6. #6
    Again you didn't understand..
    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...

  7. #7
    novatake's Avatar
    530
    posts
    Little Drummer Boy
    av u got the xml

  8. #8
    I thought it was this one...but can't find anything in it.

  9. #9
    So I'm kinda stuck here...

  10. #10
    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....

  11. #11
    I don't want the answers but the questions (and four possible answers)...
    Do you know a good ftp searchbot?

    Thanx

  12. #12
    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 ?!?

  13. #13
    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...

  14. #14
    novatake's Avatar
    530
    posts
    Little Drummer Boy
    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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Home About kirupa.com Meet the Moderators Advertise

 Link to Us

 Credits

Copyright 1999 - 2012