A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: TypeError: Error #2007: Parameter text must be non-null.

  1. #1
    Junior Member
    Join Date
    Mar 2010
    Posts
    1

    TypeError: Error #2007: Parameter text must be non-null.

    Okay I have a comboBox named 'resortCombo'. I wish to pass the label of that comboBox to another frame so that an 'resortOutput' textbox displays it.

    I have the following code for the Global actions:
    Code:
    var resortLabel:String;
    function myHandler(evt:Event):void {
    resortLabel = resortCombo.selectedItem.label;
    }
    And I have the following Frame actions in the frame I wish the value to be displayed:
    Code:
    resortOutput.text = resortLabel;
    But that does not appear to work and I get the following error message:
    Code:
    TypeError: Error #2007: Parameter text must be non-null
    Would appreciate any help

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    The reason is probably that at the time when you compile the script the script resortLabel is null. So change var resortLabel:String; to something like
    var resortLabel:String = "Choose a resort";
    or
    var resortLabel:String = "";
    - The right of the People to create Flash movies shall not be infringed. -

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