0

In the Flash Authoring Tool, I can embed an FLV file as any class I wish as long as the class is a child of MovieClip. This is achieved by selecting the "Export for ActionScript" option and entering a MovieClip-extending "Base Class".

I need to achieve this with Flex too. How can I embed an FLV and make it be a MovieClip-extending class?

Bill Kotsias
  • 3,258
  • 6
  • 33
  • 60
  • 1
    You can do this in a way described here http://stackoverflow.com/questions/199068/embedding-binary-video-data-in-a-swf-file – v0rin Oct 04 '14 at 10:32

1 Answers1

0

It sounds like you can't embed an FLV, based on these docs

To Quote:

You can embed any file type in a Flex application as a bit map array. However, Flex does not recognize or process files other than those described previously. If you embed any other file type, you must provide the transcode logic to properly present it to the application user.

It is even mentioned in the comments that this is a limitation. Your best bet, if possible, is to load the flv asset at runtime.

In aN AIR app [including mobile] you can the FLX as part of your distribution and load it from there. In a web app, just put it in the directory.

JeffryHouser
  • 39,401
  • 4
  • 38
  • 59
  • Please, could describe how to "load flv at runtime"? I don't want to stream it with NetStream... – Bill Kotsias May 02 '12 at 09:45
  • 1
    NetConnection/NetStream is one way ( http://livedocs.adobe.com/flex/3/html/help.html?content=Working_with_Video_05.html ). Why do you want to avoid that? The Video Player may be another: http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/mx/controls/VideoDisplay.html or http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/spark/components/VideoPlayer.html . I'm not sure how the video players are implemented under the hood. – JeffryHouser May 02 '12 at 10:22