Re: [Flashcoders] Create MXI/MXP with External JSFL
Windoze ;-) - Original Message - From: "Steven Sacks | BLITZ" <[EMAIL PROTECTED]> To: Sent: Tuesday, April 10, 2007 6:43 PM Subject: RE: [Flashcoders] Create MXI/MXP with External JSFL Muzak, Are you on Windows or OSX? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Create MXI/MXP with External JSFL
Muzak, Are you on Windows or OSX? ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Create MXI/MXP with External JSFL
Sorry forgot to post the jsfl file (if that matters) It simply contains the following: function sayHello() { fl.trace("Hello from JSFL"); } regards, Muzak - Original Message - From: "Steven Sacks | BLITZ" <[EMAIL PROTECTED]> To: Sent: Tuesday, April 10, 2007 3:20 AM Subject: RE: [Flashcoders] Create MXI/MXP with External JSFL Muzak, Thanks for your response. Unfortunately, it's not working for me when I try to test it before I even make it an MXI/MXP. I created a jsfl folder inside the Configuration folder and put my jsfl file in there. uri = MMExecute("fl.configURI") + "jsfl/test.jsfl"; MMExecute("fl.trace(\"" + uri + "\")"); It traces it out just fine when Flash launches, but when I try to runScript one of the functions in that jsfl file it says argument 1 is invalid. var func = "testFunc"; var cPath = MMExecute("fl.runScript(\"" + uri + "\", \"" + func + "\")"); This works just fine if I hardcode the path to the JSFL on the C: drive. There is one weird thing where it changes the : to a | with configURI but the documentation says that it's supposed to work just like it is. Any ideas? Thanks, Steven ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Create MXI/MXP with External JSFL
This works here: import mx.utils.Delegate; var callJSFL_btn:mx.controls.Button; function callJSFLClickHandler(o:Object):Void { trace("Application ::: callJSFLClickHandler"); var uri = MMExecute('fl.configURI')+"jsfl/myCommand.jsfl"; var func = "sayHello"; MMExecute('fl.trace("'+uri+'")'); MMExecute('fl.runScript("'+uri+'", "'+func+'")'); } callJSFL_btn.addEventListener("click", Delegate.create(this, this.callJSFLClickHandler)); Note that I'm using single and double quotes, so I avoid having to escape quotes (and get lost in the process). Yeah, the path notation is a bit odd: file:///C|/ but that's the way jsfl expects it to be. regards, Muzak - Original Message - From: "Steven Sacks | BLITZ" <[EMAIL PROTECTED]> To: Sent: Tuesday, April 10, 2007 3:20 AM Subject: RE: [Flashcoders] Create MXI/MXP with External JSFL Muzak, Thanks for your response. Unfortunately, it's not working for me when I try to test it before I even make it an MXI/MXP. I created a jsfl folder inside the Configuration folder and put my jsfl file in there. uri = MMExecute("fl.configURI") + "jsfl/test.jsfl"; MMExecute("fl.trace(\"" + uri + "\")"); It traces it out just fine when Flash launches, but when I try to runScript one of the functions in that jsfl file it says argument 1 is invalid. var func = "testFunc"; var cPath = MMExecute("fl.runScript(\"" + uri + "\", \"" + func + "\")"); This works just fine if I hardcode the path to the JSFL on the C: drive. There is one weird thing where it changes the : to a | with configURI but the documentation says that it's supposed to work just like it is. Any ideas? Thanks, Steven ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Create MXI/MXP with External JSFL
I haven't tried running a function, so I'll have to do a test here myself. The quotes and escaping them always makes my head spin ;-) I'll get back to you as soon as I figure it out. regards, Muzak - Original Message - From: "Steven Sacks | BLITZ" <[EMAIL PROTECTED]> To: Sent: Tuesday, April 10, 2007 3:20 AM Subject: RE: [Flashcoders] Create MXI/MXP with External JSFL Muzak, Thanks for your response. Unfortunately, it's not working for me when I try to test it before I even make it an MXI/MXP. I created a jsfl folder inside the Configuration folder and put my jsfl file in there. uri = MMExecute("fl.configURI") + "jsfl/test.jsfl"; MMExecute("fl.trace(\"" + uri + "\")"); It traces it out just fine when Flash launches, but when I try to runScript one of the functions in that jsfl file it says argument 1 is invalid. var func = "testFunc"; var cPath = MMExecute("fl.runScript(\"" + uri + "\", \"" + func + "\")"); This works just fine if I hardcode the path to the JSFL on the C: drive. There is one weird thing where it changes the : to a | with configURI but the documentation says that it's supposed to work just like it is. Any ideas? Thanks, Steven ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
RE: [Flashcoders] Create MXI/MXP with External JSFL
Muzak, Thanks for your response. Unfortunately, it's not working for me when I try to test it before I even make it an MXI/MXP. I created a jsfl folder inside the Configuration folder and put my jsfl file in there. uri = MMExecute("fl.configURI") + "jsfl/test.jsfl"; MMExecute("fl.trace(\"" + uri + "\")"); It traces it out just fine when Flash launches, but when I try to runScript one of the functions in that jsfl file it says argument 1 is invalid. var func = "testFunc"; var cPath = MMExecute("fl.runScript(\"" + uri + "\", \"" + func + "\")"); This works just fine if I hardcode the path to the JSFL on the C: drive. There is one weird thing where it changes the : to a | with configURI but the documentation says that it's supposed to work just like it is. Any ideas? Thanks, Steven ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
Re: [Flashcoders] Create MXI/MXP with External JSFL
You can use fl.runScript() to execute jsfl files. I usually install them alongside the Panels in a sub directory called jsfl, unless the jsfl file has to be accessable via the Command menu in the Flash IDE in which case they need to be stored in the Commands folder in the Flash Configuration directory (and you can't put them in sub folders). Flash Panels end up in the WindowSWF folder inside the Flash configuration directory. So jsfl files that are inteded to be used (called) by a Flash Panel go into "WindowSWF/jsfl/". You can get the path to the Flash configuration directory using: fl.configURI Here's an example: import mx.utils.Delegate var callJSFL_btn:mx.controls.Button; function callJSFLClickHandler(o:Object):Void { trace("Application ::: callJSFLClickHandler") MMExecute('fl.trace(fl.configURI)'); MMExecute('fl.runScript(fl.configURI+"WindowSWF/jsfl/myCommand.jsfl")'); } callJSFL_btn.addEventListener("click", Delegate.create(this, this.callJSFLClickHandler)); In your mxi file, use the following to put jsfl files in the "Commands" folder or in the "WindowSWF/jsfl" folder. Folders that do not exist are created for you. regards, Muzak - Original Message - From: "Steven Sacks | BLITZ" <[EMAIL PROTECTED]> To: Sent: Monday, April 09, 2007 11:41 PM Subject: [Flashcoders] Create MXI/MXP with External JSFL Hey FC, I have a Flash panel I created which requires an external JSFL file to run. How do I package up the JSFL file into the MXI/MXP and how do I determine what the file path is to it load said JSFL from inside the Actionscript of the panel SWF? Wrapping the JSFL into Actionscript is not an option. It's far too complex. Thanks, Steven ___ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com