Search code examples
user-interfacerefreshflash-cs6jsfl

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


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?


Solution

  • 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.