How can I load a FLV file into a MovieClip (lets call the instance "flvPlaceHolder") and start playing that FLV file.. using ActionScript 3?
相关问题
- garbage collection best practices
- Should I wait for Flash Player 10.1 or go with Fla
- How to load flex swf from flash?
- FlashDevelop Haxe (Flash) debugger
- Detecting user's camera settings
相关文章
- Are there any benefits when using final in AS3?
- Trace on Chrome/Browser console
- as3 ByteArray to Hex (binary hex representation)
- getElementById not working in Google Chrome extens
- Libraries for text animation in Flex / Actionscrip
- About Collision detection alghorithms in AS3
- How to upload BitmapData to a server (ActionScript
- Manage resources to minimize garbage collection ac
Not explicitly answering your question, but there are a number of open source FLV players in the wild. I'd approach the problem by grabbing one of those and seeing how they handle playing video.
FPlayer would be an excellent starting point. Here is the class that is doing the work. It is fairly straight forward, but using a project like this would probably save you some time.
This snippet should do the trick in an extremely bare bones fashion:
from here
As subha pointed out, its done using the NetStream class... however, that class in particular is quite hard to work with, and very uncoherent with the rest of the language...
I would strongly advice you to use some library, class or component to wrap it up. The FLVPlayback component in Flash (without any skins), in contrast with all the other built-in components in Flash, is really straight forward and very easy to use ;)
To do this locally - cut and paste the following code in the first frame of your flash file. Of course change the name at the end.