OSMF AS3 / FlashCS5错误:未找到类型[...]:StageVideoEvent(OSMF AS3/FlashCS5 Error: Type was not found […]: St

编程入门 行业动态 更新时间:2024-10-24 02:33:11
OSMF AS3 / FlashCS5错误:未找到类型[...]:StageVideoEvent(OSMF AS3/FlashCS5 Error: Type was not found […]: StageVideoEvent)

我正在玩OSMF并且在运行一个超级简单的例子时遇到问题。

我在Arch Linux上的VirtualBox上运行Flash CS5(只是说因为我认为这可能与底层的东西有关)。 我也在使用OSMF 1.6 Sprint 1。

无论如何我试图运行这个简单的例子:

package { import flash.display.Sprite; import org.osmf.containers.MediaContainer; import org.osmf.elements.VideoElement; import org.osmf.media.DefaultMediaFactory; import org.osmf.media.MediaElement; import org.osmf.media.MediaPlayer; import org.osmf.media.URLResource; public class OPlayer extends Sprite { public function OPlayer() { var filePath:String = "testvid.flv"; var resource:URLResource = new URLResource(filePath); var mediaFactory:DefaultMediaFactory = new DefaultMediaFactory(); var mediaElement:MediaElement = mediaFactory.createMediaElement(resource); var mediaPlayer:MediaPlayer = new MediaPlayer(mediaElement); var mediaContainer:MediaContainer = new MediaContainer(); mediaContainer.addMediaElement(mediaElement); addChild(mediaContainer); } }

}

不幸的是,我不断收到以下编译错误:

1046: Type was not found or was not a compile-time constant: StageVideoEvent.

I am playing around with OSMF and have a problem running even a super simple example.

I am running Flash CS5 on Win7 in VirtualBox on Arch Linux (just saying because I thought that this may have something to do with the underlying stuff). Also I am using OSMF 1.6 Sprint 1.

Anyways I am trying to run this simple example:

package { import flash.display.Sprite; import org.osmf.containers.MediaContainer; import org.osmf.elements.VideoElement; import org.osmf.media.DefaultMediaFactory; import org.osmf.media.MediaElement; import org.osmf.media.MediaPlayer; import org.osmf.media.URLResource; public class OPlayer extends Sprite { public function OPlayer() { var filePath:String = "testvid.flv"; var resource:URLResource = new URLResource(filePath); var mediaFactory:DefaultMediaFactory = new DefaultMediaFactory(); var mediaElement:MediaElement = mediaFactory.createMediaElement(resource); var mediaPlayer:MediaPlayer = new MediaPlayer(mediaElement); var mediaContainer:MediaContainer = new MediaContainer(); mediaContainer.addMediaElement(mediaElement); addChild(mediaContainer); } }

}

And unfortunately I keep getting the following compile error:

1046: Type was not found or was not a compile-time constant: StageVideoEvent.

最满意答案

StageVideo上周才正式发布,你的版本可能还没有使用新的API进行更新。

此PDF包含有关在Flex中使用它的信息: http : //download.macromedia.com/pub/labs/flashplayer10/flashplayer10_2_p1_releasenotes.pdf

我看到你正在使用Flash CS5,你需要一个playerglobal.swc,你可以尝试使用Flex,但我不认为它会起作用。 寻找特定的Flash CS5。

UPDATE

我做了一个快速搜索,它似乎不适用于Flash Professional CS5,只是通过Flex编译器。

StageVideo was only officially released last week, your version probably hasen't been updated with the new API's.

This PDF has info on using it with Flex: http://download.macromedia.com/pub/labs/flashplayer10/flashplayer10_2_p1_releasenotes.pdf

I see you are using Flash CS5, you'll need a playerglobal.swc for that, you could try the Flex one, but I don't think it'll work. Look for a Flash CS5 specific one.

UPDATE

I did a quick search and it doesn't look like it is available for Flash Professional CS5 yet, just through the Flex compiler.

更多推荐

本文发布于:2023-08-05 20:26:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1437785.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:未找到   错误   类型   OSMF   Error

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!