waflash icon indicating copy to clipboard operation
waflash copied to clipboard

Please add support for Embed Libraries

Open YordanYanakiev opened this issue 3 years ago • 0 comments

<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" minWidth="955" minHeight="600" creationComplete="application1_creationCompleteHandler(event)">
	<mx:Script>
		<![CDATA[
			import com.adobe.serialization.json.JSON;
			
			import mx.controls.Alert;
			import mx.core.MovieClipAsset;
			import mx.core.SpriteAsset;
			import mx.events.FlexEvent;
			
			[Embed(source="flash_maps_library.swf")] 
			public var flash_maps_library : Class;
			
			protected function application1_creationCompleteHandler(event:FlexEvent):void
			{
				// TODO Auto-generated method stub
				var p : MovieClipAsset = new flash_maps_library() as MovieClipAsset;
				Alert.show( JSON.encode( p ) );
			}
			
		]]>
	</mx:Script>
	
</mx:Application>

The code above just embed additional external .swf as resource inside Flex 3 project, and then in runtime it create an instance from it, but it doesnt seems to work.

YordanYanakiev avatar Feb 08 '21 07:02 YordanYanakiev