dcsimg
A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: textbox data control MC

  1. #1
    Member
    Join Date
    Feb 2002
    Posts
    35
    I created a series of dynamic textboxes that I will fill in with actionscripting with the following code placed on the MC that contains them all:

    onClipEvent (load) {
    title = "Authorization Level";
    line_1 = "number 1";
    line_2 = "testing";
    line_3 = "number 3";
    line_4 = "";
    line_5 = "";
    line_6 = "number 6";
    line_7 = "";
    line_8 = "";
    }

    now... I have bullets lined up next to each of these lines and I'm trying to have them appear or dissapear wether or not there is text in the textbox next to them. so i put this code on the movie clip that has the bullet:

    onClipEvent (load) {
    if (_root.textboxMC.line_1 = "") {
    _root.textboxMC.bullet_alpha = 0;
    }
    }

    Basically I'm trying to say that if there is NO TEXT (which I insert with actionscript) in the text box next to the bullet, the bullet will not show up.

    I can get the text to appear with the actionscript.. I just cant get the bullets to show or not to show... can anyone help?

  2. #2
    Senior Member
    Join Date
    Apr 2001
    Posts
    162
    Assuming your bullets are themselves movieclips...

    onClipEvent (load) {
    if (_root.textboxMC.line_1 = "") {
    _root.textboxMC.bullet_alpha = 0;
    }
    }
    You have a couple syntax errors:

    1
    if (_root.textboxMC.line_1 = "") {
    should be written like this:

    Code:
    if (_root.textboxMC.line_1 == "") {
    2
    _root.textboxMC.bullet_alpha = 0;
    should look like this:

    Code:
    _root.textboxMC.bullet._alpha = 0;
    If these are simply copying errors, send me your FLA, I'll gladly take a look.

    ~ ptolemy

  3. #3
    Member
    Join Date
    Feb 2002
    Posts
    35

    got it..

    onClipEvent (load) {
    if (_parent.line_1 == "") {
    this._alpha = 0;
    }
    }


    Thanks!

  4. #4
    Senior Member
    Join Date
    Apr 2001
    Posts
    162
    My pleasure

    - ptolemy

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center