6 Replies Latest reply on Apr 30, 2009 10:12 AM by kglad

    Blank first item in ComboBox - Help!

    pudrocker

      I've imported a swf into my actionscript code which contains a combobox (instance name of "cb"). I'm having an issue with not being able to set the "prompt" property from within the code and also with the first item in the combobox always remaining blank.

       

      When I compile my project withing FlashDevelop, the combobox populates all the items properly, but always leaves the first item (item 0) blank. When I try to assign the "prompt" property to a string, it has no effect - the first item always remains blank. When choosing different items in the combobox, the chosen item does not appear in the combobox for the user to see she has chosen it - it just remains blank.

       

      **PLEASE help**

       

      Here is the condensed code:

       

      [Embed(source = "../../../../flash/as3/video_player.swf")]
      private var VideoPlayerAssets:Class;

       

      _xVideoAssetsLoader = new EmbeddedAssetSwfLoader(VideoPlayerAssets);
      _xVideoAssetsLoader.addEventListener(EmbeddedAssetSwfLoader.EMBEDDED_ASSET_LOADE D, videoAssetsLoaded); _xVideoAssetsLoader.loadAssetSwf();

       

       

      _xVideoControlsSymbol = _xVideoAssetsLoader.getSymbolInstance("VideoControlsHome");

       

      _xVideoControlsSymbol.embedWindow.content.cb.prompt = "Choose a Size"; //THIS HAS NO EFFECT

       

      _xVideoControlsSymbol.embedWindow.content.cb.addItem( { label: "400 x 320", width:400, height:320, data:"400x320" } );
      _xVideoControlsSymbol.embedWindow.content.cb.addItem( { label: "480 x 384", width:480, height:384, data:"480x384" } );
      _xVideoControlsSymbol.embedWindow.content.cb.addItem( { label: "560 x 448", width:560, height:448, data:"560x448" } );
      _xVideoControlsSymbol.embedWindow.content.cb.addItem( { label: "640 x 512", width:640, height:512, data:"640x512" } );

       

      _xVideoControlsSymbol.embedWindow.content.cb.addEventListener(Event.CHANGE, sizeSelected);