Flex's FileReference.save() can only be called in a user event handler — how can I get around this?

后端 未结 6 1507
孤独总比滥情好
孤独总比滥情好 2020-12-03 08:11

I need to call FileReference.save() after a web service call has completed, but this method has a restriction: \"In Flash Player, you can only call this method successfully

6条回答
  •  生来不讨喜
    2020-12-03 09:12

    After struggling for that for well, a couple hours I found a workaround: you can use both mouseDown AND mouseUp events instead of just click.

    For instance: s:Button mouseDown="prepare_PDF()" mouseUp="save_PDF()"

    Works fine for me!

    Happy coding!

    --Thomas

提交回复
热议问题