4 Replies Latest reply on Jan 14, 2007 7:44 AM by nyran20

    Really simple flash problem

    nyran20
      Hi everyone. I'm almost near the end of my 'Studio 8 Training from the Source' book but I'm having a problem. If you have the book I'm on lesson 15 'a component-based flash quiz' under 'displaying the username dynamically.

      Go to http://www.allectomedia.com/dante/dante_quiz_login.cfm and put in an email address (it can be a fake one, makes no difference) which will then take you to the quiz questions.

      There's a flash document in there that's the 'unit quiz' and I'm having trouble with the 'Welcome (email address)'. It keeps calling my users 'undefined'. In the chapter the code that applies to this is ...

      var username:String;
      username_txt.text = username

      ...which should link to my their email address from the previous login screen, but it doesn't work! Can anyone help me?
        • 1. Re: Really simple flash problem
          Shandy Elliott Level 1
          Are you following a lesson while creating something yourself?

          1. Make sure you have an input textfield
          2. Make sure you have given that textfield an "instance name" of username_txt (make sure you haven't placed "usernam_txt" in the variable field

          Those are the only two things I can think of right off the bat that could be causing your problem
          • 2. Re: Really simple flash problem
            fanglinyong Level 1
            i think the error is that : in the stage u created a textedfield ,but u didn't give the textfield an "instance name", u should better give the textfield "instance name "as "usename_txt" ,the problem will be solved!
            • 3. Re: Really simple flash problem
              Shandy Elliott Level 1
              I love it when people repeat what I just said.
              • 4. Re: Really simple flash problem
                nyran20 Level 1
                That wasn't it :-(

                This question may be more complicated than I led on originally...the login page links to an external coldfusion database.

                If you go to the login and put your email it, it takes it from the login screen to the questions page on the top where it says 'you logged in as...' The flash document still calls the user 'undefined' though.

                My text field does have the proper name (username_txt) and in dreamweaver the flash document links to....

                flash/DANTE_QUIZ.swf?username=<cfoutput>#Form.username#</cfoutput>

                cfoutput comes from the login page...that code is....

                <cfform action="dante_quiz_questions.cfm" method="post" name="frm_login" preloader="no" format="flash" skin="halogreen">
                <cfinput type="text" name="username" label="Email" validateat="onSubmit" validate="email" required="yes" size="30">
                <cfinput type="submit" name="Submit" value="Submit"> </cfform></p>

                Any other ideas?