I'm trying to compile gui/flex/songs.mxml
in the fourth edition of Bruce Eckel's Thinking in Java book and am getting a compilation error with Flex 3.4.
Here is a simplified version of the example that gives the same error:
<?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>
Here is the invocation and the error:
>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"
What am I doing wrong here?
That component is no longer available in flex, i believe since flex 3.0. There is a video display component built in but you have to set up the controls for it. If you want a more complete pre-built component you need to import one from flash. heres a good tutorial from adobe on how to do that - http://www.adobe.com/devnet/flex/articles/video_flex.html