Is anyone know how to write the actionscript to open the notepad and calculator when click on the button?
the only way i know is using a .bat file…
open notepad to create the .bat files.
to open the calculator:
@ echo off
start %SystemRoot%\system32\calc.exe
exit
and save it as calculator.bat
to open the notepad:
@ echo off
start %SystemRoot%\system32
otepad.exe
exit
and save it as notepad.bat
and put both .bat files in a folder called fscommand.
finally, here’s the script for the buttons in flash:
notepadButton.onRelease = function() {
fscommand("exec", "notepad.bat");
};
calculatorButton.onRelease = function() {
fscommand("exec", "calculator.bat");
};
note. this will only work in projectors.
any questions? =)
hi kax:
I already solved the prev problem, but it still not working.
Actually, where should I put the ‘fscommand’ folder? And the path: ‘start %SystemRoot%\system32
otepad.exe’ in the ‘bat’ file, should it be ‘start %SystemRoot%\WINDOWS
otepad.exe’?
Thanks everyone for the helps.
well, if the path i gave you doesn’t work… use the correct path in your system.
%SystemRoot%\system32
otepad.exe works fine in mine.
and yeah… you could have replied to your previous thread. :-\
Hi everyone:
First, I like to thanks to kax and everyone for the helps. The command is working fine now. I just wondering is it any other ways to open notepad and calculator beside ‘fscommand’ ? (I can directly access the notepad and calculator without create the folder ‘fscommand’ and ‘.bat’ files.)
Thanks
again, you don’t need to start a new thread in the same subject. :-\
and no, i don’t think you can (security reasons).
Hi kax:
Is me again. Why I click the buttons to open the notepad and calculator when I press the Ctrl+Enter to test the movie? and not after I export the movie?
ehmm… what!?
seriously, i didn’t understand a thing. :-\
where should I put the fscommand folder? Is it in the Flash MX folder itself?
nope… you put it in the same folder than your projector.
The projector you mean here is refer to which one? Actually, what is projector?
Is there anyway to open the application in swf format?
basically a projector is the .swf in .exe format. go to file>publish settings and check windows projector in the formats tab. then click on publish.
note. you don’t need the flash player installed in order to run a projector.
and i don’t know if there’s a way to run the application in .swf format. i haven’t tried it.