2009-10-22 89 views
0

我試圖編譯gui/flex/songs.mxml在第四版的布魯斯Eckel的思考Java書,並得到與Flex 3.4編譯錯誤。mx:MediaPlayback Flex標籤

這裏是實例的簡化版本,讓同樣的錯誤:

<?xml version="1.0" encoding="utf-8"?> 
<mx:Application 
    xmlns:mx="http://www.adobe.com/2006/mxml" 
    backgroundColor="#B9CAD2"> 
    <mx:MediaPlayback id="songPlayer" 
     contentPath="" 
     mediaType="MP3" 
     height="70" 
     width="230" 
     controllerPolicy="on" 
     autoPlay="false" 
     visible="false" /> 
</mx:Application> 

這裏是調用和錯誤:

>mxmlc.exe songs.mxml 
Loading configuration file C:\javaTools\flex_sdk_3.4\frameworks\flex-config.xml 
C:\songs.mxml(5): 
Error: Could not resolve <mx:MediaPlayback> to a component implementation. 

     <mx:MediaPlayback id="songPlayer" 

我在做什麼錯在這裏?

回答

2

該組件不再可用於flex,我相信自flex 3.0以來。內置了視頻顯示組件,但您必須爲其設置控件。如果你想要一個更完整的預構建組件,你需要從閃存中導入一個。繼承人從Adobe的好教程如何做到這一點 - http://www.adobe.com/devnet/flex/articles/video_flex.html