Flash CS5 text fields dissapearing
im experiencing some unusual behaviors in the flash IDE, im hoping someone
can evaluate the situation and give me some suggestions. Luckily for me i
keep backup copies of my game each time i add a new routine so i can
actually present the exact code and objects i added, the following is a
routine to install a public forum for my game, the only problem is
somewhere in my new objects or my code, something is causing some of my
text fields to be deleted each time i log back into flash causing some
significant errors. Newly added code:
public var feedbacktype:String = ""
public var tempstring:String = ""
public function clickedbug(e)
{
lobbysplash.thefeedbackwindow.feedbacktext.text = ""
_client.bigDB.load("PlayerObjects", "feedback",
function(thefeedbackkey){
lobbysplash.thefeedbackwindow.feedbacktext.text =
thefeedbackkey.bug})
feedbacktype = "bug"
}
public function clickedcomment(e)
{
lobbysplash.thefeedbackwindow.feedbacktext.text = ""
_client.bigDB.load("PlayerObjects", "feedback",
function(thefeedbackkey){
lobbysplash.thefeedbackwindow.feedbacktext.text =
thefeedbackkey.comment})
feedbacktype = "comment"
}
public function clickedsuggestion(e)
{
lobbysplash.thefeedbackwindow.feedbacktext.text = ""
_client.bigDB.load("PlayerObjects", "feedback",
function(thefeedbackkey){
lobbysplash.thefeedbackwindow.feedbacktext.text =
thefeedbackkey.suggestion})
feedbacktype = "suggestion"
}
public function clickedsubmitbtn(e)
{
_client.bigDB.load("PlayerObjects", "feedback",
function(thefeedbackkey){
if (feedbacktype == "bug")
{
tempstring = thefeedbackkey.bug
tempstring += "\n\n<" + profilename + "> " +
lobbysplash.thefeedbackwindow.feedbackinput.text
thefeedbackkey.bug = tempstring
thefeedbackkey.save()
lobbysplash.thefeedbackwindow.feedbacktext.text =
tempstring
lobbysplash.thefeedbackwindow.feedbackinput.text = ""
}
if (feedbacktype == "comment")
{
tempstring = thefeedbackkey.comment
tempstring += "\n\n<" + profilename + "> " +
lobbysplash.thefeedbackwindow.feedbackinput.text
thefeedbackkey.comment = tempstring
thefeedbackkey.save()
lobbysplash.thefeedbackwindow.feedbacktext.text =
tempstring
lobbysplash.thefeedbackwindow.feedbackinput.text = ""
}
if (feedbacktype == "suggestion")
{
tempstring = thefeedbackkey.suggestion
tempstring += "\n\n<" + profilename + "> " +
lobbysplash.thefeedbackwindow.feedbackinput.text
thefeedbackkey.suggestion = tempstring
thefeedbackkey.save()
lobbysplash.thefeedbackwindow.feedbacktext.text =
tempstring
lobbysplash.thefeedbackwindow.feedbackinput.text = ""
}
}) //End Load / Function
}
so whats going on here is it will clear the [Central TextArea] text and
load the database object, whos key is "feedback" and it is located on
database table "PlayerObjects". Feedback has three properties, one for
each of my 3 forums, the code here will instantly fetch any of the three
strings and display it to the [Central textArea]. the user can type into
the textInput AKA lobbysplash.thefeedbackwindow.feedbackinput.text, then
hit submit button, after which it will reload the database string (in the
event that someone else posted in the time u were writing) append the text
you put and save it to the database (one thing i want to point out that
you cant see here, is 'comment' one of my database key.strings, is
actually a reserved blue word, so since i use it as a variable, im not
sure if thats whats mucking things up)
and now as for the objects i added, preexistingly, i have the stage, with
a movieclip in it instanced called lobbysplash. In lobbysplash is another
movieclip instance called thefeedbackwindow, sometimes i toggle the
visible on/off from the properties window. within this movieclip are many
more movieclips {bug comment suggestion aboutMe submit close} and also one
textarea {feedbacktext} and the textinput {feedbackinput} each of the 5
movieclips are strait forward, they have a click listener, and contained
within is a colored non-primative rectangle, and on top of that is a
static text field with the formentioned words written over the rectangle
so anyways this code ran well enough and there was successful forum
updating, feeling content with my success i went and saved a copy and
reloaded the flash center, my login name and password fields were missing,
thinking i had hit a bad key combination messing something up i reverted
back to an older copy, and copy pasted the feedbackwindow back in the
library, now the first time it took and i could run the program but on the
launch the textfields were missing in-game on coming out of my run i saw
the text fields were indeed missing again, so i closed the program and
relaunched it and low and behold the fields were still missing, after that
botched run i tried to repeat that process and now flash just chokes
everytime i try to import that movie... not really sure whats going on,
kinda thinking that 'comment' word wouldnt have much impact, i think it
has more to do with textfield / movieclip behavior bugs, would love some
input
No comments:
Post a Comment