How to refresh Document/Timeline with JSFL after executing a command

459 views Asked by At

I'm looking for a Flash Pro CS6 solution.

After modifying the timeline (ex: changing layer visibility or outline toggle) with a JSFL script, the user-interface doesn't seem to update right after its execution.

Is there any commands / tricks that can force-refresh the state of the document / timeline?

2

There are 2 answers

0
chamberlainpi On BEST ANSWER

Found it!

Since I only needed to refresh the main Timeline (this is where the command is executed from most of the time), I was able to get it to refresh with this command:

fl.getDocumentDOM().editScene(0); //Attempts to edit the same scene currently opened.

I never use new Scenes within the same Flash document, so this is the easiest and simplest way I could find to get around this issue.

0
Vladin Mitov On

fl.getDocumentDOM().editScene( fl.getDocumentDOM().currentTimeline );