Is anyone out there using a Flash GUI (i happen to be using actionscript 3.0) with the new exernal web browser plug-in? My attempts at converting this to work within Flash have all failed thus far. I remember 8 or 9 years ago getting it to work nicely w the integrated browser.
Can anyone easily convert this to work from within Flash actionscript? It's what maya suggests you do for IExplorer and is written in javascript.
CODE // init Dim MEL Set MEL = CreateObject("Maya.CommandEngine.MEL") // connect to command port MEL.PortName = "myCommandPortName" MEL.Connect() // run a command MEL.Execute("sphere") Dim resArray resArray = MEL.Result // disconnect from port MEL.Disonnect()
Its actually pretty simple, but since the browser went external it uses a ton more CPU.
All you have to do is Use the getURL command in the actionscript.
ie:
getURL("mel://polySphere");
The first time you run it you will get the Flash security warning and you'll have to go to flash security page and make it a trusted location
and that will do it. again if you do this in m7 it uses virtually no resources, but in the external it sometimes maxes out an entire core on a processor. Its funny that it works worse now than in maya 4, but i guess those are the breaks. I've actually been meaning to dig up the source code for the IE4maya plugin from long ago and recompile it, but haven't tracked it down on my hard drive yet.
Thanks for the help, nick. I had no idea you could send commands without the preamble that maya suggests in her docs. But if it's that much of a hog, maybe it's not worth the creative flexibility flash would give.
You can also send out the thing with sockets. (maya calls this a command port, in fact you can use maya as a webserver too if you care)
However please note: im not so sure this all is sane. It may seem so for a person who is very familliar with flash but not familliar with mel. In way itsa bit of wasted resources as wit the same hastle you can get things done in ways that extend your maya much better, for less memory and performance overhead (and no problems iwth the browser ctrashing). With all the goodies AND MORE than what flash gives you.
The problem is that FLASH uses a lot fo memory and power in vain. And to be honest flash offers far less creative freedom than maya does.