PDA

View Full Version : Error Because JSFL script is running too long


xbrotherx
06-24-2004, 10:50 AM
I have a Command I wrote that runs through a prebuilt Flash movie's fla and cleans it of all it's frame labels and scripting and then inserts new frame labels and new scripting.

I do this because these Flash movies are eLearning course modules that run through a Flash based course player. The course player has been updated so the functions being called from the course modules don't jive with the newly updated functions (bad architecture I know...nothing I could do about it).

So anyway, I have hundreds of these flas with anywhere from 5 to 50 scenes in each one with each scene haveing a frame label and some specific function calls in them.

So instead of going through by hand I thought I would batch them with a JSFL script. The problem I am running into is that there are so many flas and with so many scenes Flash times out running the script and I get this error:

'A script in file X has been running for a long time. Do you want to continue?'

I can keep hitting YES everytime I get that error until the edits are made but I am lazy and don't want to use up any more calories than I have to.

Is there a way to keep Flash from timing out whil running these long Commands?

hangalot
06-25-2004, 05:17 AM
this came up in the jsfl list as well so if u are subscribing to that sorry.
no there is currently no way that is known. i think everybody was kinda hoping MM would let us know what the sollution is but as yet no joy.

here is the full post.



> -----Original Message-----

Hi all,
> >
> > I have a JSFL build script that takes a few minutes to run.
> > Given that it's a build script, it needs to be able to run
> > unattended. The problem is that after it's been running for a
> > little while, a dialog box appears asking if I want to
> > continue running the script.
> >
> > Is there a way to disable this dialog or increase the length
> > of time it waits before displaying it? I've read various
> > postings here and there about the timeout setting in SWF
> > files, but I don't think that would help in this case, since
> > the script isn't running inside a SWF.
> >
> > Any help would be greatly appreciated.
> >
> > Thanks,
> >
> > Morley

> From: [email protected]
> [mailto:[email protected]]On Behalf Of Keith Peters
> Sent: Thursday June 17, 2004 2:19 PM
> To: 'Extending Flash'
> Subject: RE: [ExtendFlash] JSFL timeout dialog
>



>
> First you can break up the script into smaller pieces.
> Of course if you are running it as a command, the script that is running
> those other scripts (via runscript probably), still may be liable to
> timeout.
> The way I've gotten around this is to create a window swf that calls
> each script in turn in an onEnterFrame function.
> You just have to update the name of the script you are calling on each
> iteration.
> Since MMExecute waits for a return value, only one will run at a time.
> Something like this:
>
> Scripts = ["script1", "script2", "script3"];
> Num = 0;
> onEnterFrame = function(){
> MMExecute( // run scripts[Num] here // );
> num++
> }
>
> Very rough code there just to give you an idea.
> Scrip1 runs, when it's done, num increments.
> Next frame, script2 runs, etc.
>
> As long as no individual script causes a 15 second timeout, you are ok.
>
>
>
> > -----Original Message-----
> > From: [email protected]
> > [mailto:[email protected]] On Behalf Of
> > Morley Howell
> > Sent: Thursday, June 17, 2004 12:47 PM
> > To: [email protected]
> > Subject: [ExtendFlash] JSFL timeout dialog
> >
> >
> > Hmm, an interesting idea, but in this case it may not work. My build script
does a recursive descent of a set of inter-dependent component FLAs, making
sure that each one's library is up-to-date. I can't think of a convenient
way to break it up.

Does anyone know of a registry setting or some other config setting that
would allow me to change the timeout value for running JSFL scripts???

Thanks,

> >

xbrotherx
06-25-2004, 06:09 AM
Thanks hangalot. I never thought of trying something like that. I will now.

Thanks again.

hangalot
06-25-2004, 06:29 AM
jsfl needs an event model (which is hopefully coming) in order to solve these kinda problems with a bit more ease. but ja that is the way it is aha aha. or something like that.

hangalot
07-03-2004, 10:56 AM
this post i had posted here b4 got some activity again on the jsfl mailing list, so i thought i should just give u an update.

apparently runnning the jsfl script from command prompt gets around this error.
good luck

tsemple
07-25-2007, 11:18 PM
A command was added in flash 8 to disable the message:
fl.showIdleMessage(false);