我正在尝试在第四版Bruce Eckel的 Thinking in Java 一书中编译 gui / flex / songs.mxml ,并且我在使用Flex 3.4时出现编译错误

以下是给出相同错误的示例的简化版本:

<?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"

我在这里做错了什么?

有帮助吗?

解决方案

这个组件在flex中不再可用,我相信自flex 3.0以来。内置了视频显示组件,但您必须为其设置控件。如果您想要更完整的预构建组件,则需要从闪存中导入一个。这是adobe关于如何做到这一点的好教程 - http:// www。 adobe.com/devnet/flex/articles/video_flex.html

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top