简体   繁体   中英

Why can't I import mx.controls into a Flex ActionScript project

I'm trying to do a simple import into an ActionScript Project that I've created in Flex Builder:

import mx.controls.Label;

It won't let me. Code hinting shows no 'controls' after mx.

Any idea what's going on?

Thanks.

To access mx libraries in an Actionscript Project, you need to point Flex Builder to the source path.

Right click on your Project -> Properties -> Actionscript Build Path -> Source path tab -> Add Folder... -> 'C:\\Program Files\\Adobe\\Flex Builder 3\\sdks\\SDK_VERSION_NUMBER_HERE\\frameworks\\source\\'

and now you can access all the mx.* classes.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM