Selection.SetFocus

I make a shape with 6 layers, 1 question. Basically, 2.  button, 3. text, 4. text of entry... etc... The questionnaire takes several frames and depending on the response, I will in another frame gotoAndPlay (). I verify that the fields are ok with a message in my statut_txt.text. When I start my movie and I click on the button (btn1), the first entry fields texte_prenom becomes dark, done by an action function and Selection.setFocus and it works but when I click on another area that I finished and I click on the button, I made a mistake in the texte_prenom of the fields is empty, I can answer in my status that says full name , but the text of entry this time texte_prenom of the input fields become dark and I can't leave the order entry I've been with the mouse... Problem with cursor, AS2

Btn1.onRelease = function() {}

texte_prenom = texte_prenom.text;
texte_nom = texte_nom.text;

If (texte_prenom.length == 0) {}
Selection.setFocus ("texte_prenom");
var text_font:Number = 0xef1005;
status_txt. TextColor = text_font;
status_txt. Text = "* register a name!"
}
Else if (texte_nom.length == 0) {}
Selection.setFocus ("texte_nom");
var text_font:Number = 0xef1005;
status_txt. TextColor = text_font;
status_txt. Text = "* register a name!" }

else {}
If (ComboBox1_txt.text == 'bungalow' & & ComboBox2_txt.text == 'no') {gotoAndPlay (2);}
}


Anyone have idea?

If you think that works very well but is not flash.  After you do this, you try to set the focus on a string.

Tags: Adobe Animate

Similar Questions

  • Selection.setFocus and HTML

    When publishing in HTML, I can't focus on my text entry box.

    You use Selection.setFocus in action script and Transparent windowless Mode Windows in the publishing settings, I'm able to get a flashing cursor, but I still have to click on the screen to allow a keyboard input.

    It works fine when I open it as a swf file, but not when I open embedded in an HTML file. I read that it is a problem that must be fixed in HTML, but I have not found the solution. Any suggestions?

    Thank you

    Thanks for your help.

    For Internet Explorer goto http://kb.adobe.com/selfservice/viewContent.do?externalId=tn_15586 for the solution.

    For Firefox, it is much more complicated. Goto http://wwwx.cs.unc.edu/~gb/wp/blog/2007/06/08/fixing-firefox-flash-foolishness/

    I have not yet tried the solution for Firefox

  • setFocus

    I have 4 (ab0, ab1, ab2 and ab3) text entry fields. How to write the code to jump to the next text box after the user types 3 charactors?

    _root. AB0. OnChanged = function() {}
    {if (_root. AB0. Text.Length is 3)}
    Selection.setFocus ("_root.ab1")
    }
    }

    var host: MovieClip = this;

    var numFields:Number = 4;

    for (var i = 0; i)<>

    var tf:TextField = host ["ab" + i];

    tf.myID = i;

    tf.onChanged = handleChange;

    }

    function handleChange() {}

    {if (this.) (Text.Length>=3)}

    Selection.setFocus(home["ab"+((this.myID+1)%numFields)]);

    }

    }

  • Text box makes the text in HTML format... stop!

    Hello

    I use AS 2 with Flash CS5.

    Every year in my teaching of interactivity in Flash, we get a few students who are unable to do this simple calculator to work. I have included the code to show you what we do.

    The problem is that the text boxes, rather than return a number, returns the HTML code. You can see the problem when you draw the 'response' output in the output window.

    We checked that "render text as HTML" is not clicked. I would really like to hear a resolution - maybe I can do that a better way! It seems if simple, yet he always causing trouble. I add that I do not see why it does?

    I would appreciate any advice.

    Stop();

    var a: number = Math.round (Math.random () * 10);

    var b:Number = Math.round (Math.random () * 10);

    var score: Number = 0;

    var sndTrack:Sound = new Sound();

    var sndTrack2:Sound = new Sound();

    trace(a+b);

    check_btn.onRelease = function (): Void {}

    trace (response);

    If (Number (answer)! = (a + b))

    {

    e = ("Sorry, the answer has been" + (a + b));

    sndTrack2.attachSound ("gasp");

    sndTrack2.start ();

    }

    on the other

    {

    e = ("well done, the answer was correct" + (a + b));

    sndTrack.attachSound ("clap");

    sndTrack.start ();

    Note ++;

    }

    }

    next_btn.onRelease = function (): Void {}

    e = "";

    response ="";

    a = Math.round (Math.random () * 10);

    b = Math.round (Math.random () * 10);

    Selection.setFocus ("answer");

    }

    Oh, you're not made of text.

    You must use the variable property of the textfield object.  which is the origin of the problem; You should never use that.  Use the text property of the textfield object.

  • RadioButton, Index tab

    Hello

    I would like to know how to set the tabIndex for the RadioButton to a same group.

    Kind regards

    Philippe

    Assign your first radiobutton a tab order (for example, firstTI) and an invisible button (for example, btn) the tab following the index (firstTI + 1), then if your radiobuttons have instance names rb1, rb2 etc, you can use:

    var tl:MovieClip =;

    var: index number = 0;

    RB1. TabIndex = firstTI;

    btn.tabIndex = firstTI + 1;

    var OL: Object = new Object();

    lo.onSetFocus = function (a, n) {}

    {if(NF._name=="BTN")}

    index = (index + 1) %yourradiobutton.number;

    Selection.setFocus (tl ["rb" + (index + firstTI)]);

    }

    };

    Selection.addListener (lo);

  • How to pass values from one function to the other

    Hello

    I am a school teacher and a beginner in Flash Actionscript. I am creating a countdown for use in my classroom during testing. The beginning and break according to need, but not the pause button functions. When I click on the pause button, the timer is reset to 0:00:00. Help, please. Here is the code that I had written so far:

    var Subject1timeLeftHr;

    var Subject1timeLeftMin;

    var Subject1timeLeftSec;

    Subject1start_btn._visible = true;

    Subject1pause_btn._visible = false;

    Subject1rotor_mc.gotoAndStop (1);

    Subject1rotor_mc._visible = false;

    Subject1durationHr_txt. Text = "0";

    Subject1durationMin_txt. Text = "00";

    Subject1durationSec_txt. Text = "00";

    Selection.setFocus (Subject1durationHr_txt);

    function SubjectdurationHr (SubjectxdurationHr_txt, SubjectxdurationMin_txt)

    {

    if (SubjectxdurationHr_txt.length == 1)

    {

    Selection.setFocus (SubjectxdurationMin_txt);

    }

    }

    function SubjectdurationMin (SubjectxdurationMin_txt, SubjectxdurationSec_txt)

    {

    if (SubjectxdurationMin_txt.length == 2)

    {

    Selection.setFocus (SubjectxdurationSec_txt);

    }

    }

    function SubjectdurationSec (SubjectxdurationSec_txt, SubjectxdurationHr_txt)

    {

    if (SubjectxdurationSec_txt.length == 2)

    {

    Selection.setFocus (SubjectxdurationHr_txt);

    }

    }

    Subject1durationHr_txt. OnChanged = function()

    {

    SubjectdurationHr (Subject1durationHr_txt, Subject1durationMin_txt);

    };

    Subject1durationMin_txt. OnChanged = function()

    {

    SubjectdurationMin (Subject1durationMin_txt, Subject1durationSec_txt);

    };

    Subject1durationSec_txt. OnChanged = function()

    {

    SubjectdurationSec (Subject1durationSec_txt, Subject1durationHr_txt);

    };

    function startcountdown (SubjectxdurationLeft, SubjectxdurationHr, SubjectxdurationHr_txt, SubjectxdurationMin, SubjectxdurationMin_txt, SubjectxdurationSec, SubjectxdurationSec_txt, Subjectxduration, SubjectxstartTime, SubjectxendTime, Subjectxtimer_mc, Subjectxpause_btn, Subjectxstart_btn, Subjectxrotor_mc, SubjectxtimeLeft, SubjectxtimeLeftHr, SubjectxtimeLeftMin, SubjectxtimeLeftSec, SubjectxtimeLeftHr_txt, SubjectxtimeLeftMin_txt, SubjectxtimeLeftSec_txt)

    {

    delete SubjectxdurationLeft;

    delete SubjectxdurationHr;

    delete SubjectxdurationMin;

    delete SubjectxdurationSec;

    delete Subjectxduration;

    delete SubjectxdurationHr_txt.text;

    delete SubjectxdurationMin_txt.text;

    delete SubjectxdurationSec_txt.text;

    SubjectxstartTime = getTimer();

    Subjectxtimer_mc.onEnterFrame = function()

    {

    if (SubjectxdurationHr_txt.text == Nan |) SubjectxdurationMin_txt.text == Nan | SubjectxdurationSec_txt.text is Nan)

    {

    }

    else

    {

    SubjectxdurationHr = 60 * 60 * 1000 * Number (SubjectxdurationHr_txt.text).

    SubjectxdurationMin = 60 * 1000 * Number (SubjectxdurationMin_txt.text).

    SubjectxdurationSec = 1000 * Number (SubjectxdurationSec_txt.text).

    Subjectxduration = SubjectxdurationHr + SubjectxdurationMin + SubjectxdurationSec;

    SubjectxendTime = SubjectxstartTime + Subjectxduration;

    SubjectxdurationLeft = SubjectxendTime - getTimer();

    if (SubjectxdurationLeft > 0)

    {

    SubjectxdurationHr_txt._visible = false;

    SubjectxdurationMin_txt._visible = false;

    SubjectxdurationSec_txt._visible = false;

    Subjectxpause_btn._visible = true;

    Subjectxstart_btn._visible = false;

    Subjectxrotor_mc._visible = true;

    Subjectxrotor_mc.play ();

    SubjectxtimeLeft = SubjectxdurationLeft / (1000 * 60 * 60);

    SubjectxtimeLeftHr = Math.floor (SubjectxtimeLeft);

    SubjectxtimeLeftMin = Math.floor ((SubjectxtimeLeft-SubjectxtimeLeftHr) * 60);

    SubjectxtimeLeftSec = Math.floor (((SubjectxtimeLeft-SubjectxtimeLeftHr) * 60 - SubjectxtimeLeftMin) * 60);

    SubjectxtimeLeftHr_txt.text = String (SubjectxtimeLeftHr);

    if (SubjectxtimeLeftHr_txt.length < 1)

    {

    SubjectxtimeLeftHr_txt.text = '0' + SubjectxtimeLeftHr_txt.text;

    }

    SubjectxtimeLeftMin_txt.text = String (SubjectxtimeLeftMin);

    if (SubjectxtimeLeftMin_txt.length < 2)

    {

    SubjectxtimeLeftMin_txt.text = '0' + SubjectxtimeLeftMin_txt.text;

    }

    SubjectxtimeLeftSec_txt.text = String (SubjectxtimeLeftSec);

    if (SubjectxtimeLeftSec_txt.length < 2)

    {

    SubjectxtimeLeftSec_txt.text = '0' + SubjectxtimeLeftSec_txt.text;

    }

    }

    else

    {

    delete Subjectxtimer_mc.onEnterFrame;

    SubjectxtimeLeftHr_txt.text = "";

    SubjectxtimeLeftMin_txt.text = "";

    SubjectxtimeLeftSec_txt.text = "";

    SubjectxdurationHr_txt._visible = true;

    SubjectxdurationMin_txt._visible = true;

    SubjectxdurationSec_txt._visible = true;

    Subjectxrotor_mc.gotoAndStop (1);

    Subjectxrotor_mc._visible = false;

    SubjectxdurationHr_txt.text = '0 '.

    SubjectxdurationMin_txt.text = "00";

    SubjectxdurationSec_txt.text = "00";

    Subjectxpause_btn._visible = false;

    Subjectxstart_btn._visible = true;

    Selection.setFocus (SubjectxdurationHr_txt);

    }

    }

    };

    }

    function pausecountdown (SubjectxdurationHr_txt, SubjectxtimeLeftHr, SubjectxdurationMin_txt, SubjectxtimeLeftMin, SubjectxdurationSec_txt, SubjectxtimeLeftSec, Subjectxstart_btn, Subjectxpause_btn, Subjectxrotor_mc)

    {

    delete Subjectxtimer_mc.onEnterFrame;

    SubjectxdurationHr_txt.text = String (SubjectxtimeLeftHr);

    SubjectxdurationMin_txt.text = String (SubjectxtimeLeftMin);

    SubjectxdurationSec_txt.text = String (SubjectxtimeLeftSec);

    Subjectxstart_btn._visible = true;

    Subjectxpause_btn._visible = false;

    Subjectxrotor_mc.stop ();

    }

    Subject1pause_btn.onRelease = function()

    {

    pausecountdown (Subject1durationHr_txt, Subject1timeLeftHr, Subject1durationMin_txt, Subject1t, imeLeftMin, Subject1durationSec_txt, Subject1timeLeftSec, Subject1start_btn, Subject1pause_btn, Subject1rotor_mc);

    };

    Subject1start_btn.onRelease = function()

    {

    startcountdown (Subject1durationLeft, Subject1durationHr, Subject1durationHr_txt, Subject1dura, tionMin, Subject1durationMin_txt, Subject1durationSec, Subject1durationSec_txt, Subject1durati, Subject1startTime, Subject1endTime, Subject1timer_mc, Subject1pause_btn, Subject1start_btn, Subject1rotor_mc, Subject1timeLeft, Subject1timeLeftHr, Subject1timeLeftMin, Subject1timeLeftS ec, Subject1timeLeftHr_txt, Subject1timeLeftMin_txt, Subject1timeLeftSec_txt);

    };

    Subject1cancel_btn.onRelease = function()

    {

    Subject1timeLeftHr_txt.text = "";

    Subject1timeLeftMin_txt.text = "";

    Subject1timeLeftSec_txt.text = "";

    Subject1durationHr_txt._visible = true;

    Subject1durationMin_txt._visible = true;

    Subject1durationSec_txt._visible = true;

    Subject1durationHr_txt.text = '0 '.

    Subject1durationMin_txt.text = "00";

    Subject1durationSec_txt.text = "00";

    Subject1timeLeftHr_txt._visible = true;

    Subject1timeLeftMin_txt._visible = true;

    Subject1timeLeftSec_txt._visible = true;

    Subject1pause_btn._visible = false;

    Subject1start_btn._visible = true;

    Subject1rotor_mc._visible = false;

    Subject1rotor_mc.gotoAndStop (1);

    delete Subject1timer_mc.onEnterFrame;

    delete Subject1durationLeft;

    delete Subject1duration;

    delete Subject1durationHr_txt.text;

    delete Subject1durationMin_txt.text;

    delete Subject1durationSec_txt.text;

    };

    I think you need to spend time by reducing your code at a practical level.  You seem to be any passage in the book in each function and I think that probably none of this is necessary.  If you have declared these variables at the beginning, then you don't need to transfer them to any function, because they are gobally available to one of the functions/code that follows.  Similarly, if you have some textfields on stage, it is pointless to pass those in all functions for the same reason.

    I see you doing the overuse of 'delete' (and possibly errant use as well).  Is probably the only thing you might want or need to use...

    delete Subjectxtimer_mc.onEnterFrame;

    Which stops the enterframe trigger activity, which I think is used to update the textfields which indicate the time.

    And that conditional uses == Nan is not likely to do anything except wonder what is a Nan.  TextFields hold the strings, which are cited.  SO unless you have a variable named Nan somewhere that has a value of string assigned to her, this condition will do nothing for you.  You probably don't need it at all if you get this working properly.

  • follow-up to movieclip

    Hello, im doing a FlashLite 2.1, now have after the code.

    Stop();
    FSCommand2 ("SetSoftKeys", "", "Quit");

    Key.removeListener (myListener);

    var myListener:Object = new Object ();
    myListener.onKeyDown = function)
    {
    var keyCode = Key.getCode ();
    If (keyCode is ExtendedKey.SOFT2)
    {
    gotoAndStop ("Quit");
    }
    };

    Key.addListener (myListener);

    Tower of Red charge
    turn = "red";
    buildboard();
    var ball: number;

    set focus on s_1 redzone_mc

    // user only can access on the redzone only not blue. upward only.

    If (turn == 'red')
    {
    Selection.setFocus (s_1);
    s_7.enabled = false;
    s_8.enabled = false;
    s_9.enabled = false;
    s_10.enabled = false;
    S_11.enabled = false;
    s_12.enabled = false;
    }
    ElseIf (turn == 'blue')
    {
    Selection.setFocus (s_7);
    s_1.enabled = false;
    s_2.enabled = false;
    s_3.enabled = false;
    s_4.enabled = false;
    s_5.enabled = false;
    s_6.enabled = false;
    }

    // onLoad 3 marbles of each

    function buildboard)
    {
    _root.ballred.gotoAndStop("0b");
    _root.ballblue.gotoAndStop("0b");
    _root. Container.gotoAndStop ("0b");
    _root.ball1.gotoAndStop("3b");
    _root.ball2.gotoAndStop("3b");
    _root.ball3.gotoAndStop("3b");
    _root.ball4.gotoAndStop("3b");
    _root.ball5.gotoAndStop("3b");
    _root.ball6.gotoAndStop("3b");
    _root.ball7.gotoAndStop("3b");
    _root. BALL8.gotoAndStop ("3B");
    _root.ball9.gotoAndStop("3b");
    _root.ball10.gotoAndStop("3b");
    _root.ball11.gotoAndStop("3b");
    _root.ball12.gotoAndStop("3b");
    }

    I make a Mancala game called (Cong kak).

    / / ball1 - ball12 are all movieclips that has at least 36 marbles inside. If onLoad, I do all the movieclip stop "3B", which carries a label. now, I need to do the following sequence.

    For example. inside ball1 had 3 balls, click ball1, becomes ball 0, it will go to ball2 and drop 1 ball, den go ball3 fall 1 ball, den go ball4 fall 1 ball...

    did this following code:

    bowl1.onPress = function()
    {
    selectedItem = this;
    _root.ball1.gotoAndStop("0b");
    _root.ball2.gotoAndStop("4b");
    _root.ball3.gotoAndStop("4b");
    _root.ball4.gotoAndStop("4b");
    turn = "blue";
    }

    but I cannot do this for all 12 movieclips have source for help and did:

    var bowlList: Array = [ball1, ball2, ball3, ball4, ball5, ball6, ball7,
    BALL8, ball9, ball11, ball10, ball12];
    function movestones (bowlIndex)
    {
    var numStones = [bowlIndex] bowlList ._currentframe-1;
    for (; numStones > 0; numStones-)
    {
    place stone
    }
    }
    s_1.onPress = function()
    {
    movestones (0);
    }

    but don't have any idea of WD to //place Pierre... someone could help me? Thank you very much!

    your game will become more complicated to encode, particularly because of the way you have configured.  Anyway, I see no easy way where you are, and I see no easy way to help you without all the coding myself.

  • Restrict "Enter, delete and BACKSPACE" in TextArea

    Hello

    I want to restrict the delete, BACKSPACE key and the Enter key in the text box. Please tell me how to limit these 3 keys. Thanks in advance.

    Kind regards

    Kelifaoui has

    var origS:String = "Cuveiro: resteba o restreba ' segunda harvest what coge en UN mismo terreno".»

    my_txt.text = because;

    listenerObject = new Object();

    If I press the delete key, firstly this listener calls

    listenerObject.keyDown = {function (eventObject)}
    It = Selection.getCaretIndex ();

    };

    listenerObject.keyUp = {function (eventObject)}
    {if (Key.GetAscii () == 13)}
    my_txt. Text = my_txt. Text.Split ("\r"). Join("");
    } ElseIf (Key.getAscii () == 8 |) {Key.getAscii () is 127)}
    {if (prevS)}
    my_txt. Text = prevS;
    } else {}
    my_txt. Text = origS
    }
    }
    prevS my_txt.text =;
    Selection.setFocus (my_txt);
    Selection.setSelection (this, this)
    };
    my_txt.addEventListener ("KeyDown", listenerObject);
    my_txt.addEventListener ("KeyUp", listenerObject);

  • With the help of keys to activate the buttons

    I made a flash demo that uses the mouse to navigate to the top. Now instead of using the mouse, I want to use keyboard (up, down, left, and right arrow) to highlight buttons and then hit button to click on the button "enter".

    Can anyone help? Thank you in advance.

    no code should be attached to objects then Yes, you must include code to frames (or location in an .as file).

    Selection.setFocus (yourbutton);

  • Ensuring a button does not get door

    Hey there

    I'm currently building a small search banner which consists of three fields and a search button.

    The banner works fine and all fields respond well however if I use the on the keyboard tab key to move from one field to the other, the search button becomes highlighted.

    At this point my enter keydown causes the button does not work as a release but instead takes my file to another part that is reserved for the feature rolling B button.

    Is there anyway that I can assure you that by pressing the tab after the last field will bring the user to the first field?

    Thank you very much

    use:

    srch_btn.OnSetFocus = function)

    {

    Selection.setFocus (name);

    }

  • detect clicks on multiple movieclips

    Hello

    Thanks for your time, read this.  I'm hard-pressed to find ways to detect clicks on various movieclips that I'm generation.   Basically, I am allowing to set a number any instances of the same clip.   I would like each instance A) be clickable and B) pass the reference to the click handler.

    For example, I have something like this:

    function addMissile() {}

    this.attachMovie ("missile", "missile" + mtop, this.getNextHighestDepth (), {_x:startx, _y:starty});})

    activeMissiles [mtop] = _root ["missile" + mtop];

    .focusEnabled activeMissiles [mtop] = true;

    Selection.setFocus (activeMissiles [mtop])

    MTop ++

    }

    I would like to add a reminder on click for each of these instances of clip.   Grateful if someone can point me in the right direction

    Best regards

    Tom

    You can use:

    function addMissile() {}

    var mc:MovieClip = this.attachMovie ("missile", "missile" + mtop, this.getNextHighestDepth (), {_x:startx, _y:starty});})

    activeMissiles.push (this ["missile" + mtop]);

    or better yet:

    activeMissiles.push (mc);

    mc.focusEnabled = true;

    Selection.setFocus (mc);

    mc.missileIndex = activeMissiles.length - 1;

    mc.onRelease = function() {}

    trace (this ._name + ":" + this.missileIndex);

    }

    }

  • Move from one field to the other and to validate the response to the first text field automatically

    I have a problem I want to know if someone could help me with.

    I have a dynamic text box called help_txt and I have some initial instructions in order to achieve the first text field with relevant information.

    Selection.setFocus (prCv1_txt);
    Selection.setSelection (1, 0);

    The focus is already set at the beginning of the first text field, which has 2 characters maximum indicated. It is also a text entry field.

    The right answer for prCv1, which is the variable, is 01.

    If the user types 01, I want the following to happen:

    cursor automatically advances to the next text field, which is called groupNo1_txt and I want another message to display the correct information in the field of help_txt, such as the type in the next field.

    If the user does not type 01, I want the following to happen:

    cursor goes back to position 1 of the prCV1_txt text box and another message to display in the field help_txt, by mistake, please enter 01 in this area.

    Initially, I got the code to check if the user pressed the Tab key, but the error message for the 2nd text box automatically displays do not give the user the ability to type information in the second text field (groupNo1_txt).

    Can someone help me please!

    If you need me to attach a file, I can do.

    Thank you...

    Use a conditional in the onChanged function that tests first to see if the entry is at the correct number of characters...

    If (prCv1_txt.length > 1) {}

    If (prCv1_txt.text == "01") {}

    Disable prCv1_txt, select groupNo1_txt

    } else {}

    Msg error and/or reboot

    }

    }

  • Adding checkbox Flash mailer form

    I'm back here where someone else left off, and I don't know the first thing about Action or PHP scripts.

    I have a form (name, Email, subject, Message) flash and I want to add a box for "Add me to your mailing list.

    I tried to break it down and logically figure it out, but no luck, guess I'm not that smart.  :-)

    The mailer already works very well, and I would just add a second line to the email with "add to the list of mail: Yes/No.

    I named the box "maillist.

    Here's the action script:

    var mainTL:MovieClip =;

    submit_mc._alpha = 0;

    var dataSender:LoadVars = new LoadVars();

    var dataReceiver:LoadVars = new LoadVars();

    var formCheck:Object = new Object();
    formCheck.onKeyUp = function() {}
    If (name_txt.text! = "& &)
    email_txt. Text! = "& &
    subject_txt. Text! = "& &
    message_txt. Text! = '') {}
    alert_txt. Text = ";
    submit_mc._alpha = 50;
    } else {}
    submit_mc._alpha = 0;
    }
    }

    Key.addListener (formCheck);

    var normal_border:Number = 0x7A7777;
    var focus_border:Number = 0xFA8D00;

    var normal_background:Number = 0xECECE6;
    var focus_background:Number = 0xE9E3E3;

    var normal_color:Number = 0x776D6C;
    var focus_color:Number = 0 x 000000;

    entries = [email_txt, subject_txt, name_txt, message_txt];

    for (var inputs elem) {}
    entries [elem] .border = true;
    entries [elem] .borderColor = normal_border;
    background of entries [elem] = true;
    entries [elem] .backgroundColor = normal_background;
    entries [elem] .textColor = normal_color;
    entries [elem] .onSetFocus = function() {}
    this.borderColor = focus_border;
    this.backgroundColor = focus_background;
    this.textColor = focus_color;
    }
    entries [elem] .onKillFocus = function() {}
    this.borderColor = normal_border;
    this.backgroundColor = normal_background;
    this.textColor = normal_color;
    }
    }

    Selection.setFocus (name_txt);

    submit_mc.onRelease = function() {}
    If (name_txt.text! = "& &)
    email_txt. Text! = "& &
    subject_txt. Text! = "& &
    message_txt. Text! = '') {}
    alert_txt. Text = ";

    mainTL.play ();
    dataSender.name = name_txt.text;
    dataSender.email = email_txt.text;
    dataSender.subject = subject_txt.text;
    dataSender.message = message_txt.text;
    dataReceiver.onLoad = function() {}
    If (this.response == 'invalid') {}


    mainTL.gotoAndStop (1);
    alert_txt. Text = "Please enter a valid e-mail address."
    } ElseIf (this.response == 'pass') {}
    mainTL.gotoAndStop (4);
    }
    }
    dataSender.sendAndLoad ("processEmail.php", dataReceiver, "POST");
    } else {}
    alert_txt. Text = "Please fill out all fields.';
    }
    }

    And here is the PHP mailer:

    <? PHP

    $name = $_POST ['name'];
    $email = $_POST ['email'];
    $subject = $_POST ["subject"];
    $message = $_POST ['message'];
    $name = trim ($name);
    $email = trim ($email);
    $subject = StripSlashes ($subject);
    $message = StripSlashes ($message);

    # * / $toaddress = "[email protected]";

    $toaddress = "[email protected] '


    If (preg_match ("/ ^ [-_.]")) [[: alnum:]] + @((([[: alnum:]] |)) [[: alnum:]] (([[: alnum:]-] * [[: alnum:]]) \.) + (ad: ae: aero: af: ag |) AI | Al | am | one | AO | AQ | AR | ARPA | as | to | AU | AW | AZ | BA | BB | BD | being | BF | BG | BH | bi | biz | BJ | BM | NL | Bo | Br | BS | BT | BV | BW | by | BZ | CA | CC | CD | FC | CG | ch | This | CK | CL | cm | CN | co | com | COOP | CR | CS | CU | CV | CX | CY | CZ | of | DJ | DK | DM | DZ | EC | edu | EE | eg | huh | ER | | and | EU | fi | FJ | FK | FM | fo | en | GA | en | GD | GE | GF | GH | IM | GL | GM | GN | gov | GP | GQ | GR | GS | GT | Gu | GW | Gy | HK | HM | HN | HR | HT | Hu | ID | IE | It | in | Info | int | IO | IQ | IR | East | It | JM | Jo | JP | Ke | kg | KH | Ki | km | kN | KP | KR | kW | KY | KZ | the | lb | LC | Li | LK | LR | ls | Lt | read | LV | LY | my | MC | MD | mg | HD | millet | MK | ml | mm | MN | MB | MP | MQ. m. | Ms | Mt | MU | Museum | MV | MW | MX | my | MZ | NA | name | NC | don't | NET | NF | NG | Neither | NL | None | NP | Nr. NT | u n | NZ | OM | org | PA | PE | PF | PG | Ph | PK | PL | PM | PN | PR | Pro | PS | PT | PW | py | QA | Re | ro | ru | RW | his | SB | SC | SD | is | SG | sh | TR | SJ | SK | SL | SM | SN | so | RS | St | Su | SV | Sy | sz | TC | TD | TF | TG | th | TJ | TK | TM | TN | to | TP | tr | TT | TV | TW | TZ | au | ug | UK | UM | We | UY | UZ | will | VC | ve | VG | VI. VN | view | WF | WS | ye | YT | Yu | za | Zm | ZW) $ | (([0-9] [0-9]? |)) [0-1] [0-9] [0-9] | [2] [0-4] [0-9] | (([2] [5] [0-5]) \.) {3} ([0-9] [0-9]? |) [0-1] [0-9] [0-9] | [2] [0-4] [0-9] | ((' ([2] [5] [0-5])) $ / i ', $email)) {}
    mail ($toaddress, $subject, $message, "in: $name < $email > \r\nReply-To: $email\r\nReturn-Path: $email\r\n" "");
    $name = ";
    $email = ";
    $subject = ";
    $message = ";
    echo "response = spent."
    } else {}
    echo "response invalid =";
    "exit";
    }

    ? >


    Any help would be greatly appreciated.

    Thanks in advance.

    Here's a rough turned to a solution that only requires a change in one of the functions in the Flash code, add the code highlighted in red... it just jumps a line at the end of the message and adds a line reflecting the State of the checkbox.  The Red code shows I replace the line of code: dataSender.message = message_txt.text;

    submit_mc.onRelease = function() {}
    If (name_txt.text! = "&)
    email_txt. Text! = '' &&
    subject_txt. Text! = '' &&
    message_txt. Text! = '') {}
    alert_txt. Text = ";

    mainTL.play ();

    dataSender.name = name_txt.text;
    dataSender.email = email_txt.text;
    dataSender.subject = subject_txt.text;

    {if (maillist. Selected)}

    dataSender.message = message_txt.text + "" \n\nAdd to the Mail-list: Yes ";"

    } else {}

    dataSender.message = message_txt.text + "" \n\nAdd to the Mail-list: No. ";"

    }

    dataReceiver.onLoad = function() {}
    If (this.response == 'invalid') {}
    mainTL.gotoAndStop (1);
    alert_txt. Text = "Please enter a valid e-mail address."
    } ElseIf (this.response == 'pass') {}
    mainTL.gotoAndStop (4);
    }
    }
    dataSender.sendAndLoad ("processEmail.php", dataReceiver, "POST");
    } else {}
    alert_txt. Text = "Please fill out all fields.';
    }
    }

  • Disabled components still respond to important events

    My ongoing adventures resulting of the component.

    I noticed that if the List component is always centered, but disabled, he will continue to listen for key events. Originally the result wished to be thrown for a loop.

    I thought about it.

    Really the pain, but when I want to disable the list I must also set to false focusEnabled and then do Selection.setFocus (null);

    So when I want to activate the list I just set focusEnabled true also.

  • bug in Flash

    setFocus (null); does not work for the combbox or a textfeild.

    Can I detected 'Focusout/focusouthandler()' with the drop-down list, but not a text field. If I try to set the focus to another text using the ' focus on ' with the combobox control, I get an infinite loop error... So I can work with only a text field, but I can't detect a "Focusout/focusouthandler()" with a text field, unless another text field is selected.


    I just need to set the focus to another text field or remove alltogether update if the user clicks anywhere outside a textfeild.

    I even tried to create a text field defining the focus and remove it but still no go... Here are all my attempts to make it work... but still does not work:


    mybutton.onPress = function() {}
    first_txt. SetFocus (null);
    };
    //////normal Text/////////////////////////////////////////////
    first_txt.onKillFocus = {function (newFocus:Object)}
    trace ("text");
    };
    first_txt.OnSetFocus = {function (oldFocus:Object)}
    trace ("IN text");
    };
    //////////////////////////////////////////////////
    ////////////////END TEXT/////////////////////////////////////////////////



    /////////CB ON OUT////////////////////////////////////////
    /////////////////////////////////////////////////
    var mdiListener:Object = new Object();
    mdiListener.focusOut = function() {}
    first_txt. SetFocus (null);
    trace ("out CB");
    };
    my_cb.addEventListener ("Focusout/focusouthandler()", mdiListener);

    ////////////CB ON IN//////////////////////////////
    var mdiListener2:Object = new Object();
    mdiListener2.focusIn = function() {}
    trace ("CB IN");
    my_cb. Open();
    };
    my_cb.addEventListener ("focusIn", mdiListener2);
    /////////////////////////////////////////////////////////
    ////////////END////////////////////////////////////////////



    maybe try to call a killfocus function? ////////////////////////
    Nicolas = function () {}
    Selection.setFocus ("mditext");
    };
    ///////////////////////////////////////////
    /////////////////END/////////////////////////////////


    MAYBE CREATE A TEXT FEILD AND GIVE IT FOCUS.
    this.createEmptyMovieClip ("killFocus", this.getNextHighestDepth ());
    this.killFocus.onRelease = function() {}
    focusManager.setFocus (this.killFocus);
    this.killFocus.removeMovieClip ();
    };
    ////////////////////////////////////////////
    /////////END//////////////////////////////////////////

    OK for someone else who has the problem of:
    Selection.setFocus
    you have time before you redirect the discussion... about 250 Ms

    var refreshmeTimer:Number = setTimeout (delayedFunction, 250, "two second delay");

    function delayedFunction() {}

    clearTimeout() don't (refreshmeTimer); Refresh

    Selection.setFocus (null);
    Selection.setFocus ("mditext");
    }

    my_cb. TextField.Size = 16;
    _root.focusManager = true;

    Create a listener object.
    var cbListener:Object = new Object();
    cbListener.open = {function (evt_obj:Object)}
    trace ("The ComboBox opened.");
    };
    cbListener.close = {function (evt_obj:Object)}
    trace ("The ComboBox closed.");
    _root.nokeys = false;

    };
    cbListener.focusIn = function() {}
    _root.nokeys = true;
    my_cb. Open();
    };

    cbListener.focusOut = function() {}
    trace ("out");
    clearTimeout() (refreshmeTimer);

    var refreshmeTimer:Number = setTimeout (delayedFunction, 250, "two second delay");

    function delayedFunction() {}

    clearTimeout() don't (refreshmeTimer); Refresh

    Selection.setFocus (null);
    Selection.setFocus ("mditext");
    }
    };

    cbListener.change = {function (evt_obj:Object)}
    trace (evt_obj. Target.SelectedItem.Label);
    fscommand ("Code", evt_obj.target.selectedItem.label);
    };

    Add the listener.
    my_cb.addEventListener ("Focusout/focusouthandler()", cbListener);
    my_cb.addEventListener ("Open", cbListener);
    my_cb.addEventListener ("Close", cbListener);
    my_cb.addEventListener ("focusIn", cbListener);
    my_cb.addEventListener ("change", cbListener);

    Respond to the user pressing the Enter key after you have added a new name for the item.
    function enterListener(evt_obj:Object) {}
    If (evt_obj.target.value! = ") {}
    evt_obj. Target.AddItem ({data: evt_obj.target.value, label:evt_obj.target.value});})
    Selection.setFocus ("mditext");
    }
    trace (evt_obj. Target.value);
    evt_obj. Target.editable = false;
    evt_obj. Target.SelectedIndex = evt_obj.target.dataProvider.length - 1;
    _root.mdiA = false;
    fscommand ("Code", evt_obj.target.value);
    _root.nokeys = false;
    trace (evt_obj. Target.value);
    }
    my_cb.addEventListener ("Enter", enterListener);
    //////////////////////////////////////////////////////////////////////////

Maybe you are looking for

  • Satellite A500 - problems with the creation of recovery disks

    HelloI bought a Satellite A500 yesterday and now I'm trying to create the recovery discs before anything else.However, towards the end of the 1st DVD I get an error message saying "Faile dto open the next file. e:\Boot\BCD (0201123-F1-00000000 error

  • Satellite C850D-11 q keep loses the WIFI signal

    Toshiba Satellite C850D-11 q BT Hub 4 Realtek drivers I lose the wifi signal at least twice a day. Same message to loose / broken cable and reset the wireless card. Realtek has informed me that I have the latest drivers. The present is Realtek RTL 81

  • iTunes Store right off screen

    This problem happened when I tried the zoom control while browsing the iTunes store. I zoomed in while watching the store on my second monitor. When I've wound up and opened later on the main monitor, the store screen has enlarged very close. When th

  • XE satellite 3000 - display replacement catch cover.

    I wonder if someone can help me. I have a laptop Toshiba Satellite XE3000 that needs a new TFT "clip." Its the one that holds the screen as well as the bottom of the laptop. Its only which is held in the body of the screen by two clips small peg plas

  • Sandy Bridge for Ivy Bridge CPU upgrade in the W520

    Sandy Bridge and Ivy Bridge using the same socket. All tech sites say that we can do. What are the implications? With HD-4000 graphics I would now be able to drive 4 monitors? What other benefits are there? Energy consumption is slightly reduced, the