So I am developing an app which loads some xml and parses it. Based on what’s in the xml, it loads another swf, and passes part of the xml over to the loaded swf. So right now I’m trying to develop the loaded movie. But I can’t just test it on its own. It really needs to be loaded by the other movie to make sure it’s integrating all just right. So this was my workflow:
1. Alter the code in PrimalScript and save it.
2. Go over to Flash and select the loaded movie fla.
3. Test that to generate the swf.
4. Close the swf.
5. Switch to the loading fla.
6. Test that to generate that swf, which then loads the loaded swf.
Frustrating.
As hell.
JSFL to the rescue. I replaced my compile.jsfl file that I have PrimalScript set up to run on F7. Here it is now:
fl.outputPanel.clear(); fl.documents[0].save(); fl.documents[0].publish(); fl.documents[1].save(); fl.documents[1].testMovie();
And here’s my new work flow:
1. Alter the code in PrimalScript and hit F7.
Flash saves and publishes the loaded movie (document 0), then saves and tests the loading movie, which loads the newly created swf. Gotta love it.
Great tip!
Thanks
How did you associate F7 with your JSFL in PrimalScript?
Menu: Tools / Options
in Options Panel:
Environment / Language / ActionScript
Select a category:
Script Interpreter
C:\Program Files\SAPIEN\PrimalScript\FlashDriver.exe
Arguments:
compile.jsfl
I cannot get Flash to retain focus when running JSFL files from PrimalScript. Flash gets focus while publishing but then PrimalScript comes back to the front. I know there is an argument to supposedly avoid this but I have been unable to get it to work.
Anyone else had (and fixed) this problem?
>3. Test that to generate the swf.
>4. Close the swf.
How do you close the swf file generated by ‘testMovie’?
Don’t know where to bother you for this, but I thought you should know that the forum on flashextensibility.com (which I beieve is your site if I’m not mistaken). Here’s the error I get:
phpBB : Critical Error
Error creating new session
DEBUG MODE
SQL Error : 1016 Can’t open file: ‘phpbb_sessions.MYI’. (errno: 145)
INSERT INTO phpbb_sessions (session_id, session_user_id, session_start, session_time, session_ip, session_page, session_logged_in) VALUES (‘e59d56ce8a7651f93ab56d43a3aef12c’, -1, 1102934910, 1102934910, ‘d83be52d’, 0, 0)
Line : 152
File : /home/flaszwn/public_html/forums/includes/sessions.php
Keith, thanks for the tip on setting up the Script Interpreter. Works great.
Ben, I found the arguments for FlashDriver.exe:
usage: flashdriver [-d] [-t] [-f] jsflfile
where:
-d delay in milliseconds to wait for trace action
-t get Flash output panel text
-f force focus back to PrimalScript
the jsfl file to run
I found that if you use the -d argument, Flash will retain the focus:
-d compile.jsfl
cool, i didn’t know about those flags.
Thanks Robert, I knew about the flags, I have just never been able to get them to work. I’ve tried -d compile.jsfl, -d 2000 compile.jsfl, etc. The -f flag makes it seem like it should stay with Flash by default but that is not the case on my system (WinXP).
BTW, any new books in the works?
Ben
I’m not doing any writing on Flash, no.
And the Flash Math AS 2.0 reissue ?
Does anyone know how to do this in SE|PY ASEditor ? I found the menu, but seems
the use @ signs etc.
Can someone give me a clue ?