Hello.
Am having difficulty using a flash form, I was wondering if you guys could help me out with it.
The form works fine if I use it directly but if I use it inside a movieclip or if I call it with a LoadMovie some of the forms features stop working.
The form has a Listener action which is as follows:
Snumero.restrict = "0-9";
Smessage.restrict = "0-9";
Sminutos.restrict = "0-9";
Ssubject.restrict = "0-9,/";
Sfuma.restrict = "a-z, ã";
// add the listener to the Key onj
k = new Object();
k.onKeyUp = function()
{
if(Sname.text != ''
&& Semail.text != ''
&& Ssubject.text != ''
&& Smessage.text != ''
&& Sminutos.text != ''
&& Snumero.text != ''
&& Sfuma.text != ''
)
{
// enable btn
sendMC.sendButton.enabled = true;
} else {
// diable
sendMC.sendButton.enabled = false;
}
}
Key.addListener(k);
// set starting status
// for SEND button
sendMC.sendButton.enabled = false;
// stop on current frame
stop();
And a text format action (which is what stops working):
// --------------------
// TextField Styles
// --------------------
normal_border = 0xCCCCCC
select_border = 0x000000
normal_background = 0xEEEEEE
select_background = 0xDDDDDD
normal_color = 0x999999
select_color = 0x666666
// ---------------------
// apply the style
// to every textfield
// ---------------------
function format_field(f)
{
for(var a in f)
{
f[a].border = true
f[a].borderColor = normal_border
f[a].background = true
f[a].backgroundColor = normal_background
f[a].textColor = normal_color
}
}
format_field([Sobs,Sname,Semail,Ssubject,Smessage,Sminutos,Sfuma,Snumero]);
// ---------------------
// define style change
// function for TXT
// ---------------------
TextField.prototype.onSetFocus = function()
{
this.borderColor = select_border
this.backgroundColor = select_background
this.textColor = select_color
}
TextField.prototype.onKillFocus = function()
{
this.borderColor = normal_border
this.backgroundColor = normal_background
this.textColor = normal_color
}
// set the starting focus selection
Selection.setFocus(Sname);
What Happens is that the text fields disappear and I cant type anything where they used to be.
Can anyone help me out? What am I doing wrong?
Thank you
Reply With Quote