0

Flex 4 アプリの開始アプリケーション タグで、幅と高さのプロパティを次のように設定します。

<?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"
           creationComplete="init()"
           backgroundColor.mainState="0x303030"
           xmlns:components="components.*"
           width="798"
           height="240">

Flash Builder 4 でデザインモードに入ると、アプリは正しいサイズになります。しかし、.swf ファイルを HTML ページに埋め込むと、アプリケーションの背景色が画面全体を覆い、Flash Player 設定メッセージ ボックスが表示されると、上記のコードで定義した領域の外に表示されます。私は何を間違っていますか?読んでくれてありがとう。

4

2 に答える 2

0

html-template フォルダー内の index.template.html を確認します。これは、ビルド時に index.html を生成するファイルです。おそらく、そこで問題に対処することができます。

于 2010-08-16T13:38:43.637 に答える
0

Flex アプリケーションの幅と高さを 100% に設定します。

No matter what, the html template's width and height are always 100%, you have to set the flex application width and height to 100%. Flex Application itself cannot render on the browser. It needs some kind of wrapper to render it on the browser. Hence Flex Application gets wrapped inside an HTML template and the Browser eventually renders the Flex Application.

Flex Application --> HTML Template --> Browser

于 2012-05-02T14:43:29.387 に答える