A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: [RESOLVED] Combobox not setting value?

  1. #1
    Senior Member
    Join Date
    Jul 2001
    Location
    Tinley Park, IL
    Posts
    702

    [RESOLVED] Combobox not setting value?

    I'm having an issue getting the chosen value of a combobox.

    I want to assign the chosen value to a variable so here is what I did.

    In the onChange option.

    shipmethod = this.getValue();

    Isn't that supposed to work?

    I set up a textbox with the variable shipmethod to test it and it's not working.

    I've also tried:

    shipmethod = this.getSelectedItem();

    Any thoughts?

    2 items in combobox (eMail, snailMail)
    My Sites: Gaming Site Nightshade Studios MyKM Tutorials

    --------------------------------------------------
    What I'm using: Gimp, Koolmoves, Sepy, HTML-Kit, Inkscape

  2. #2
    KoolMoves Moderator blanius's Avatar
    Join Date
    Jul 2001
    Location
    Atlanta GA
    Posts
    5,244
    A combobox is itself a movieclip that resides in the main timeline. so you'd need to refer to a text box on the main movie via it's path i.e. _parent or _root

  3. #3
    Senior Member
    Join Date
    Jul 2001
    Location
    Tinley Park, IL
    Posts
    702
    I've tried a number of things and still can't get the value from the combobox.

    My combobox is inside another movie clip called FORM. I can't explain it.

    I've tried everything. I'm sure it's my syntax.

    Here is my actual comboboxes path. _root.form.combobox1
    My Sites: Gaming Site Nightshade Studios MyKM Tutorials

    --------------------------------------------------
    What I'm using: Gimp, Koolmoves, Sepy, HTML-Kit, Inkscape

  4. #4

  5. #5
    Senior Member
    Join Date
    Jul 2001
    Location
    Tinley Park, IL
    Posts
    702
    I figured out what I was doing wrong.

    My combobox is inside another movieclip. When I was referring to it in the onChanged box I was using:

    txt1.text = this.getValue();

    When I removed the "this" it worked. So now I'm back on track.

    ---------------
    Chris? Is that you? Long time no see.
    I'll also take a look at your file and see what you posted too. Maybe there is another technique that I could use.
    My Sites: Gaming Site Nightshade Studios MyKM Tutorials

    --------------------------------------------------
    What I'm using: Gimp, Koolmoves, Sepy, HTML-Kit, Inkscape

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