AS3: Flex: SWF loader
----------------------
----------------------
Note: this is intended for those who are already well versed in AS3 code
here is a tutorial on creating a SWF loader
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:mx="library://ns.adobe.com/flex/mx"> <fx:Script> <![CDATA[ [Embed(source = "example.swf")]//add the SWF file to the variable [Bindable]//makes it so that the variable can be used in elements private var swf:Class;//creating a variable that will contain a SWF file ]]> </fx:Script> <!-- creating a SWF loader --> <s:SWFLoader source="{swf}" width="400" height="300" /> </s:Application>
SWF files execute code, this also applies to the trace() function;
Summary
you learned how to load SWF files into MXML
That's all for now, thanks for your attention, this is made for AS3 Main: Tutorials and Resources