A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Cant create a ComboBox component on code.

  1. #1
    Senior Member AzraelKans's Avatar
    Join Date
    May 2002
    Location
    Hell... with frequent access to heaven ;)
    Posts
    409

    Unhappy Cant create a ComboBox component on code.

    Im trying to create a ComboBox using code. But I always receive an error that the Class ComboBox doesnt exists

    Code:
    package {
    	import flash.display.Sprite;
    	import fl.controls.ComboBox;
    	public class test extends Sprite{
    		function test() {
    			var cb:ComboBox=new ComboBox();
    		}
    	}
    }
    This code will always return an error if you try to use it as a document class.

  2. #2
    trace("AKA: Biro Barna");
    Join Date
    Oct 2007
    Location
    RO.Timişoara
    Posts
    1,403
    Hmm, interesting. I can't instantiate a ComboBox object either... I tried it adding to the stage inside Flash but I get the same thing your are. It's not finding the Class. Maybe we're missing something. Hmm...



    | Windows MSN: birobarna [at] hotmail [dot] com | Skype: barna.biro |
    WebLog: http://blog.wisebisoft.com/ |
    | Software Developer / Flash & Flex Developer | Student ( Computer Science ) | Interested in: Sharing Knowledge |
    |
    Romanian Adobe Flash, Flex, AIR Forum: http://www.flashforum.ro/
    | By perseverance the snail reached the ark. |


  3. #3
    Senior Member AzraelKans's Avatar
    Join Date
    May 2002
    Location
    Hell... with frequent access to heaven ;)
    Posts
    409
    Well , I found a work around , in order for this to work you need to drag and drop that component in the stage. Is not the best way to do it, but it works.

    Maybe there is another way to add a SWC file to the project?

  4. #4
    trace("AKA: Biro Barna");
    Join Date
    Oct 2007
    Location
    RO.Timişoara
    Posts
    1,403
    Drag and dropping works all the time but I can't figure out why isn't it finding the class. Hmm, don't know, maybe someone can enlighten us...



    | Windows MSN: birobarna [at] hotmail [dot] com | Skype: barna.biro |
    WebLog: http://blog.wisebisoft.com/ |
    | Software Developer / Flash & Flex Developer | Student ( Computer Science ) | Interested in: Sharing Knowledge |
    |
    Romanian Adobe Flash, Flex, AIR Forum: http://www.flashforum.ro/
    | By perseverance the snail reached the ark. |


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