2010-12-06 32 views
0

在下面的動作腳本文件中有一個錯誤說無法導入mx.controls.Label, 我正在編譯通過命令行上,linux和環境變量路徑設置flex安裝,如何解決這個無法導入MX包

package { 

import mx.controls.Label; 

public class Test 
{ 
    public function Test() 
    { 
     Alert.show("Test"); 
    } 
    } 
} 

編輯:

 [[email protected] tmp]# mxmlc Test.as 
     Loading configuration file /opt/flex/frameworks/flex-config.xml 
    /tmp/Test.as: Warning: This compilation unit did not have a factoryClass   specified in Frame metadata to load the configured runtime shared libraries. To compile without runtime shared libraries either set the -static-link-runtime-shared-libraries option to true or remove the -runtime-shared-libraries option. 

    /tmp/Test.swf (466 bytes) 
+0

最近類似的帖子:http://stackoverflow.com/questions/4224044/import-fl-data-dataprovider-is-not-working-in-adobe-cs4/4225181#4225181 – TheDarkIn1978 2010-12-06 10:26:54

+0

但不是同樣的問題/解決方案 – Rajeev 2010-12-06 10:51:48

回答

0

我敢肯定你需要的Flex源(或SWC)添加到您的命令行參數的庫路徑。看看library-path命令行參數。

當你說「環境變量路徑設置在flex的安裝位置」時,我不完全確定你的意思。什麼環境變量?它是如何使用的?也許你會想讓我們看看你正在使用的命令行和/或批處理文件?