2012-04-27 76 views
0

我遇到以下問題:使用SWFLoader設置影片尺寸的問題

當我通過HTML標記嵌入swf電影時,影片具有給定的尺寸。不幸的是,用SWFLoader(設置高度和寬度)做這件事不起作用。這部電影似乎擁有全屏尺寸。

編輯:

這裏的SWFLoader的(它被縮小到240×320,但加載的影片是更大的,並沒有填滿整個窗口)代碼:

<mx:SWFLoader id="video" autoLoad="true" height="240" width="320" scaleContent="true" maintainAspectRatio="true" source="http://movie_address" /> 

這裏是工作的代碼的標籤:

<object width="320" height="240" ><param name="allowfullscreen" value="true" /><param name="movie" value="http://movie_address" /><embed src="http://movie_address" type="application/x-shockwave-flash" allowfullscreen="true" width="320" height="240"></embed></object> 

我該如何解決問題?

謝謝!

+0

請張貼一些代碼! – 2012-04-27 09:25:39

+0

另外我建議你應該看看它的文檔http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/SWFLoader.html#includeExamplesSummary – 2012-04-27 09:28:10

回答

0

嘗試使用scaleContent =「true」;

<s:SWFLoader id="loader1" source="@Embed(source='sample.swf')" x="100" y="100" 
       width="200" height="200" scaleContent="true"/> 
+0

首先,我不能嵌入它 - 它必須在運行時加載。除此之外,scaleContent =「true」不按預期工作。我需要這部電影是320x240。目前它更大,並且已經縮小到了給定的尺寸。 – 2012-04-27 10:33:00

+0

嘗試在完成SWFLoader事件時設置source和scaleContent屬性。或分享「http:// movie_address」。 – 2012-04-27 12:53:30