Skip to main content
Participant
January 14, 2007
Question

Really simple flash problem

  • January 14, 2007
  • 2 replies
  • 248 views
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?
This topic has been closed for replies.

2 replies

fanglinyong
Inspiring
January 14, 2007
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!
January 14, 2007
I love it when people repeat what I just said.
nyran20Author
Participant
January 14, 2007
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?
January 14, 2007
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