ciao a tutti
vorrei creare un interfaccia Flash da usare in Maya
ho trovato online qst esempio
classe SockeExemple2:
se creo un .fla e ho impostato come classe document "SocketExemple2"codice:package { import flash.display.Sprite; import flash.events.*; import flash.net.Socket; import flash.display.MovieClip; public class SocketExample2 extends Sprite { private var korysocket:Socket; public function SocketExample2( ) { korysocket = new Socket( ); // Add an event listener to be notified when the connection // is made korysocket.addEventListener( Event.CONNECT, onConnect ); // Connect to the server korysocket.connect("localhost", 2900); //korysocket.connect("localhost", 2900); } private function onConnect(event:Event):void { trace( "The socket is now connected..." ); //makeCube.x = 250; korysocket.writeMultiByte("polySphere;", "ascii"); korysocket.flush( ); } } }
se esguo il .fla in maya mi crea una sfera! ok!
ma se io volessi richiamare le funzioni della classe socket tramite dei pulsanti nel mia .fla?
sapete aiutarmi?
grazie anticipatamente!
anche link utili sono ben accetti

Rispondi quotando