Get the Flash Player to see this player.
Burada izleyeceğimiz yöntemler Actionscript 2.0 temelli Flash SWF dosyaları içindir. Eğer SWF dosyanız Actionscript 3.0 temelli ise buraya tıklayınız.
Flex Kodu:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical" verticalAlign="middle" creationComplete="initApp()" viewSourceURL="srcview/index.html">
<mx:Style source="style/flexAdami.css" />
<mx:Script>
<![CDATA[
public var lc_FlexGonder:LocalConnection
public function initApp():void {
lc_FlexGonder = new LocalConnection();
}
public function metinGoster(evt:Event):void {
lc_FlexGonder.send("flex2swf","yaziGoster","FlexAdamı");
}
public function durdur(evt:Event):void {
lc_FlexGonder.send("flex2swf","durdurBeni");
}
]]>
</mx:Script>
<mx:SWFLoader source="swf/AS2.swf" />
<mx:Button label="Gonder" click="metinGoster(event)" />
<mx:Button label="Durdur" click="durdur(event)" />
</mx:Application>
Flash Kodu:
import mx.utils.Delegate
var al_lc:LocalConnection = new LocalConnection();
al_lc.yaziGoster = function(gelen):Void {
metin_txt.text = gelen
}
al_lc.durdurBeni = function():Void {
Delegate.create(this,stop());
}
al_lc.allowDomain("*");
al_lc.connect("flex2swf");
Hocam, tek kelimeyle süper süper süper. Pardon 3 kelimeyle ![]()
teşekkürler hocam. hem as2, hem as3 bravo ![]()
Yorumlar için teşekkürler. Umarım birilerine faydalı oluyordur ![]()
Hocam anlatımınız gerçekten çok güzel ve çok açıklayıcı kısacık bir sorum olucak direk root dizininde çalıştırdığımız bu local connect i movie clipte nasıl bağlarız flex e şimdiden çok teşekkür ederim