Bitmapasset Error
here for a quick overview of the site Help Center Detailed answers to any questions you verifyerror: error #1014: class flash.events::throttleevent could not be found. might have Meta Discuss the workings and policies of this site verifyerror error #1014 class could not be found About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or flash player posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up mx.core::BitmapAsset could not be found up vote 5 down vote favorite 2 I tried the code EmbedAssets.as below found in sample here: http://www.senocular.com/flash/tutorials/as3withmxmlc/ I got this error when building with mxmlc.exe and testing the ouput EmbedAssets.swf in Flash Player 9: VerifyError: Error #1014: mx.core::BitmapAsset could not be found package { import flash.display.Sprite; public class EmbedAssets extends Sprite { [Embed(source="images/trophy.png")] private var TrophyImage:Class; [Embed(source="swfs/satdish.swf")] private var SatelliteAnimation:Class; public function EmbedAssets() { addChild(new SatelliteAnimation()); addChild(new TrophyImage()); } } } satdish.swf is not corrupted so I don't understand why this error message. flash share|improve this question asked May 22 '10 at 18:04 user310291 10.1k43150314 add a comment| 2 Answers 2 active oldest votes up vote 11 down vote accepted Either modify flex-config to say
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow http://stackoverflow.com/questions/2889171/mx-corebitmapasset-could-not-be-found Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up “Error #1014: Class mx.core::BitmapAsset could http://stackoverflow.com/questions/6989444/error-1014-class-mx-corebitmapasset-could-not-be-found-while-trying-to-use not be found” while trying to use Runtime Shared Library up vote 3 down vote favorite 1 I've made a runtime shared library for my project, let's call it ResourceLibrary. It contains all of the embedded assets for my project (images, sounds, movie clips) and it's used as a singleton in a lot of other bits of code. I am compiling it using this batch (Windows unfortunately): SET normalstuff=--namespace+=http://ns.adobe.com/mxml/2009,${flexlib}/mxml-2009-manifest.xml --namespace+=http://www.adobe.com/2006/mxml,${flexlib}/mxml-manifest.xml --namespace+=library://ns.adobe.com/flex/spark,${flexlib}/spark-manifest.xml -external-library-path lib -external-library-path+=${flexlib}/libs -external-library-path+=${flexlib}/libs/player/10.0 call compc -source-path src/ -output lib-ext/resources.swc -include-namespaces+=http://MYPROJECT -namespace+=http://MYPROJECT,confs/ResourceLibrary-manifest.xml %normalstuff% -library-path+=data/characters -library-path+=data/menus -library-path+=data/icons/relationships -include-lookup-only=true That makes my resources.swc file, which, when I include this swc in my library and have -static-link-runtime-shared-libraries=true. But I want to not embed my runtime shared libraries in my main swf (cuts down the file size from 10mb to ~3mb), so static-link-runtime
from GoogleSign inHidden fieldsSearch for groups or messages
tag you may be aware that you've just involved Flex in your project since [Embed] is actually a Flex concept. Using the "-link-report" option in mxmlc you can see what classes have been compiled into your swf and how much space they use. I found this entry like this in my link report for an [Embed]‘d image. See the "mx.core:BitmapAsset" requirement? Since the [Embed]‘d asset ends up as a class which extends BitmapAsset it is used even if you don't use it. I generally just use it as a Bitmap, rather than a BitmapAsset, so it's largely unnecessary for my needs. Now, this is all fine, this is how mxmlc does embedding, so it's necessary. But checking the documentation for BitmapAsset and looking at the link report, we see it's actually bringing in a bunch of extra classes and interfaces. All the "mx" classes are actually compiled into the swf. Now Flex isn't really bogging down the swf, all in all I found these classes to be around 2k-3k when compressed, but they annoyed me anyway while trying to shrink a preloader for a project. After a lot of Googling I found a solution, but I decided to write a more complete solution here. You can replace the mx.core.*Asset classes with your own, which replac