2012-06-21 3 views
2

내 코드는 다음과 같습니다.플래시 빌더를 사용하는 Flex의 HelloWorld 4.6

1) 레이블과 버튼이 겹쳐 있습니다. 내가 어떻게 고칠 수 있니? 내가 태그 xmlns:fxxmlns:sxmlns:mx과에서를 무슨 뜻인지 알 수 있음)

Description Resource Path Location Type 
Initializer for 'layout': values of type spark.layouts.supportClasses.LayoutBase cannot be represented in text. HelloFlex.mxml /HelloFlex/src line 4 Flex Problem 

2. (I 레이아웃은 기본적으로 absolute로 설정되어 있는지 알고 있지만, 내가 minWidth="955" minHeight="600"을 제거하고 layout="horizontal"을 포함 할 때 나는 다음과 같은 오류가 발생했습니다) 어떤 인스턴스를 사용해야합니까?

3.) FLex Builder 4.6의 디자인 모드에서 사용자 인터페이스를 디자인 할 수있는 부품은 Drag-and-drop입니까?

<?xml version="1.0" encoding="utf-8"?> 
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
        xmlns:s="library://ns.adobe.com/flex/spark" 
        xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" > 
     <fx:Declarations> 
      <!-- Place non-visual elements (e.g., services, value objects) here --> 

     </fx:Declarations> 
     <mx:Label text="Hello World"/> 
     <mx:Button label="Click"/> 


    </s:Application> 

답변

5

코드는 도움이 될 수 아래 : -

이 페이지에서
<?xml version="1.0" encoding="utf-8"?> 
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
       xmlns:s="library://ns.adobe.com/flex/spark" 
       xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600" 
       > 
    <fx:Declarations> 
     <!-- Place non-visual elements (e.g., services, value objects) here --> 
    </fx:Declarations> 
    <s:layout> 
     <s:HorizontalLayout paddingTop="5" paddingLeft="5" paddingRight="5" paddingBottom="5"/> 
    </s:layout> 
    <mx:Label text="Hello World"/> 
    <mx:Button label="Click"/> 
</s:Application> 
+0

트릭을 해 주셔서 감사합니다. 질문 2와 3을 해결하도록 도와 주시겠습니까 ?? – Illep

+0

귀하의 Q2는 아래 링크를 참조하십시오 : - http://stackoverflow.com/questions/6038235/what-does-different-namespaces-mean-in-flex –

+0

Q3에 응답, 예. 그렇게 할 수 있습니다. Flex 4 이상은 주로 Look and fill 용으로 개발되었습니다. 기존 레이아웃 (디자인을 위해 Flex Builder에서 제공되는 레이아웃)을 사용할 수도 있습니다. –

0

또 다른 해결 방법은 Flash Builder에서 파일 템플리트를 열고 $ {wizard_attributes} 태그를 제거하고 layout = "absolute"임베딩을 중지하는 것입니다.

Flash Builder 환경 설정 -> Flash Builder -> 파일 템플리트 -> MXML -> MXML 웹 응용 프로그램을 통해 액세스 할 수 있습니다. 그런 다음 편집을 클릭하여 속성을 제거하십시오.