简体   繁体   中英

Flex vs ActionScript

I'm trying to build/implement a Flash video player to play videos. I have looked at Flex and built a basic application with just a VideoElement. It gets compiled to 41k without statically linking the libs and 300k with linking the libs. I generated the report but am still not sure why I would need all those components just to build a VideoPlayer.

On the other hand, I have had a look at some implementations in ActionScript and it's compiled to 10K. Why is the file size so different in Flex than in pure ActionScript when they both compile down to swfs? Perhaps I'm confused by what Flex is so an explanation would help too. Thanks!

Flex is essentially a library of classes built on top of plain ActionScript (the mxml files even get generated into ActionScript classes at compile time), so in a nutshell the overhead you are seeing is due to dependencies within the Flex framework. Many people will try to create such things as video players in pure ActionScript to avoid these dependencies and keep the file size down.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM