Halaman

Sabtu, 04 Januari 2014

Connect file swf ke file swf lainnya - LocalConnection

Dapet tantangan dari Dado, teman Billy, yaitu bikin file flash supaya bisa bekerja seperti di KiosK.
KiosK cara kerjanya seperti ini:
- layar 1 bisa di klik (ada tombol)
- layar 2 menjalankan animasi sesuai tombol dari layar 1

Browsing di google, dapet yg namanya LocalConnection
Alhamdulillah :)

Begini actionscript programnya:

File PemberiTugas.swf

for (var i = 1; i <= 10; i++) {
this['b' + i].no = i;
this['b' + i].onRelease = function() {
var sending_lc:LocalConnection = new LocalConnection();
sending_lc.send("fromBlue","recieveBlueText",this.no);
};
}


File PenerimaTugas.swf

var receiving_lc:LocalConnection = new LocalConnection();
receiving_lc.recieveBlueText = function(textRecieved:String) {
mcMovie.gotoAndStop(textRecieved);
gotoAndStop(2);
};
stop();

receiving_lc.connect("fromBlue");


Sumber:
http://www.kirupa.com/forum/showthread.php?346895-How-to-hide-swf-menu-items&p=2547035#post2547035
http://www.wikihow.com/Eliminate-the-Right-Click-Cheat-With-Actionscript-2.0
http://en.kioskea.net/faq/7645-script-to-automatically-display-webpage-in-fullscreen
http://www.htmlgoodies.com/beyond/dhtml/article.php/3470521#open

Tidak ada komentar:

Posting Komentar