<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" creationComplete="init();">
<mx:Script>
<![CDATA[
private var lc:LocalConnection;
private var toswf:LocalConnection;
private function init():void
{
lc = new LocalConnection();
toswf = new LocalConnection();
toswf.client = this;
toswf.connect('swf2Flex');
}
private function stopyellow():void
{
lc.send('swf8connector', 'stopyellow');
}
private function playyellow():void
{
lc.send('swf8connector', 'playyellow');
}
public function redClick():void
{
stopyellow();
}
private function changeText():void
{
MovieClip(blueswf.content).blue.astext.text = btext.text;
}
]]>
</mx:Script>
<mx:Image x="10" y="10" source="flash1.swf"/>
<mx:Button click="stopyellow()" x="10" y="132" label="stop"/>
<mx:Button click="playyellow()" x="75" y="132" label="play"/>
<mx:Image x="10" y="162" source="as3.swf" id="blueswf"/>
<mx:Button x="10" y="230" label="change text" click="changeText()"/>
<mx:TextInput x="112" y="230" width="80" id="btext"/>
</mx:Application>